Closed rsignell-usgs closed 4 years ago
Similar to this issue? https://github.com/spack/spack/issues/5705#issuecomment-336229224
Is the ~/.spack/linux/compilers.yaml
file set up correctly?
@JiaweiZhuang , it's not clear to me what to learn from that issue comment.
Did you mean to try changing modules: []
to modules: [intel/19.0.4]
?
If yes, I tried that and have the same issue with C compiler cannot create executables
.
I looked at the config.log
and the problem is configure
can't find the standard libraries:
configure:3252: /home/centos/spack/lib/spack/env/intel/icc -v >&5
icc version 19.0.4.243 (gcc version 4.8.5 compatibility)
ld /usr/lib/gcc/x86_64-redhat-linux/4.8.5/32/crtbegin.o --eh-frame-hdr --buil
d-id -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o a.out -L/home/centos/spac
k/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwq
wjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/compiler/lib/ia32_lin -L/us
r/lib/gcc/x86_64-redhat-linux/4.8.5/32/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5
/../../../../lib/ -L/lib/../lib/ -L/usr/lib/../lib/ -L/usr/lib/gcc/x86_64-redhat
-linux/4.8.5/32 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ -L/usr/lib/gcc/x86_64-
redhat-linux/4.8.5/../../../ -L/lib/ -L/usr/lib -rpath=/home/centos/spack/opt/sp
ack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydg
vmi/compilers_and_libraries_2019.4.243/linux/compiler/lib/intel64 -Bdynamic -Bst
atic -limf -lsvml -lirng -Bdynamic -lm -Bstatic -lipgo -ldecimal --as-needed -Bd
ynamic -lcilkrts -lstdc++ --no-as-needed -lgcc --as-needed -lgcc_s --no-as-neede
d -Bstatic -lirc -lsvml -Bdynamic -lc -lgcc --as-needed -lgcc_s --no-as-needed -
Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/32/crt
end.o
ld: cannot find -lm
ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5//libstdc++.so w
hen searching for -lstdc++
ld: cannot find -lstdc++
ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5//libgcc_s.so wh
en searching for -lgcc_s
ld: cannot find -lgcc_s
ld: cannot find -lc
ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5//libgcc_s.so wh
en searching for -lgcc_s
ld: cannot find -lgcc_s
... rest of stderr output deleted ...
FWIW, this is our (not-working-yet) ~/.spack/compilers/linux.yaml
:
compilers:
- compiler:
environment: {}
extra_rpaths: []
flags: {}
implicit_rpaths: []
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
target: x86_64
- compiler:
environment: {}
extra_rpaths: []
flags: {}
modules: [intel/19.0.4]
operating_system: centos7
paths:
cc: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-1
9.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/
bin/ia32/icc
cxx: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-
19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux
/bin/ia32/icpc
f77: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-
19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux
/bin/ia32/ifort
fc: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-1
9.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/
bin/ia32/ifort
spec: intel@19.0.4
target: x86_64
Does this give you any ideas of what could be wrong?
@rsignell-usgs The only thing comes to my mind is the extra_rpaths
setting (currently empty in your config), but not sure if this can fix your problem...
Ref:
@JiaweiZhuang , problem solved!
Since the intel compiler was working from the command line, I ran:
spack compiler add
and it added a complier with implicit_rpaths
to my compilers.yaml
file:
- compiler:
environment: {}
extra_rpaths: []
flags: {}
implicit_rpaths:
- /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/mpi/intel64/libfabric/lib
- /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/tbb/lib/intel64/gcc4.7
- /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/compiler/lib/intel64_lin
modules: []
operating_system: centos7
paths:
cc: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/bin/intel64/icc
cxx: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/bin/intel64/icpc
f77: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/bin/intel64/ifort
fc: /home/centos/spack/opt/spack/linux-centos7-x86_64/intel-19.0.4/intel-19.0.4-u3y3ya4cuwa5r25r6akwqwjkyiydgvmi/compilers_and_libraries_2019.4.243/linux/bin/intel64/ifort
spec: intel@19.0.4.243
target: x86_64
I deleted the other intel entry I had and I was good to go!
We are following the guide, and in the section "build libraries using spack and intel compiler" we are hitting a snag when trying to install netcdf. Can you see the problem? Did we miss a step?
( we did verify that both the intel icc and ifort compilers could compile and run "hello world" programs...)