[GRASSLIST:3957] Re: error while loading shared libraries

Ulrich Leopold uleopold at science.uva.nl
Tue Jun 25 16:35:45 EDT 2002


Yes, I think it is a link problem in the binary driver. And I am running 
RedHat Linux 7.2 with grass5.0.0pre3. Unfortunately I acannot run 
ldconfig as a user. The library version I have is:

lrwxrwxrwx    1 root     root           14 May 13 14:06 libgd.so.1 -> 
libgd.so.1.8.4
lrwxrwxrwx    1 root     root           14 May 13 14:06 libgd.so.1.8 -> 
libgd.so.1.8.4
-rwxr-xr-x    1 root     root       196866 Aug 13  2001 libgd.so.1.8.4


What would you suggest as a good solution?

Regards, Ulrich

Glynn Clements wrote:
> Markus Neteler wrote:
> 
> 
> Markus Neteler wrote:
> 
> 
>>>         libgd.so => not found
>>
>              ^^^^^^^^
> 
>>Note that this is a local misconfiguration which is not related to GRASS.
> 
> 
> Actually, it's a problem with the PNG driver binary. The reference
> should include the major version number, e.g. libgd.so.1.
> 
> This problem normally arises from linking against a shared library
> which was built by someone who doesn't know how to build shared
> libraries correctly (unfortunately, the GD developers appear to fall
> into this category, judging from the GD 2.0.x Makefile).
> 
> 
>>Excluding /usr/lib and /usr/local/lib from LD_LIBRARY_PATH will also
>>cause problems for other programs.
> 
> 
> /usr/lib should not be present in $LD_LIBRARY_PATH, and it's debatable
> whether /usr/local/lib should be present (but, if it isn't present, it
> would need to be in /etc/ld.so.conf instead).
> 
> On Linux, the directories in $LD_LIBRARY_PATH are searched *before*
> the linker consults /etc/ld.so.cache. For maximum efficiency,
> LD_LIBRARY_PATH should be as short as possible, preferably empty.
> 
> Directories which should always be checked for libraries should be
> listed in /etc/ld.so.conf. This is used by "ldconfig" to generate
> ld.so.cache. The loader uses ld.so.cache to locate libraries, but only
> after searching $LD_LIBRARY_PATH.
> 
> Obtaining an entry from ld.so.cache takes constant time, whereas
> searching $LD_LIBRARY_PATH takes longer as more directories are added
> to it. This is why it should normally be empty.
> 
> The main reasons for using LD_LIBRARY_PATH are:
> 
> 1. Where a normal user, who can't modify the loader's configuration,
> needs to use additional library directories.
> 
> 2. When additional library directories are necessary in specific
> contexts. E.g. $GISBASE/lib is added to LD_LIBRARY_PATH by the GRASS
> startup script; the libraries found there aren't useful outside of
> GRASS.
> 
> 3. When you have multiple versions of a library, and you want to force
> the use of a specific version at run time (e.g. on my system, the
> default libGL is the one from XFree86, but I might set LD_LIBRARY_PATH
> to force the use of Mesa's libGL if I want a "second opinion"
> regarding unexpected behaviour).
> 


-- 
__________________________________________________

Ulrich Leopold MSc.

Department of Physical Geography
Institute for Biodiversity and Ecosystem Dynamics
Faculty of Science
University of Amsterdam
Nieuwe Achtergracht 166
NL-1018WV Amsterdam

Phone: +31-(0)20-525-7456 (7451 Secretary)
Fax:   +31-(0)20-525-7431
Email: uleopold at science.uva.nl
http://www.frw.uva.nl/soil/Welcome.html

Check us also out at:
Netherlands Centre for Geo-ecological Research
http://www.frw.uva.nl/icg




More information about the grass-user mailing list