Skip to content

Spack trying to use -march options not recognized by default compiler #13361

@fryeguy52

Description

@fryeguy52

snl-atdm-issue

While trying to use spack install on a rhel6 machine with haswell processors, spack correctly identifies the -march option as core-avx2 but the default gcc version on rhel6 (gcc-4.4.7) does not recognize that as a valid -march option

Steps to reproduce the issue

$ cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.9 (Santiago)

$ which g++
/usr/bin/g++

$ g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ -o hello hello.cpp -march=core-avx2
hello.cpp:1: error: bad value (core-avx2) for -march= switch
hello.cpp:1: error: bad value (core-avx2) for -mtune= switch

Error Message

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... /home/rabartl/Spack.base3/atdm-spack/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... no
configure: error: in `/tmp/rabartl/spack-stage/spack-stage-libsigsegv-2.12-4wg47p4nrbuzpsovsxhbypwtbcu25k4t/spack-src':
configure: error: C compiler cannot create executables
See `config.log' for more details
...

config.log shows:

configure:3283: checking whether the C compiler works
configure:3305: /home/rabartl/Spack.base3/atdm-spack/spack/lib/spack/env/gcc/gcc    conftest.c  >&5
conftest.c:1: error: bad value (core-avx2) for -march= switch
conftest.c:1: error: bad value (core-avx2) for -mtune= switch

Information on your system

  • Red Hat Enterprise Linux Workstation release 6.9 (Santiago)
  • with Intel(R) Xeon(R) CPU E5-2667 v4 @ 3.20GHz (Haswell)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions