misc/55387: users LD_LIBRARY_PATH can interfere with mail buildworld

Peter Pentchev roam at ringlet.net
Tue Aug 26 03:30:20 PDT 2003


The following reply was made to PR misc/55387; it has been noted by GNATS.

From: Peter Pentchev <roam at ringlet.net>
To: "William D. Colburn (aka Schlake)" <wcolburn at mailhost.nmt.edu>
Cc: bug-followup at FreeBSD.org
Subject: Re: misc/55387: users LD_LIBRARY_PATH can interfere with mail buildworld
Date: Thu, 28 Aug 2003 17:18:10 +0300

 On Fri, Aug 08, 2003 at 10:23:33AM -0600, William D. Colburn (aka Schlake) wrote:
 > 
 > >Number:         55387
 > >Category:       misc
 > >Synopsis:       users LD_LIBRARY_PATH can interfere with mail buildworld
 > >Arrival-Date:   Fri Aug 08 09:30:16 PDT 2003
 > >Originator:     William D. Colburn (aka Schlake)
 > >Release:        FreeBSD 4.8-STABLE i386
 [snip]
 > >Fix:
 > 
 > Not having /usr/local/lib in your LD_LIBRARY_PATH is one fix, but I
 > think that the /usr/src/ build tree shouldn't get confused by things in
 > /usr/local/lib.  It probably shouldn't be using the users
 > LD_LIBRARY_PATH at all.
 
 Could you try the attached patch?  The first one is for -STABLE (the one
 referencing Makefile.inc1 rev. 1.141.2.63), the second one is for
 -CURRENT (Makefile.inc1 rev. 1.385).
 
 Offhand, I can't think of any reason for actually using the LD_LIBRARY_PATH
 value in the environment.  Of course, once we go down that road, there
 is LD_PRELOAD next, and then lots and lots of other environment variables
 influencing the compiler, the linker, make(1) itself, and whatnot, but
 still, IMHO LD_LIBRARY_PATH is indeed one variable that should be cleared.
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam at ringlet.net    roam at sbnd.net    roam at FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 I've heard that this sentence is a rumor.
 
 ============== cut here for the patch to -STABLE
 
 Index: src/Makefile.inc1
 ===================================================================
 RCS file: /home/ncvs/src/Makefile.inc1,v
 retrieving revision 1.141.2.63
 diff -u -r1.141.2.63 Makefile.inc1
 --- src/Makefile.inc1	12 Jul 2003 23:25:29 -0000	1.141.2.63
 +++ src/Makefile.inc1	28 Aug 2003 13:42:59 -0000
 @@ -181,12 +181,14 @@
  		PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 \
  		GROFF_BIN_PATH=${WORLDTMP}/usr/bin \
  		GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \
 -		GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac
 +		GROFF_TMAC_PATH=${WORLDTMP}/usr/share/tmac \
 +		LD_LIBRARY_PATH=
  
  # bootstrap-tool stage
  BMAKEENV=	MAKEOBJDIRPREFIX=${WORLDTMP} \
  		DESTDIR= \
 -		INSTALL="sh ${.CURDIR}/tools/install.sh"
 +		INSTALL="sh ${.CURDIR}/tools/install.sh" \
 +		LD_LIBRARY_PATH=
  BMAKE=		${BMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING \
  		-DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED \
  		-DNO_WERROR
 @@ -194,7 +196,8 @@
  # build-tool stage
  TMAKEENV=	MAKEOBJDIRPREFIX=${OBJTREE} \
  		DESTDIR= \
 -		INSTALL="sh ${.CURDIR}/tools/install.sh"
 +		INSTALL="sh ${.CURDIR}/tools/install.sh" \
 +		LD_LIBRARY_PATH=
  TMAKE=		${TMAKEENV} ${MAKE} -f Makefile.inc1 -DBOOTSTRAPPING
  
  # cross-tool stage
 
 ====================== end of the patch for -STABLE
 
 ====================== cut here for the patch for -CURRENT
 
 Index: src/Makefile.inc1
 ===================================================================
 RCS file: /home/ncvs/src/Makefile.inc1,v
 retrieving revision 1.385
 diff -u -r1.385 Makefile.inc1
 --- src/Makefile.inc1	25 Aug 2003 18:30:06 -0000	1.385
 +++ src/Makefile.inc1	28 Aug 2003 13:51:26 -0000
 @@ -202,14 +202,16 @@
  		CPUTYPE=${TARGET_CPUTYPE} \
  		GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
  		GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
 -		GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
 +		GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac \
 +		LD_LIBRARY_PATH=
  
  # bootstrap-tools stage
  BMAKEENV=	DESTDIR= \
  		INSTALL="sh ${.CURDIR}/tools/install.sh" \
  		PATH=${BPATH}:${PATH} \
  		WORLDTMP=${WORLDTMP} \
 -		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
 +		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
 +		LD_LIBRARY_PATH=
  BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
  		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
  		BOOTSTRAPPING=${OSRELDATE} \
 
 =========================== end of the patch for -CURRENT


More information about the freebsd-bugs mailing list