develooper Front page | perl.perl5.porters | Postings from November 2005

MakeMaker problems with rpath setting

Thread Next
Michael Schroeder
November 30, 2005 07:07
MakeMaker problems with rpath setting
Message ID:

Hi Porters,

I have a small problem with MakeMaker. It always sets LD_RUN_PATH
to a list of directories where the libraries were found. LD_RUN_PATH
gets included in the shared object, it is used by the run time linker
to resolve missing libraries.

The problem is that the compile time location of the libraries does
not need to be the same as the run time location. Say a project
builds its own library and afterwards perl bindings for it. If
LIBS is for example set to '-L.. -lmylib', MakeMaker will transform
the relative path into an absolute one and put it in LD_RUN_PATH,
thus in the shared object. But after a 'make install' both the
library and the so get copied to a different location.

This might also have some security implications, as many packages
get built in locations like /tmp, so it is bad if the rpath contains
something in /tmp.

My workaround was to misuse OTHERLDFLAGS to specify the library,
but this is not a nice solution.

Any comments/ideas?


Michael Schroeder 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About