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

MakeMaker problems with rpath setting

Thread Next
From:
Michael Schroeder
Date:
November 30, 2005 07:07
Subject:
MakeMaker problems with rpath setting
Message ID:
20051130135122.GA20923@immd4.informatik.uni-erlangen.de

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?

Thanks,
  Michael.

-- 
Michael Schroeder           mlschroe@informatik.uni-erlangen.de
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About