[GRASS5] Debian and d.m/d.zoom bug - /etc/ld.so.conf

Glynn Clements glynn at gclements.plus.com
Sat Dec 4 15:21:56 EST 2004


Paul Kelly wrote:

> >> I was thinking if we
> >> need to pass on an already existing LD_LIBRARY_PATH, it needs to be
> >> evaluated before xterm is run as that is what unsets it.
> >
> > Yes. One option would be to copy it to a separate variable, e.g.:
> >
> > 	set env(saved_lib_path) $env(LD_LIBRARY_PATH)
> > 	exec xterm -e ...
> >
> > and have grass-run.sh restore it from that. Although that requires the
> > Tcl/Tk code to know about the platform-specific variable names.
> >
> > Another option would be to dump the entire environment to a file and
> > have grass-run.sh restore it.
> 
> Well as I understand it everything else will be preserved: it is just 
> LD_LIBRARY_PATH that is unset; is that right?

There are a couple of other LD_* variables which are unset, e.g. 
LD_PRELOAD.

> What about just setting another variable in Init.sh? After the correct 
> LD_LIBRARY_PATH for the GRASS session has been determined and set,
> copy it also to GRASS_LD_LIBRARY_PATH. That wouldn't be unset by xterm and
> then it could be restored to LD_LIBRARY_PATH in the script.

Agreed. Although this doesn't entirely solve the issue of
platform-specific variable names, it removes it from the Tcl/Tk code.

> Although I
> suppose if the user changed their LD_LIBRARY_PATH after starting the GRASS 
> session something might be missing, but that would probably be quite unlikely.

We don't need to support that. The user can always change
GRASS_LD_LIBRARY_PATH if they really need to.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list