I am running:
iter.cary$ autoconf --version; automake --version; libtool --version
autoconf (GNU Autoconf) 2.63
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
automake (GNU automake) 1.11
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tro...@redhat.com>
and Alexandre Duret-Lutz <a...@gnu.org>.
iter.cary$ libtool --version
ltmain.sh (GNU libtool) 2.2.4
Written by Gordon Matzigkeit <g...@gnu.ai.mit.edu>, 1996
I am trying to use libtool to make a static executable:
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -pipe -Wall
-Wno-unused -static -o uecxxst ../uebase/uedge.o libuecxxst.la
../uestat/.libs/libuestat.a ../uebase/libuebase.a
../vshdf5/.libs/libvshdf5.a
-L/usr/local/contrib/babel-1.4.0-r6662p1-static/lib -lsidl
-lsidlstub_cxx -lsidlstub_f90
-L/usr/local/contrib/petsc-3.0.0-p7-ser/lib -rpath
/usr/local/contrib/petsc-3.0.0-p7-ser/lib -lpetscts -lpetscsnes
-lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc -lsuperlu_3.1
-llapack -lblas -lmpiuni
/usr/local/contrib/netlib_lite-1.0.4-ser/lib/libnetlib_lite.a
/usr/local/contrib/hdf5-1.8.2-ser/lib/libhdf5_fortran.a
/usr/local/contrib/hdf5-1.8.2-ser/lib/libhdf5.a
/usr/local/internal/txbase-r243-ser/lib/gcc4/libtxbase.a -llapack
/usr/lib64/libblas.so -lgfortranbegin -lgfortran -lm -lz -rpath
/usr/lib/gcc/x86_64-redhat-linux/4.4.0 -ldl
but it ends up not finding some libraries:
iter.cary$ ldd uecxxst
linux-vdso.so.1 => (0x00007fffad9ff000)
libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007fb6a5685000)
libpetscts.so => not found
libpetscsnes.so => not found
libpetscksp.so => not found
libpetscdm.so => not found
libpetscmat.so => not found
libpetscvec.so => not found
libpetsc.so => not found
liblapack.so.3 => /usr/lib64/atlas/liblapack.so.3
(0x00007fb6a4ee7000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007fb6a4bfd000)
libz.so.1 => /lib64/libz.so.1 (0x0000003934600000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003933a00000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003939200000)
libm.so.6 => /lib64/libm.so.6 (0x0000003933e00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003938200000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003934200000)
libc.so.6 => /lib64/libc.so.6 (0x0000003933600000)
libf77blas.so.3 => /usr/lib64/atlas/libf77blas.so.3
(0x00007fb6a49dc000)
libcblas.so.3 => /usr/lib64/atlas/libcblas.so.3 (0x00007fb6a47bc000)
/lib64/ld-linux-x86-64.so.2 (0x0000003933200000)
libatlas.so.3 => /usr/lib64/atlas/libatlas.so.3 (0x00007fb6a3f01000)
On the libtool line I had both '-static' and '-rpath
/usr/local/contrib/petsc-3.0.0-p7-ser/lib'
with the latter being where the libs are found:
iter.cary$ \ls /usr/local/contrib/petsc-3.0.0-p7-ser/lib
libmpiuni.a libpetscdm.so libpetscsnes.a libpetscvec.a
libpetsc.a libpetscksp.a libpetscsnes.so libpetscvec.so
libpetsccontrib.a libpetscksp.so libpetsc.so libsuperlu_3.1.a
libpetsccontrib.so libpetscmat.a libpetscts.a shared
libpetscdm.a libpetscmat.so libpetscts.so
One can see that the -rpath on the link line is not generating anything
like '-Wl,-rpath,...' on the g++ link line.
what am I doing wrong?
This on
iter.cary$ uname -a
Linux iter.txcorp.com 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27
17:27:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Thanks...John Cary
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool