LD_LIBRARY_PATH

Daniel Kegel dank@kegel.com
Mon Feb 16 19:49:00 GMT 2004


Joachim Eibl wrote:
> Crosstool is cool, and worked for me. I just want to return 2 bits of my 
> experience:
> 
> 1) Before starting crosstool my LD_LIBRARY_PATH was set to:
> /opt/kdecvs/lib:/opt/kdecvs/lib:/opt/kdecvs/lib:
> 
> The following configure command failed:
> /home/joachim/Documents/crosstool-0.27/build/mipsel-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/glibc-2.3.2/configure 
> --host=mipsel-unknown-linux-gnu --prefix=/usr --build=i686-pc-linux-gnu 
> --without-cvs --disable-sanity-checks 
> --with-headers=/home/joachim/Documents/crosstool-0.27/result/mipsel-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/mipsel-unknown-linux-gnu/include 
> --enable-hacker-mode
> 
> checking LD_LIBRARY_PATH variable... contains current directory
> configure: error:
> *** LD_LIBRARY_PATH shouldn't contain the current directory when
> *** building glibc. Please change the environment variable
> *** and run configure again.
> 
> When I unset the LD_LIBRARY_PATH everything works fine. But as you see the 
> current path "." was not in my LD_LIBRARY_PATH at the start, but set so 
> somewhere by the scripts.

That's a glibc issue, really.  (And you're not the first to bump into it:
http://sources.redhat.com/ml/crossgcc/2003-10/msg00064.html)
I've added the following change to crosstool.sh that should help:

--- crosstool-0.28-pre2/crosstool.sh    2004-01-31 22:15:35.000000000 -0800
+++ crosstool-0.28-cur/crosstool.sh     2004-02-16 10:44:34.000000000 -0800
@@ -37,6 +37,8 @@

  test -z "${KERNELCONFIG}" || test -r "${KERNELCONFIG}"  || abort  "Can't read file KERNELCONFIG = $KERNELCONFIG, please fix."

+test -z "${LD_LIBRARY_PATH}" || abort  "glibc refuses to build if LD_LIBRARY_PATH is set.  Please unset it before running this script."
+
  # And one is derived.
  GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`



> 2) After the build finished I had a hard time figuring out, where the results 
> were. In subdir "result". (It's so obvious, once you know.) 
> 
> You might want to add these infos to your HOWTO-documentation. 

I've added the following change to crosstool.sh that should help:

--- crosstool-0.28-pre2/crosstool.sh    2004-01-31 22:15:35.000000000 -0800
+++ crosstool-0.28-cur/crosstool.sh     2004-02-16 10:40:22.000000000 -0800
@@ -374,6 +374,6 @@
  test -x ${PREFIX}/bin/${TARGET}-gcc || Build failed during final gcc

  #---------------------------------------------------------
-echo Cross-toolchain build complete.
+echo Cross-toolchain build complete.  Result in ${PREFIX}.
  exit 0

Plus I've changed demo.sh to run demo-*.sh, which chooses
/opt/crosstool as the destination, which might be more intuitive.

How's that look?
- Dan

p.s. my wrists feel a touch better after a weekend of rest, so I'm
risking a bit of work on crosstool.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list