[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple -rpaths
From: |
Jan Engelhardt |
Subject: |
Re: Multiple -rpaths |
Date: |
Sun, 2 Nov 2008 22:02:52 +0100 (CET) |
User-agent: |
Alpine 1.10 (LNX 962 2008-03-14) |
On Sunday 2008-11-02 20:22, Bob Friesenhahn wrote:
> On Sun, 2 Nov 2008, Jan Engelhardt wrote:
>>
>> 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:
>
> The -rpath option is for the run-time linker search path.
Which is what I want. The linker finds it no problem (due to -L),
the runtime linker does not.
> It is
> not used to find libraries during compilation. A normal convention
> for run-paths is to use a ':' to allow specifying multiple
> directories (just like PATH).
Well I cannot do that because the rpaths would be in two separate .pc files.
> You should list any dependency
> libraries via foo_la_LIBADD rather than foo_la_LDFLAGS. Please
> refer to the documentation.
Yes I did that, but there seems to be no solution to this.
# Two projects: /opt/foo with foo,bar.la
# and baz as the second.
baz_la_LIBADD = -L/opt/foo/lib -lfoo -lbar
baz_la_LDFLAGS = -module -avoid-version
- Multiple -rpaths, Jan Engelhardt, 2008/11/02
- Re: Multiple -rpaths, Bob Friesenhahn, 2008/11/02
- Re: Multiple -rpaths,
Jan Engelhardt <=
- 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
- Re: Multiple -rpaths, Ralf Wildenhues, 2008/11/04