This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unsetting LD_LIBRARY_PATH


On Mon, 8 Nov 2004, Dan Kegel wrote:

> Robert P. J. Day wrote:
> >   just tried a build for sh3, the only change i made was to edit
> > sh3.dat and add the line:
> >
> > GLIBC_EXTRA_CONFIG="--without-fp"
> >
> >   then ran:
> >
> >   $ sh demo-sh3.sh
> >
> > eventually, i got:
> >
> > glibc refuses to build if LD_LIBRARY_PATH is set. Please unset it
> > before running  this script.
> >
> >   ok, so what's the accepted solution for this?  should one edit
> > sh3.dat and change that as well?  that seems kind of hacky.  i would
> > have thought the build process would take care of this sort of thing
> > automatically.  or have i overlooked something painfully trivial?
> > (yeah, probably).
>
> Could you give the command
>   env | LD
> and see if you already have LD_LIBRARY_PATH set.

of course, since i use it for other things.

> If you do, clear it with a command like
>   unset LD_LIBRARY_PATH
> before running the script.
>
> The script could clear that variable itself, but that would
> be a dirty trick, so I felt it was best to just tell the
> user their environment was unacceptable to glibc's build system.

now, i figured out right away that i could fix this by unsetting my
shell env variable.  but i really, really, really, *really* am not
keen on scripts or programs that require me to mess with my shell
environment.  if having an empty LD_LIBRARY_PATH is a requirement for
crosstool to work, then, in my opinion, it should take care of that
itself.  (i've had some local, real knock down arguments over just
this point.)

having the script clear that variable is, in no sense, a "dirty trick"
as long as it's not affecting the user's shell environment.  as an
alternative, i guess i could just run:

  $ LD_LIBRARY_PATH="" sh demo....

etc, etc.  but i'd much rather have the script do this for itself.

rday

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]