-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Problems with gfortran auto-detection #7016
Copy link
Copy link
Closed
Labels
Description
I'm opening this issue on behalf of @hfp. See #6896 for prior discussion.
On some systems, Spack is not correctly picking up gfortran.
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful
$ ls -l /usr/bin/gcc*
lrwxrwxrwx 1 root root 5 Sep 18 16:11 /usr/bin/gcc -> gcc-7
-rwxr-xr-x 1 root root 755K Sep 14 14:21 /usr/bin/gcc-4.8
-rwxr-xr-x 1 root root 887K Oct 10 19:53 /usr/bin/gcc-5
lrwxrwxrwx 1 root root 22 Oct 10 14:29 /usr/bin/gcc-6 -> x86_64-linux-gnu-gcc-6
lrwxrwxrwx 1 root root 22 Oct 14 22:35 /usr/bin/gcc-7 -> x86_64-linux-gnu-gcc-7
lrwxrwxrwx 1 root root 8 Sep 18 16:11 /usr/bin/gcc-ar -> gcc-ar-7
-rwxr-xr-x 1 root root 27K Sep 14 14:21 /usr/bin/gcc-ar-4.8
-rwxr-xr-x 1 root root 31K Oct 10 19:53 /usr/bin/gcc-ar-5
lrwxrwxrwx 1 root root 25 Oct 10 14:29 /usr/bin/gcc-ar-6 -> x86_64-linux-gnu-gcc-ar-6
lrwxrwxrwx 1 root root 25 Oct 14 22:35 /usr/bin/gcc-ar-7 -> x86_64-linux-gnu-gcc-ar-7
lrwxrwxrwx 1 root root 8 Sep 18 16:11 /usr/bin/gcc-nm -> gcc-nm-7
-rwxr-xr-x 1 root root 27K Sep 14 14:21 /usr/bin/gcc-nm-4.8
-rwxr-xr-x 1 root root 31K Oct 10 19:53 /usr/bin/gcc-nm-5
lrwxrwxrwx 1 root root 25 Oct 10 14:29 /usr/bin/gcc-nm-6 -> x86_64-linux-gnu-gcc-nm-6
lrwxrwxrwx 1 root root 25 Oct 14 22:35 /usr/bin/gcc-nm-7 -> x86_64-linux-gnu-gcc-nm-7
lrwxrwxrwx 1 root root 12 Sep 18 16:11 /usr/bin/gcc-ranlib -> gcc-ranlib-7
-rwxr-xr-x 1 root root 27K Sep 14 14:21 /usr/bin/gcc-ranlib-4.8
-rwxr-xr-x 1 root root 31K Oct 10 19:53 /usr/bin/gcc-ranlib-5
lrwxrwxrwx 1 root root 29 Oct 10 14:29 /usr/bin/gcc-ranlib-6 -> x86_64-linux-gnu-gcc-ranlib-6
lrwxrwxrwx 1 root root 29 Oct 14 22:35 /usr/bin/gcc-ranlib-7 -> x86_64-linux-gnu-gcc-ranlib-7
$ ls -l /usr/bin/g++*
lrwxrwxrwx 1 root root 5 Sep 18 16:11 /usr/bin/g++ -> g++-7
-rwxr-xr-x 1 root root 759K Sep 14 14:21 /usr/bin/g++-4.8
-rwxr-xr-x 1 root root 891K Oct 10 19:53 /usr/bin/g++-5
lrwxrwxrwx 1 root root 22 Oct 10 14:29 /usr/bin/g++-6 -> x86_64-linux-gnu-g++-6
lrwxrwxrwx 1 root root 22 Oct 14 22:35 /usr/bin/g++-7 -> x86_64-linux-gnu-g++-7
$ ls -l /usr/bin/gfortran*
lrwxrwxrwx 1 root root 10 Sep 18 16:11 /usr/bin/gfortran -> gfortran-7
-rwxr-xr-x 1 root root 759K Sep 14 14:21 /usr/bin/gfortran-4.8
-rwxr-xr-x 1 root root 891K Oct 10 19:53 /usr/bin/gfortran-5
lrwxrwxrwx 1 root root 27 Oct 10 14:29 /usr/bin/gfortran-6 -> x86_64-linux-gnu-gfortran-6
lrwxrwxrwx 1 root root 27 Oct 14 22:35 /usr/bin/gfortran-7 -> x86_64-linux-gnu-gfortran-7
$ /usr/bin/gcc -dumpversion
7
$ /usr/bin/gcc -dumpfullversion
7.2.0
$ /usr/bin/g++ -dumpversion
7
$ /usr/bin/g++ -dumpfullversion
7.2.0
$ /usr/bin/gfortran -dumpversion
7
$ /usr/bin/gfortran -dumpfullversion
7.2.0
$ spack compiler find
==> Added 5 new compilers to /home/astewart/.spack/linux/compilers.yaml
[email protected] [email protected] [email protected] [email protected] [email protected]
==> Compilers are defined in the following files:
/home/astewart/.spack/linux/compilers.yaml
$ spack config get compilers
compilers:
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: ubuntu17.10
paths:
cc: /usr/bin/clang-4.0
cxx: /usr/bin/clang++-4.0
f77: null
fc: null
spec: [email protected]
target: x86_64
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: ubuntu17.10
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: null
fc: null
spec: [email protected]
target: x86_64
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: ubuntu17.10
paths:
cc: /usr/bin/gcc-4.8
cxx: /usr/bin/g++-4.8
f77: /usr/bin/gfortran-4.8
fc: /usr/bin/gfortran-4.8
spec: [email protected]
target: x86_64
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: ubuntu17.10
paths:
cc: /usr/bin/gcc-5
cxx: /usr/bin/g++-5
f77: /usr/bin/gfortran-5
fc: /usr/bin/gfortran-5
spec: [email protected]
target: x86_64
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: []
operating_system: ubuntu17.10
paths:
cc: /usr/bin/gcc-6
cxx: /usr/bin/g++-6
f77: /usr/bin/gfortran-6
fc: /usr/bin/gfortran-6
spec: [email protected]
target: x86_64
I would expect Spack to be picking up a gfortran compiler for GCC 7.2.0. I think it should also be picking one up for clang, but I'm not as sure about that. I'm going to continue the investigation and post anything else I find here. Let me know if there is any info that is missing, but so far I don't see any reason why it doesn't work.
Reactions are currently unavailable