On Tue, Jun 30, 2009 at 2:58 PM, Thomas Maier<hay...@gmail.com> wrote:
>> As shown by "readelf -d packed-executable" my installation of PAR::Packer 
>> here
>> produces packed executables with both RPATH and RUNPATH set,
>> hence LD_LIBRARY_PATH will take precedence. Can you check your executable?
> First of all, thanks for this explanation.
> I see that mine is not:
> # readelf -d <my-executable>
>...
>  0x0000000f (RPATH)                      Library rpath:
> [/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE]

That explains the exhibited behaviour:  RPATH (and no RUNPATH)
takes precedence over LD_LIBRARY_PATH.

> Just to emphasize what you've said, on the second station (WindRiver
> with 5.8.7) the RPATH directory does not exists
> and my executable does running there.
> So, the question now is, do we have some generic way to fix it ? I
> mean, more generic then deleting directories or fixing
> binary files.

I thought about it already. The culprit is (in build area)
PAR-Packer-*/myldr/par
- that's file (b). I eliminated " -Wl,-rpath,/usr/lib/perl5/..." from
its link command
(this advises the linker to set RPATH/RUNPATH in executable). That would have
worked - creating (b) without any RPATH/RUNPATH - except that a little later
in the build process myldr/par is actually run. This fails since it now can't
find libperl.so (against which it is linked). Also the build system doesn't
just make up  " -Wl,-rpath,/usr/lib/perl5/..." - that's is taken verbatim from
information in Config.pm. Anyway this needs more thinking...

Cheers, Roderich

Reply via email to