Mailinglist Archive: opensuse-programming (14 mails)

< Previous Next >
Re: [suse-programming-e] LD_RUN_PATH on SUSE 10.x
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Thu, 21 Sep 2006 19:19:59 +0200
  • Message-id: <1158859199.16702.1.camel@xxxxxxxxxxxxxxxx>
On Thu, 2006-09-21 at 08:23 +0200, Roger Oberholtzer wrote:
> On Wed, 2006-09-20 at 22:59 +0200, Anders Johansson wrote:
>
> > I am confused. LD_RUN_PATH is used during compilation, not during execution,
> > as far as I'm aware. The runtime version is LD_LIBRARY_PATH
>
> LD_RUN_PATH results in information being added to the built executable
> that will tell it where to look for libs at runtime, independent of any
> places told at runtime. It becomes part of the binary. Hence the 'RUN'
> in the name.
>
> LD_LIBRARY_PATH is something you can set in the runtime environment that
> also tells where to look for libraries. It had nothing to do with
> compilation.

I'm not entirely sure why you felt you had to repeat what I said, but
the point of my email was: why not create a wrapper script for your
application that does

export LD_LIBRARY_PATH=/path/to/your/library

and then executes the application that needs the special lib

This seems like a much nicer solution than to add extra directories to
ld.so.conf for one particular app (and it beats the living daylights out
of hardcoding the path to the lib at compile time)



< Previous Next >
Follow Ups