Apache OpenOffice (AOO) Bugzilla – Issue 7701
bogus clobbering of PATH and LD_LIBRARY_PATH (patch)
Last modified: 2003-03-16 20:15:00 UTC
We clobber the users' PATH / LD_LIBRARY_PATH, and proceed to try and construct these accurately for their system out of thin air. This can badly confuse compiler / ccache paths / aliases, and there's no need to do it. Especially bad is including random directories such as '/usr/local' and explicitely including gcc's include dir and /usr/include. This removes some of these, and paves the way to more shared code between platforms, reducing the size of the configure scripts - that is, assuming people can set their paths right [ which they have to anyway ].
Attaching files seems to cause an 'internal server error or mis ...' so: inline: Index: set_soenv.in =================================================================== RCS file: /cvs/tools/config_office/set_soenv.in,v retrieving revision 1.1.4.4 diff -u -p -u -r1.1.4.4 set_soenv.in --- config_office/set_soenv.in 10 Sep 2002 17:41:11 -0000 1.1.4.4 +++ config_office/set_soenv.in 11 Sep 2002 09:26:44 -0000 @@ -924,10 +924,10 @@ elsif (($platform eq "$Linux") || ($plat $ps.$JRELIBDIR. $ps.$JRETOOLKITDIR. $ps.$JRETHREADDIR. - $ps.$USR_LOCAL.$LIB. $ps.$par_dir.$LIB. $ps_STLPORT_LIB. - $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB; + $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB. + $ps.$ENV{'LD_LIBRARY_PATH'}; } elsif ($platform eq "$FreeBSD") { $LD_LIBRARY_PATH = $cur_dir. @@ -1003,23 +1003,19 @@ if ($platform eq "$Solaris") $L.$USR_DT.$LIB. $L.$USR_OPENWIN.$LIB; } -elsif (($platform eq "$Linux") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) -{ $SOLAREXTRALIB = $L.$par_dir.$LIB. - $L.$LIB. - $L.$USR.$LIB. - $L.$USR.$LOCAL.$LIB; +elsif (($platform eq "$Linux") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || + ($platform eq "$Irix") || ($platform eq "$Irix64") || ($platform eq "$FreeBSD")) +{ + $SOLAREXTRALIB = $L.$par_dir.$LIB; } elsif ($platform eq "$Macosx") { $SOLAREXTRALIB = $L.$LIB. $L.$USR.$LIB; } -elsif ($platform eq "$FreeBSD") -{ - $SOLAREXTRALIB = $L.$par_dir.$LIB; -} # Compiler include search directory paths. -if (($platform eq "$Solaris") || ($platform eq "$Linux") || ($platform eq "$FreeBSD") || ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) +if (($platform eq "$Solaris") || ($platform eq "$Linux") || ($platform eq "$FreeBSD") || + ($platform eq "$NetBSD") || ($platform eq "$Tru64") || ($platform eq "$Irix") || ($platform eq "$Irix64")) { $SOLARINCLUDES = $I.'$SOLARENV'.$INC; } elsif ($platform eq "$Winnt") @@ -1082,18 +1078,10 @@ if ($platform eq "$Solaris") } $PATH .= GetCorrectPath($COMPATH.$BIN, $PERL_PATH, $TCSH_PATH, $compiler); - - $PATH .= $ps.$USR.$ds."sbin". - $ps.$ETC. - $ps.$USR.$BIN.$ds."X11". - $ps.$USR.$ds."X11".$BIN. - $ps.$OPT.$ds."langtools".$BIN. - $ps.$USR_OPENWIN.$BIN. - $ps.$USR_DT.$BIN. - $ps.$USR.$LIB. - $ps.$USR_LOCAL.$BIN; + $PATH .= $ps.$oldPATH; } -elsif (($platform eq "$Linux") or ($platform eq "$NetBSD") or ($platform eq "$Tru64") or ($platform eq "$Irix") or ($platform eq "$Irix64")) +elsif (($platform eq "$Linux") or ($platform eq "$NetBSD") or ($platform eq "$Tru64") or + ($platform eq "$Irix") or ($platform eq "$Irix64") or ($platform eq "$FreeBSD")) { $PATH = $cur_dir. $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN. @@ -1104,30 +1092,8 @@ elsif (($platform eq "$Linux") or ($plat $PATH .= $ps.'$JAVA_HOME'.$BIN; } - $PATH .= GetCorrectPath($COMPATH, $PERL_PATH, $TCSH_PATH, $compiler); - - $PATH .= $ps.$USR.$ds."sbin". - $ps.$ETC. - $ps.$USR.$BIN.$ds."X11". - $ps.$USR.$ds."X11".$BIN. - $ps.$USR.$LIB; + $PATH .= $ps.$oldPATH; } -elsif ($platform eq "$FreeBSD") -{ $PATH = $cur_dir. - $ps.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$BIN. - $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN. - $ps.'$SOLARENV'.$BIN. - $ps.'$JAVA_HOME'.$BIN. - $ps.$USR_LOCAL.$BIN. - $ps.$USR_LOCAL.$ds."sbin"; - - $PATH .= GetCorrectPath($COMPATH, $PERL_PATH, $TCSH_PATH, $compiler); - - $PATH .= $ps.$USR.$ds."sbin". - $ps.$USR.$ds."X11R6".$ds."bin". - $ps.$USR.$LIB; -} - elsif ($platform eq "$Winnt") { my ( $noldPATH ); @@ -1242,9 +1208,6 @@ elsif (($platform eq "$Linux") || ($plat $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. $L.'$SOLARVER'.$ds.'$UPD'.$ds.'$INPATH'.$LIB. $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. - $L.$LIB. - $L.$USR_LIB. - $L.$USR_LOCAL.$LIB. $L.'$JAVA_HOME'.$LIB. $L.$JRELIBDIR. $L.$JRETOOLKITDIR. @@ -1350,9 +1313,7 @@ else #The tail, if needed if (($platform eq "$Linux") or ($platform eq "$FreeBSD") or ($platform eq "$NetBSD")) -{ $SOLARINC .= $I.$XINC. - $I.$GCC_INCLUDE. - $I.$USR.$INCLUDE; +{ $SOLARINC .= $I.$XINC; } elsif ($platform eq "$Tru64") { $SOLARINC .= $I.$XINC.
IN order for this to work with gcc 2.95 you also have to apply this patch: Index: unxlngi3.mk =================================================================== RCS file: /cvs/oo/tools/solenv/inc/unxlngi3.mk,v retrieving revision 1.17 diff -r1.17 unxlngi3.mk 87,90d86 < # name of C++ Compiler < CC=g++ < # name of C Compiler < cc=gcc 92,96d87 < # do not use standard header search paths < # if installed elsewhere < .IF "$(BUILD_SOSL)"!="" < CFLAGS=-nostdinc < .ENDIF
Created attachment 2877 [details] 643 version of the patch..
Created attachment 2904 [details] Please apply this patch to unbreak gcc 2.95
just need to clarify: has patch id=2877 been comitted, but id=2904 not?
That is correct, please apply this patch.
patches are on SRX643_OO branch
Sadly; while the LD_LIBRARY_PATH brokenness got fixed; you seem to have entirely missed the (more important) 'PATH' fixing aspect; which remains un-committed. I attach the remainder, that stops the PATH being clobbered [ interestingly we now have two cases for FreeBSD path setup, but neither does not clobber ;-] most odd:
Created attachment 2940 [details] don't clobber the path patch
Applied patch to SRX643_OO only. Version 1.1.4.8
Thanks guys for nailing this, a big help.
As discussed with Armin, he thought these bug were closed, he sees all of them as verified.