Date: Wed, 02 Sep 1998 21:01:17 +0200 From: Mark Murray <mark@grondar.za> To: John Polstra <jdp@polstra.com> Cc: current@FreeBSD.ORG Subject: Re: B CURRENT Build environment (Was: Re: Why no ldconfig for ELF?) Message-ID: <199809021901.VAA02093@gratis.grondar.za>
next in thread | raw e-mail | index | archive | help
John Polstra wrote: > > lib/auto/POSIX/POSIX.so: > > LD_RUN_PATH=\"${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib\" \ > > sh ext/util/make_ext dynamic ${.TARGET} \ > > MAKE=make PERL_SRC=${.OBJDIR} > > > > The line beginning LD_RUN_PATH is the critical bit; I need to pass > > the current _build_ directory containing the ELF libraries (this system > > is currently a.out). What is the right way to do this? The above does not > > work, as ${WORLDTMP} is not set here, only in /usr/src/Makefile.inc1. > > In general, you want to set LD_RUN_PATH to the directories where > needed shared libraries will be found after they are installed into > their final resting places. If you need to use the libraries before > they are installed, it's best to use LD_LIBRARY_PATH to say where > they are at that point in time. I screwed up something - the LD_RUN_PATH above is the wrong one but I still need to tell the linker what library path to link against; it defaults to "/usr/lib/aout:/usr/lib". That is correct for runtime, but not for link time. IE: In an earlier part of the build, the following linked correctly: cc -O -pipe -I/usr/obj/elf/usr/src/gnu/usr.bin/perl5/miniperl -I/usr/src/gnu/usr.bin/perl5/miniperl/../../../../contrib/perl5 -static -I/usr/obj/elf/usr/src/tmp/usr/include -o miniperl miniperlmain.o -L/usr/obj/elf/usr/src/gnu/usr.bin/perl5/miniperl/../libperl -lperl -lm -lcrypt In my makefile fragment (above, quoted), it fails, because a needed lib (-lm) in /usr/lib/aout is not ELF, because the necessary environment info is not being passed. I want to specify what lib dirs to search in, but I do not know where that is available from (Macro? Script? ENV?). WORLDTMP looks promising, but it is not visible in the makefile I am using. (I'm asking dumb questions because it takes an hour to find out how wrong I am each time :-) ) M -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809021901.VAA02093>