[Trilinos-Users] shared LIBs cannot be built, possibly -fPIC is missing
Orlando.Rivera at lrz.de
Orlando.Rivera at lrz.de
Sat Oct 18 11:26:39 MDT 2008
Hi I have a problem when I want to build with shared libraries
this is my configure
./configure CXXFLAGS=-O3 -64 -LANG:std -LANG:ansi -DMPI_NO_CPPBIND
--prefix=/home/cluster/pr28fa/a2815ag/lib/trilinos-9.0.0
--with-install=/usr/bin/install -p
--with-blas=-L/lrz/sys/intel/mkl91/lib/64s -lmkl -lpthread
--with-lapack=-L/lrz/sys/intel/mkl91/lib/64s -lmkl_lapack -lpthreads
--enable-mpi --with-mpi-compilers --enable-shared --enable-amesos
--enable-anasazi --enable-aztecoo --enable-belos --enable-didasko
--enable-epetra --enable-epetraext --enable-external --enable-ifpack
--enable-fei --enable-isorropia --enable-kokkos --enable-komplex
--enable-meros --enable-ml --enable-moertel --enable-moocho --enable-nox
--enable-phalanx --enable-phdmesh --enable-pliris --enable-pytrilinos
--enable-rythmos --enable-sacado --enable-sundance --enable-teuchos
--enable-pamgen --enable-rtop --enable-threadpool --enable-thyra
--enable-stratimikos --enable-trilinoscouplings --enable-triutils
--enable-galeri --enable-webtrilinos -enable-zoltan
--enable-aztecoo-teuchos
--with-swig=/home/cluster/pr28fa/a2815ag/lib/swig-1.3.36
The problem comes with teuchos for example
Linking teuchos as a shared library
changing directory to ../../teuchos/src
mpiCC -shared -Wl,-soname,libteuchos.so -o libteuchos.so *.o
-L/ptmp2/pr28fa/a2815ag/trilinos/trilinos-9.0.0/packages/PyTrilinos/shared
-L/ptmp2/pr28fa/a2815ag/trilinos/trilinos-9.0.0/packages/teuchos/src
-L/lrz/sys/intel/mkl91/lib/64s -lmkl_lapack -lpthreads -lmkl -lpthread
-L/usr/lib -L/lrz/sys/intel/ifort_101_18/lib
-L/usr/lib/gcc/ia64-suse-linux/4.1.2 -lmpi -lffio -lsma -lifport -lifcore
-limf -lm -lipgo -lirc -lirc_s -ldl
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9ESideCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9EUploCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos11ETranspCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9EDiagCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9ESideCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9EUploCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos11ETranspCharE
ld: Teuchos_BLAS.o: @gprel relocation against dynamic symbol
_ZN7Teuchos9EDiagCharE
So when --shared is given, apparently Teuchos_BLAS.o was compiled
without -fPIC
any idea how can I solve that or should I pass FLAGS=-fPIC, what about the
objects statically built , I assume you have 2 versions of the same
object one statically and one dynamically linked , so the static *.o
is packet with ar and the *.o build with -fPIC is to go in the *.so
is that correct ?
cheers
--
Orlando Rivera Mail: rivera at lrz.de Leibniz-Rechenzentrum Web:
http://www.lrz.de Boltzmannstrasse 1, 85748 Garching Telefon:+49 89
35831-8827 Fax: +49 89 35831-9700
More information about the Trilinos-Users
mailing list