[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
>> " => 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,
# and baz as the second.
        baz_la_LIBADD = -L/opt/foo/lib -lfoo -lbar
        baz_la_LDFLAGS = -module -avoid-version

reply via email to

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