Best practices for setting -rpath in .pc files?

Abdoulaye Walsimou GAYE awg at embtoolkit.org
Fri Aug 13 10:45:01 PDT 2010


Nick Mathewson,

On 08/13/2010 07:28 PM, Nick Mathewson wrote:
> Hello!
>
> I maintain a library which (for testing and various other reasons)
> people often want to install into directories not on their usual
> library search path.
>
>    

And when they cross compile, they also want to install them else where!

> When they do this, is there any sense of whether it's reasonable to
> include an -rpath flag (or a -Wl,-R flag, or a -R flag, or a
> -Wl,-rpath flag as appropriate) in the .pc file?  Or is this a bad
> idea for some reason?
>
>    

rpath is bad in case of cross compile, and other reasons explained here [1]

> If this is a reasonable idea, can anybody point me towards an example
> of an autotools-based project that does it correctly, so I can see how
> it's done and not reinvent the wheel?
>
> (I've checked the documentation and mailing list archives for info
> about this.  If there's anything documented, I'm afraid I haven't
> managed to find it.  Of the projects I've looked at, none seem to take
> this approach, but I don't know whether that's because it's a bad
> idea, or because it's too hard, or whether they just didn't think to
> do it.)
>
> many thanks for your time,
>    


Best regards,
AWG

[1] http://wiki.debian.org/RpathIssue


More information about the pkg-config mailing list