-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
I'm trying out spack for the first time and ran into trouble when I tried to install a package after loading a compiler with the module command:
$ gcc --version | head -1
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
$ module show compilers/gcc/4.8.3
-------------------------------------------------------------------
/etc/modulefiles/compilers/gcc/4.8.3:
module-whatis load GCC 4.8.3 environment
module-whatis Modifies: PATH, LD_LIBRARY_PATH, MANPATH
prepend-path PATH /projects/opt/gcc/4.8.3/bin
prepend-path LD_LIBRARY_PATH /projects/opt/gcc/4.8.3/lib64:/projects/opt/gcc/4.8.3/lib
prepend-path MANPATH /projects/opt/gcc/4.8.3/share/man
setenv CC gcc
setenv CXX g++
setenv CPP cpp
setenv FC gfortran
setenv F77 gfortran
setenv F90 gfortran
-------------------------------------------------------------------
$ module load compilers/gcc/4.8.3
$ gcc --version | head -1
gcc (GCC) 4.8.3
$ spack compilers
==> Available compilers
-- gcc ----------------------------------------------------------
[email protected]
$ spack compiler add
==> Added 1 new compiler to /home/pakin/.spackconfig
[email protected]
$ spack install libelf
==> Installing libelf
==> Trying to fetch from http://www.mr511.de/software/libelf-0.8.12.tar.gz
######################################################################## 100.0%
==> Staging archive: /home/pakin/spack/var/spack/stage/[email protected]%[email protected]=unknown_arch/libelf-0.8.12.tar.gz
==> Created stage in /home/pakin/spack/var/spack/stage/[email protected]%[email protected]=unknown_arch.
==> No patches needed for libelf.
==> Building libelf.
creating cache ./config.cache
checking whether make sets ${MAKE}... yes
checking for gcc... cc
checking whether the C compiler (cc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Traceback (most recent call last):
File "/home/pakin/spack/lib/spack/spack/package.py", line 754, in do_install
self.install(self.spec, self.prefix)
File "/home/pakin/spack/var/spack/packages/libelf/package.py", line 43, in install
"--disable-debug")
File "/home/pakin/spack/lib/spack/spack/util/executable.py", line 83, in __call__
% (" ".join(cmd), proc.returncode))
spack.util.executable.ProcessError: command './configure --prefix=/home/pakin/spack/opt/unknown_arch/[email protected]/[email protected] --enable-shared --disable-dependency-tracking --disable-debug' returned error code 1
$ cat /tmp/spack-stage/spack-stage-J87_JC/libelf-0.8.12/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:582: checking whether make sets ${MAKE}
configure:611: checking for gcc
configure:724: checking whether the C compiler (cc ) works
configure:740: cc -o conftest conftest.c 1>&5
/projects/opt/gcc/4.8.3/packages/gcc-4.8.3/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
configure: failed program was:
#line 735 "configure"
#include "confdefs.h"
main(){return(0);}
$ ldd /projects/opt/gcc/4.8.3/packages/gcc-4.8.3/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.3/cc1
linux-vdso.so.1 => (0x00007fff5b9ff000)
libmpc.so.3 => /projects/opt/gcc/4.8.3/lib/libmpc.so.3 (0x00002ad3b51d7000)
libmpfr.so.4 => /projects/opt/gcc/4.8.3/lib/libmpfr.so.4 (0x00002ad3b53ef000)
libgmp.so.10 => /projects/opt/gcc/4.8.3/lib/libgmp.so.10 (0x00002ad3b564b000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003167000000)
libz.so.1 => /lib64/libz.so.1 (0x0000003167400000)
libstdc++.so.6 => /projects/opt/gcc/4.8.3/lib64/libstdc++.so.6 (0x00002ad3b58e3000)
libm.so.6 => /lib64/libm.so.6 (0x0000003166800000)
libgcc_s.so.1 => /projects/opt/gcc/4.8.3/lib64/libgcc_s.so.1 (0x00002ad3b5bed000)
libc.so.6 => /lib64/libc.so.6 (0x0000003166400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003166000000)
It looks like spack is discarding my LD_LIBRARY_PATH. Is there a way to tell it not to?
— Scott