You are here

Scons LIBPATH cannot find library

6 posts / 0 new
Last post
Scons LIBPATH cannot find library
#1

SCons is unable to find a shared library (libcloog-isl.so.4).

The build fails immediately with the following error:

/share/apps/NYUAD3/gcc/gcc/4.9.3/el7/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/cc1plus: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory

I confirm that libcloog-isl.so.4 does exist:

$ which libcloog-isl.so.4

/share/apps/NYUAD3/gcc/cloog/0.18.4/el7/lib/libcloog-isl.so.4

building with the log=environment option shows that /share/apps/NYUAD3/gcc/cloog/0.18.4/el7/lib is the first thing listed in the LIBPATH variable:

external/scons-local/scons.py log=environment bin mode=release extras=mpi -j1

- LIBPATH = ['/share/apps/NYUAD3/gcc/cloog/0.18.4/el7/lib', '/share/apps/NYUAD/openmpi/gcc_4.9.3/1.10.2/lib',

How is it that SCons cannot find this library?

 

 

 

 

 

Category: 
Post Situation: 
Tue, 2019-02-26 14:54
lah435

libcloog-isl.so.4 is not familiar to me as being part of a Rosetta compile.  The error message and google are suggestive that it is needed by the compiler, not by Rosetta or scons.  This suggests the compiler is misconfigured, or the scons environment is weird in a way such that the compiler cannot see its own dependencies.

 

A) do some tests to see that the compiler works at all (by compiling something else - just a hello world from the internet is probably ok.

 

B) the standard advice for making scons look harder for dependencies / have a broader environment applies.  Copy tools/build/killdevil.site.settings or topsail.site.settings into a file site.settings in the same directory, (assuming you do not already have one).  The explanation for this and further details are in many other forum posts here.

Thu, 2019-02-28 10:55
smlewis

 It occurred to me that the environment is somehow not being passed to the compiler. I was able to get it to build by using these settings in user.settings:

 "overrides" : {
        ## Uncomment the following line to import the full operating system environment.  Useful f$
        ## compiling with scons on different systems.
            "ENV" : os.environ,
            "cc" : "gcc",
            "cxx" : "g++",
        },

It builds now but fails toward the end with:

scons: building terminated because of errors.

However, no errors are listed.

 

Thu, 2019-02-28 12:45
lah435

Compile it again - if you are running scons at many -j the error may have gotten buried.  It will error out in the same place again.  (and presumably it won't try to recompile all the stuff that already succeeded, since that's the point of scons)

Thu, 2019-02-28 16:14
smlewis

The errors seem to be related to sqlite3.

I'm at a loss as to how to fix this.

​
scons: Building targets ...
/share/apps/NYUAD/openmpi/gcc_4.9.3/1.10.2/bin/mpiCC -o build/external/release/linux/3.10/64/x86/gcc/4.9/mpi/dbio/sqlite3/sqlite3.os -c -isystem external/boost_1_55_0/ -isystem external/ -isystem external/include/ -isystem external/dbio/ -isystem external/libxml2/include -pipe -Wno-long-long -Wno-strict-aliasing -march=core2 -mtune=generic -O3 -ffast-math -fno-finite-math-only -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -Wno-unused-parameter -fno-fast-math -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -DPTR_STD -DNDEBUG -DUSEMPI -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_THREADSAFE=0 external/dbio/sqlite3/sqlite3.c

external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
 };
 ^
external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
external/dbio/sqlite3/sqlite3.c:19305:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
external/dbio/sqlite3/sqlite3.c: In function ‘void strftimeFunc(sqlite3_context*, int, sqlite3_value**)’:
external/dbio/sqlite3/sqlite3.c:19738:40: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
     z = sqlite3DbMallocRawNN(db, (int)n)

​

 

in case it matters:

[ Dalma compute-60-3 ~/apps/Rosetta/main/source ]
$ which mpiCC
/share/apps/NYUAD/openmpi/gcc_4.9.3/1.10.2/bin/mpiCC

[ Dalma compute-60-3 ~/apps/Rosetta/main/source ]
$ which mpicxx
/share/apps/NYUAD/openmpi/gcc_4.9.3/1.10.2/bin/mpicxx

 

Fri, 2019-03-01 14:31
lah435

Answered in another post: https://www.rosettacommons.org/node/10443

Fri, 2019-03-29 08:47
rmoretti