Subject: Re: dynamic linking slightly broken?
To: None <christos@deshaw.com>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: current-users
Date: 01/28/1994 08:44:34
> 
> I just rebuild the whole x-tree and now I get:
> 
> ld.so: Undefined symbol "_XtCvtStringToFont" in /usr/X386/lib/libXmu.so.4.10
> 
> This happens in all the clients that include -lXmu but not -lXt.
> XtCvtStringToFont() is defined in Xt and used in Xmu, but the
> routine is not referenced, since all clients link statically fine.
> 

This is a pecularity of the of the dynamic linking scheme: it wants to resolve
all "non-function call" relocations at program start-up. In this case,
_XtCvtStringToFont is used as an argument to another function within libXmu.

> Any fixes?

You can fix it invisibly to users by linking libXmu.so with an "-lXt" added.
This will cause libXt.so to be loaded at run-time. Note that when you do this,
you won't be able to mix static and dynamic linking of the libraries concerned;
ie. something like "ld ... -lXmu -Bstatic -lXt ..." will get you the dynamic
version of libXt. This is a linker bug.

-pk

------------------------------------------------------------------------------