LD error. What does this mean?

Guy Harris guy at auspex.auspex.com
Thu Aug 16 06:45:39 AEST 1990


>But I have yet to solve this one: when I try to run some of my X
>applications I get "ld.so: libXaw.so.4: not found".
>There are two strange things about this.  One, version "4" doesn't exist
>and has never existed; I have versions "4.0", "4.3", and "4.4", but
>no "4".

The message is less than clear.  Perhaps it should say something such as

	"ld.so: libXaw: major version number 4 not found"

to indicate that it's not looking for "libXaw.so.4", but for anything
that matches "libXaw.so.4.*".

The idea is that the major version number should change if the library
changes in such a way that binaries linked with the old version will not
work with the new version, so that the program will only link up with
the old version (which, of course, you have to keep around). 

The minor version number should change if the library changes in wuch a
way that binaries linked with the new version won't (or may not, anyway)
work with the old one, but binaries linked with the old version will
still work with the new one, so that programs linked with the old
version can pick up the new one, but programs linked with the new one
will, at best, pick up the old one under duress.

>Two, when I run the exact same program under trace, the bloody
>thing works perfectly.

Is the program in question set-UID?  If so, is "libXaw" installed
somewhere other than "/usr/lib" or "/usr/local/lib"? If so, this isn't
surprising.  The run-time loader will *not* search outside the standard
directories for shared libraries if the effective and real user IDs (or,
I hope, group IDs) don't match, so as to forestall fraud.  When a
set-UID program is run under "trace" - or anything else that uses
"ptrace()" - the set-UIDness is ignored, again to forestall fraud.



More information about the Comp.lang.c mailing list