[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple -rpaths
From: |
Jan Engelhardt |
Subject: |
Multiple -rpaths |
Date: |
Sun, 2 Nov 2008 17:24:27 +0100 (CET) |
User-agent: |
Alpine 1.10 (LNX 962 2008-03-14) |
Hi,
I have two libraries in paths that are not searched by default (e.g.
/opt/foo/lib). So I have this in my pkgconfig files:
foo.pc: Libs: -L${libdir} -lfoo
bar.pc: Libs: -L${libdir} -lbar
The linker will find -lfoo,-lbar and successfully create the output file
-- which is an .la library --, but running `ldd` on it says
"libfoo.so.0 => not found", and that seems fine to me, since no -rpath
was given. So I try to add -rpath in the pkgconfig files:
foo.pc: Libs: -L${libdir} -rpath ${libdir} -lfoo
bar.pc: Libs: -L${libdir} -rpath ${libdir} -lbar
Then unfortunately, libtool complains with
libtool: link: warning: ignoring multiple `-rpath's for a libtool
library
The Makefile.am line is just:
lib_LTLIBRARIES = baz.la
baz_la_LDFLAGS = -avoid-version -module ${libfoo_LIBS} ${libbar_LIBS}
with ${lib*_LIBS} being mapped to the pkgconfig parts, respectively.
How would I achieve what I am trying here? (Possibly without using
non-portable linker flags or workarounds like -Wl,-rpath,${libdir} -- I
seem to remember Solaris ld does not like -rpath at all and wants -R
instead.)
thanks,
Jan
- Multiple -rpaths,
Jan Engelhardt <=
- Re: Multiple -rpaths, Bob Friesenhahn, 2008/11/02
- Re: Multiple -rpaths, Ralf Wildenhues, 2008/11/02
- Re: Multiple -rpaths, Jan Engelhardt, 2008/11/03
- Re: Multiple -rpaths, Ralf Wildenhues, 2008/11/03
- Re: Multiple -rpaths, Ralf Wildenhues, 2008/11/03
- Re: Multiple -rpaths, Jan Engelhardt, 2008/11/04
- Re: Multiple -rpaths, Ralf Wildenhues, 2008/11/04
- Re: Multiple -rpaths, Tim Mooney, 2008/11/04
- Re: Multiple -rpaths, Dan Nicholson, 2008/11/04