[GRASS5] Solaris GRASS 5.1, shared libraries, external PROJ

Glynn Clements glynn.clements at virgin.net
Thu Sep 18 12:42:31 EDT 2003


Radim Blazek wrote:

> > In order to run grass51, I needed to set LD_LIBRARY_PATH to find the shared
> > libraries in dist.$ARCH/lib and the external PROJ.4 lib.  This was not
> > mentioned in the INSTALL file.
> 
> This is done in etc/Init.sh:
> if [ ! "$LD_LIBRARY_PATH" ] ; then
>   LD_LIBRARY_PATH=$GISBASE/lib
>   export LD_LIBRARY_PATH
> else
>   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib
> fi
> 
> this section is identical to 5.0, but why it is exported only 
> in the first case, would not be better
> 
> if [ ! "$LD_LIBRARY_PATH" ] ; then
>   LD_LIBRARY_PATH=$GISBASE/lib
> else
>   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GISBASE/lib
> fi
> 
> export LD_LIBRARY_PATH

Yes; there is no point setting LD_LIBRARY_PATH if it isn't exported.

> and is it necessary to test if $LD_LIBRARY_PATH is defined,
> is it ':/some/path' error?

Potentially; I think that it's best to be safe.

Also, using shared libraries may cause problems for tcltkgrass when it
runs a program in an xterm. If xterm is setuid (which is common),
LD_LIBRARY_PATH may end up being unset automatically.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list