[M3devel] runpath/unshipped vs. shipped binaries
Jay
jay.krell at cornell.edu
Mon Apr 6 06:23:14 CEST 2009
- The horrid RPATH is not my doing. It has "always" been that way.
- The horrid RPATH is needed, for running not installed binaries, a very real scenario,
- Jay
----------------------------------------
> Date: Sun, 5 Apr 2009 20:17:02 -0700
> From: carson at taltos.org
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] runpath/unshipped vs. shipped binaries
>
> Jay wrote:
> ...
>> When I build a "regular" build, historically, on Linux,
>> binaries have a big bunch of paths run together in them, like:
>>
>>
>> /cm3/pkg/m3core/AMD64_LINUX:/cm3/pkg/libm3/AMD64_LINUX:etc.
> ...
>> Now, today I have made things a bit better.
>>
>>
>> The first path is $ORIGIN/../lib.
>> $ORIGIN is a special syntax for "The directory with the executable".
>> That really is not a sufficient mechanism, but it is a small step forwarder.
>> YOu want relativity from the referencing file, not just the executable.
>> Or something more abstract not dealing with paths at all..
>
> If you're saying that today you produce binaries with an RPATH of:
>
> $ORIGIN/../lib:/cm3/pkg/m3core/AMD64_LINUX:...
>
> That's just... horrid.
>
> Assuming all of your libraries are in ${exe_path}/../lib, you need
> exactly one RPATH entry:
>
> $ORIGIN/../lib
>
> Get rid of _all_ the other "-R foo" link arguments, and all will be
> well. No need to relink if you link properly the first time.
>
> --
> Carson
More information about the M3devel
mailing list