why is -lXaw3d not found by ldd?

David Tilbrook dt-hKuJ9UrQZDM at public.gmane.org
Tue Jan 27 00:40:59 UTC 2004


Tim Writer wrote:
> David Tilbrook <dt-hKuJ9UrQZDM at public.gmane.org> writes:
> 
> 
>>When linking xfig with the following arguments:
>>
>>	-L/usr/X11R6/lib -ljpeg -lpng -lz \
>>	-lXi -lXaw -lXmu -lXt -lSM -lICE -lXpm \
>>	-lXext -lXaw3d \
>>	-lX11 -lm
> 
> 
> This looks a little odd.  You're linking with Xaw and Xaw3d.  Shouldn't it be
> one or the other?
> 
> 
>>and then running ldd on the resulting binary I get (in part):
>>
>>	...
>>	libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4016b000)
>>	libXaw3d.so.7 => not found
> 
> 
> The Debian README for Xaw3d suggests that, at one time, libXaw3d.so was built
> with its soname set to libXaw.so instead of libXaw3d.so to make it easier to
> use as a builtin replacement for libXaw.  Apparently this causes problems and
> it's no longer built this way in Debian.  I wonder if this could be your
> problem on RH.  Running:
> 
>     objdump -p /usr/X11R6/lib/libXaw3d.so.7.0
> 
> will show you the soname and may give you a hint as to the problem.
> 

Thanks for the reference to objdump.

The interesting thing about this problem is that setting LD_LIBRARY_PATH
or explicitly giving a -R flag to the loader avoids the problem.

Why the -R flag should work whereas the -L flag works for all the other
solibs in the same directory raises questions.

-- dt

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list