From owner-freebsd-current Wed Sep 2 12:02:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA12881 for freebsd-current-outgoing; Wed, 2 Sep 1998 12:02:49 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from gratis.grondar.za (gratis.grondar.za [196.7.18.65]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA12865 for ; Wed, 2 Sep 1998 12:02:43 -0700 (PDT) (envelope-from mark@grondar.za) Received: from grondar.za (IDENT:P9+2fO4blRM21ZYVWZMrIia5iPmZUqqh@localhost [127.0.0.1]) by gratis.grondar.za (8.9.1/8.9.1) with ESMTP id VAA02093; Wed, 2 Sep 1998 21:01:18 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <199809021901.VAA02093@gratis.grondar.za> To: John Polstra cc: current@FreeBSD.ORG Subject: Re: B CURRENT Build environment (Was: Re: Why no ldconfig for ELF?) Date: Wed, 02 Sep 1998 21:01:17 +0200 From: Mark Murray Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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