libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rpath in later versions of libtool


From: Ralf Wildenhues
Subject: Re: rpath in later versions of libtool
Date: Tue, 11 Aug 2009 22:35:55 +0200
User-agent: Mutt/1.5.20 (2009-08-09)

Hello John,

* John R. Cary wrote on Fri, Aug 07, 2009 at 11:49:39PM CEST:
> 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

> 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
[...]
> One can see that the -rpath on the link line is not generating anything
> like '-Wl,-rpath,...' on the g++ link line.

Try using -R $path instead of -rpath $path.

If that fixes it, it seems we have a regression to take care of.

Cheers,
Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]