Spack: fails bootstrapping new compiler

Created on 7 Aug 2018  路  3Comments  路  Source: spack/spack

Summary: Builiding a new compiler bombs out, saying g++ is not installed, yet it is.
[root@centos75 SRC]# rpm -qa | grep -i c++
gcc-c++-4.8.5-28.el7_5.1.x86_64
libstdc++-devel-4.8.5-28.el7_5.1.x86_64
gcc-c++-x86_64-linux-gnu-4.8.5-16.el7.1.x86_64
libstdc++-4.8.5-28.el7_5.1.x86_64

Expected Result: gcc 4.9.3 gets built

Actual Result

[root@centos75 SRC]# spack install [email protected]
==> libsigsegv is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/libsigsegv-2.11-qpmaxx6z62df4s4hwyehdwptv6kmrfhf
==> m4 is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/m4-1.4.18-o24gxan6j2b5dyfnkwv3ilyh7hvr7p6o
==> pkgconf is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/pkgconf-1.4.2-lq2llfax3ikzxy7fel7kvlrxogtolr7w
==> ncurses is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/ncurses-6.1-rqw3cmcwvd76h4rjgtaxpvrqg47prwkg
==> readline is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/readline-7.0-b4z2xcjalfc4z7tgktx7txhe2my3wlfd
==> gdbm is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gdbm-1.14.1-xdrlyqkflqshxl2so56p5qhwjf77dxbt
==> perl is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/perl-5.26.2-hnx5wqjxdsqb2l3g3zjebpdul4wuurov
==> autoconf is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/autoconf-2.69-uxvf55ypu6mag4oaendwmdxjrf7e5s2f
==> automake is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/automake-1.16.1-vig6f2apycmxxxbx355yn6ypdxoriwqj
==> libtool is already installed in /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/libtool-2.4.6-bcbiddkmbu4gy7wx6ftntmxqe3c5br3z
==> Installing gmp
==> Using cached archive: /SRC/spack/var/spack/cache/gmp/gmp-6.1.2.tar.bz2
==> Staging archive: /SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm/gmp-6.1.2.tar.bz2
==> Created stage in /SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm
==> No patches needed for gmp
==> Building gmp [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm/gmp-6.1.2/configure' '--prefix=/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gmp-6.1.2-6b sovvkqwx6zscwtbvjj6egrgizbyycm' '--enable-cxx'

1 error found in build log:
74 checking for build system compiler math library... -lm
75 checking for g++... g++
76 checking whether we are using the GNU C++ compiler... no
77 checking whether g++ accepts -g... no
78 checking C++ compiler g++ -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8... no
79 checking C++ compiler g++ ... no

80 configure: error: C++ compiler not available, see config.log for details

See build log for details:
/SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm/gmp-6.1.2/spack-build.out

[root@centos75 SRC]# cat /SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm/gmp-6.1.2/spack-build.out
==> Executing phase: 'autoreconf'
==> Configure script not found: trying to generate it
==> Warning: ******************
==> Warning: * If the default procedure fails, consider implementing *
==> Warning: * a custom AUTORECONF phase in the package *
==> Warning:
******************
==> '/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/libtool-2.4.6-bcbiddkmbu4gy7wx6ftntmxqe3c5br3z/bin/libtoolize'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
libtoolize: 'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT'
==> '/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/automake-1.16.1-vig6f2apycmxxxbx355yn6ypdxoriwqj/bin/aclocal'
==> '/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/autoconf-2.69-uxvf55ypu6mag4oaendwmdxjrf7e5s2f/bin/autoreconf' '-ivf' '-I' '/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/pkgconf-1.4.2-lq2llfax3ikzxy7fel7kvlrxogtolr7w/share/aclocal'
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal -I /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/pkgconf-1.4.2-lq2llfax3ikzxy7fel7kvlrxogtolr7w/share/aclocal --force autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. libtoolize: 'AC_PROG_RANLIB' is rendered obsolete by 'LT_INIT' autoreconf: running: /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/autoconf-2.69-uxvf55ypu6mag4oaendwmdxjrf7e5s2f/bin/autoconf --include=/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/pkgconf-1.4.2-lq2llfax3ikzxy7fel7kvlrxogtolr7w/share/aclocal --force autoreconf: running: /SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/autoconf-2.69-uxvf55ypu6mag4oaendwmdxjrf7e5s2f/bin/autoheader --include=/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/pkgconf-1.4.2-lq2llfax3ikzxy7fel7kvlrxogtolr7w/share/aclocal --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:2385: installing './compile' configure.ac:80: installing './missing' Makefile.am:295: warning: source file 'cxx/dummy.cc' is in a subdirectory, Makefile.am:295: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. autoreconf: Leaving directory.'
==> Executing phase: 'configure'
==> '/SRC/spack/var/spack/stage/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm/gmp-6.1.2/configure' '--prefix=/SRC/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/gmp-6.1.2-6bsovvkqwx6zscwtbvjj6egrgizbyycm' '--enable-cxx'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler /SRC/spack/lib/spack/env/gcc/gcc -O2 -pedantic -fomit-frame-pointer -m64 ... yes
checking compiler /SRC/spack/lib/spack/env/gcc/gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8... yes
checking compiler /SRC/spack/lib/spack/env/gcc/gcc -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8... yes
checking for gcc... /SRC/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /SRC/spack/lib/spack/env/gcc/gcc accepts -g... yes
checking for /SRC/spack/lib/spack/env/gcc/gcc option to accept ISO C89... none needed
checking whether /SRC/spack/lib/spack/env/gcc/gcc understands -c and -o together... yes
checking for /SRC/spack/lib/spack/env/gcc/gcc option to accept ISO C99... -std=gnu99
checking for /SRC/spack/lib/spack/env/gcc/gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking how to run the C preprocessor... /SRC/spack/lib/spack/env/gcc/gcc -std=gnu99 -E
checking build system compiler /SRC/spack/lib/spack/env/gcc/gcc -std=gnu99... yes
checking for build system preprocessor... /SRC/spack/lib/spack/env/gcc/gcc -std=gnu99 -E
checking for build system executable suffix...
checking whether build system compiler is ANSI... yes
checking for build system compiler math library... -lm
checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking C++ compiler g++ -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8... no
checking C++ compiler g++ ... no
configure: error: C++ compiler not available, see config.log for details

compilers

Most helpful comment

Spack doesn't search for compilers every time you run it, as this would be very expensive.

But in principle we could run it every time an install fails due to a missing compiler

All 3 comments

This is a very common problem. What I'm going to guess happened was that you ran Spack, discovered that you didn't have a C++ compiler installed, installed one, and then you still got the same error?

Spack doesn't search for compilers every time you run it, as this would be very expensive. You'll have to add this new C++ compiler to your compilers.yaml (it's usually in ~/.spack/linux/compilers.yaml but can be in other locations). Just replace null with the new g++ executable. Alternatively, spack compiler remove the old compiler entry and spack compiler find the new one.

Ah. My bad. Thank you.

Spack doesn't search for compilers every time you run it, as this would be very expensive.

But in principle we could run it every time an install fails due to a missing compiler

Was this page helpful?
0 / 5 - 0 ratings