On Thu, Dec 29, 2005 at 10:16:41PM +0100, Honza Pazdziora wrote: > On Thu, Dec 29, 2005 at 05:56:51PM +0000, Tim Bunce wrote: > > > > when running that make test, and better yet, by using > > > > > > LD_RUN_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib > > > > > > (or equivalent) when making the library. > > > > Yes, having the Makefile set LD_RUN_PATH for the link would suit most > > people most of the time. > > And indeed, the LD_RUN_PATH is set in the Makefile by > ExtUtils::MakeMaker, it just seems to have no effect on the $(LD) > section. Anybody knows why the LD_RUN_PATH value is not used?
Ah. This triggered an old memory: $ echo $LD_RUN_PATH $ cat Makefile LD_RUN_PATH=foo all: sh -xvc 'echo $$LD_RUN_PATH' $ make sh -xvc 'echo $LD_RUN_PATH' echo $LD_RUN_PATH + echo $ LD_RUN_PATH=bar make sh -xvc 'echo $LD_RUN_PATH' echo $LD_RUN_PATH + echo foo foo the LD_RUN_PATH=foo in the makefile is only exported into the environment if there's already an env var with the same name defined. Sigh. For gnu make we could add a line that says export LD_RUN_PATH but I don't know how portable that is to other makes. Can people with non-gnu make programs let me know if that's valid as a line in a makefile? > course, forcing it thru using > > -Wl,-rpath,/usr/lib/oracle/xe/... > > works but I assume it might break non-Linux (non-gcc) installations. It would, sadly, but at least we know when we're dealing with gcc so can add it only in that case. Is that option syntax valid for gcc v2.x? Can someone with gcc v2 check? Tim.