statically link libraries

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
sand7000
Posts: 5
Joined: Thu May 27, 2010 5:20 pm

statically link libraries

Post by sand7000 » Thu May 27, 2010 5:27 pm

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?

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: statically link libraries

Post by pouillon » Thu May 27, 2010 7:09 pm

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.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

vimtex
Posts: 3
Joined: Mon Jul 26, 2010 5:23 am

Re: statically link libraries

Post by vimtex » Wed Jul 28, 2010 6:35 pm

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

Locked