Page 1 of 1

statically link libraries

Posted: Thu May 27, 2010 5:27 pm
by sand7000
I would like to compile abinit with statically linked libraries. I used the following configuration options

Code: Select all

 ./configure    --prefix=$HOME/program/abinit   --program-suffix="-mpi"     --enable-mpi   --with-linalg-libs="-Wl,-rpath,/usr/local/intel-11.1.056/mkl/lib/em64t -Wl,--start-group /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_sequential.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lguide -lpthread -lm"     --enable-scalapack   -with-scalapack-libs="-Wl,-rpath,/usr/local/intel-11.1.056/mkl/lib/em64t -Wl,--start-group /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_sequential.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread"     FC=mpif90 CC=mpiCC

but I get the following error
configure: parsing command-line options
configure: error: invalid library statement in with_linalg_libs: /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a

Can anyone tell me the mistake I am making?

Re: statically link libraries

Posted: Thu May 27, 2010 7:09 pm
by pouillon
See this thread: viewtopic.php?f=3&t=311

With ifort, you might have to add options like "-i-static", but it is not guaranteed that it will work on all platforms.

Re: statically link libraries

Posted: Wed Jul 28, 2010 6:35 pm
by vimtex
sand7000 wrote:I would like to compile abinit with statically linked libraries. I used the following configuration options

Code: Select all

 ./configure    --prefix=$HOME/program/abinit   --program-suffix="-mpi"     --enable-mpi   --with-linalg-libs="-Wl,-rpath,/usr/local/intel-11.1.056/mkl/lib/em64t -Wl,--start-group /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_sequential.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lguide -lpthread -lm"     --enable-scalapack   -with-scalapack-libs="-Wl,-rpath,/usr/local/intel-11.1.056/mkl/lib/em64t -Wl,--start-group /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_sequential.a /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_core.a -Wl,--end-group -lpthread"     FC=mpif90 CC=mpiCC

but I get the following error
configure: parsing command-line options
configure: error: invalid library statement in with_linalg_libs: /usr/local/intel-11.1.056/mkl/lib/em64t/libmkl_intel_lp64.a

Can anyone tell me the mistake I am making?


The configure script like to check whether the library statement is valid or not by "grep '^-LlW'"
try

./configure ........... --with-linalg-libs="-L/usr/local/intel-11.1.056/mkl/lib/em64t -lmkl_intel_lp64 -l .... -liomp5 -lpthread "

and use -i-static option as suggested