Also --debug did not reveal any more useful information:
I've tried spack --debug install g...@8.2.0, but ended up with the same error. The only lines attributed to the gcc install are:
==> [2019-10-01-15:35:15.137341] Installing gcc
==> [2019-10-01-15:35:15.137385] Searching for binary cache of gcc
==> [2019-10-01-15:35:15.140449] No binary for gcc found: installing from source
==> [2019-10-01-15:35:15.223957] '/usr/bin/gcc' '-v' '/tmp/spack-implicit-link-infoijPNWj/main.c' '-o' '/tmp/spack-implicit-link-infoijPNWj/output'
==> [2019-10-01-15:35:15.255794] parsing implicit link info
==> [2019-10-01-15:35:15.256129] linker line: /usr/libexec/gcc/x86_64-redhat-linux/4.8.5/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib>
==> [2019-10-01-15:35:15.256227] linkdir: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
==> [2019-10-01-15:35:15.256277] linkdir: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64
==> [2019-10-01-15:35:15.256320] linkdir: /lib/../lib64
==> [2019-10-01-15:35:15.256359] linkdir: /usr/lib/../lib64
==> [2019-10-01-15:35:15.256394] linkdir: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../..
==> [2019-10-01-15:35:15.256441] found raw link dirs: /usr/lib/gcc/x86_64-redhat-linux/4.8.5, /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64, /lib/../lib64, /usr/lib/../lib64, /usr/l>
==> [2019-10-01-15:35:15.256536] found link dirs: /usr/lib/gcc/x86_64-redhat-linux/4.8.5, /usr/lib64, /lib64, /usr/lib
==> [2019-10-01-15:35:15.342860] A dependency has updated CPATH, this may lead pkg-config to assume that the package is part of the system includes and omit it when invoked with '--cflags'.
==> [2019-10-01-15:35:15.350942] Error: OSError: [Errno 2] No such file or directory: '/site/spack/opt/spack/linux-centos7-haswell/gcc-4.8.5/gcc-8.2.0-q5tss7soouu5rbk2ujndl54ir3ainmiq/bin'
/site/spack/var/spack/repos/builtin/packages/gcc/package.py:429, in setup_environment:
426
427 # Get the contents of the installed binary directory
428 bin_path = self.spec.prefix.bin
>> 429 bin_contents = os.listdir(bin_path)
430
431 # Find the first non-symlink compiler binary present for each language
432 for lang in ['cc', 'cxx', 'fc', 'f77']:
Traceback (most recent call last):
File "/site/spack/lib/spack/spack/build_environment.py", line 774, in child_process
setup_package(pkg, dirty=dirty)
File "/site/spack/lib/spack/spack/build_environment.py", line 704, in setup_package
pkg.setup_environment(spack_env, run_env)
File "/site/spack/var/spack/repos/builtin/packages/gcc/package.py", line 430, in setup_environment
OSError: [Errno 2] No such file or directory: '/site/spack/opt/spack/linux-centos7-haswell/gcc-4.8.5/gcc-8.2.0-q5tss7soouu5rbk2ujndl54ir3ainmiq/bin'
==> [2019-10-01-15:35:15.351390] READ LOCK: /site/spack/opt/spack/.spack-db/lock[0:0] [Acquiring]
==> [2019-10-01-15:35:15.351559] READ LOCK: /site/spack/opt/spack/.spack-db/lock[0:0] [Acquired]
==> [2019-10-01-15:35:15.358486] READ LOCK: /site/spack/opt/spack/.spack-db/lock[0:0] [Released]
==> [2019-10-01-15:35:15.359226] ChildError: OSError: [Errno 2] No such file or directory: '/site/spack/opt/spack/linux-centos7-haswell/gcc-4.8.5/gcc-8.2.0-q5tss7soouu5rbk2ujndl54ir3ainmiq/bin'
/site/spack/var/spack/repos/builtin/packages/gcc/package.py:429, in setup_environment:
426
427 # Get the contents of the installed binary directory
428 bin_path = self.spec.prefix.bin
>> 429 bin_contents = os.listdir(bin_path)
430
431 # Find the first non-symlink compiler binary present for each language
432 for lang in ['cc', 'cxx', 'fc', 'f77']:
Traceback (most recent call last):
File "/site/spack/lib/spack/spack/build_environment.py", line 774, in child_process
setup_package(pkg, dirty=dirty)
File "/site/spack/lib/spack/spack/build_environment.py", line 704, in setup_package
pkg.setup_environment(spack_env, run_env)
File "/site/spack/var/spack/repos/builtin/packages/gcc/package.py", line 430, in setup_environment
OSError: [Errno 2] No such file or directory: '/site/spack/opt/spack/linux-centos7-haswell/gcc-4.8.5/gcc-8.2.0-q5tss7soouu5rbk2ujndl54ir3ainmiq/bin'
Should I file a bug report?