spack: Installing gcc@6.2: `configure: error: cannot compute sizeof (long long)`

Trying to build gcc@6.2.0 on Centos 7.2 x64 and get

configure: error: cannot compute sizeof (long long)

This error resulted from doing the following:

$ yum install gcc gcc-g++ autoconf autotools libtool bzip2 xz
...
$ spack compiler add
==> Added 1 new compiler to /home/will/.spack/compilers.yaml
    gcc@4.8.5
$ spack install gcc@6.2.0

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 18 (16 by maintainers)

Most upvoted comments

Just to clarify, you mean gcc+binutils doesn’t work but gcc~binutils does? I know I got gcc@6.3.0~binutils to install on CentOS 7.

Yes @adamjstewart that is what I meant gcc+binutils doesn’t work but gcc~binutils does

@willfurnass Fortran compilers are not necessary to build GCC. GCC should be able to build with 4.4.7/4.8.5 which are available on Centos 6/7.

Recommend trying spack install gcc@6.2.0~binutils on Centos 7

For some bizarre reason I had:

$ spack config get compilers
compilers:
- compiler:
    modules: []
    operating_system: redhat6
    paths:
      cc: /usr/bin/gcc
      cxx: /usr/bin/g++
      f77: /usr/local/bin/gfortran
      fc: /usr/local/bin/gfortran
    spec: gcc@4.4.7
- compiler:
    modules: []
    operating_system: centos7
    paths:
      cc: /usr/bin/gcc
      cxx: /usr/bin/g++
      f77: /usr/bin/gfortran
      fc: /usr/bin/gfortran
    spec: gcc@4.8.5

This may be due to me having a home dir shared between two clusters and having tried using spack on the older RHEL6 one previously.

I deleted ~/.spack, ran spack compiler rm gcc@4.4.7 to ditch the unwanted version of GCC then re-ran spack install gcc@6.2.0 but the install failed in the same way as before.