[csw-maintainers] X11 linkage problem strategy

Dagobert Michelsen dam at opencsw.org
Tue Nov 3 16:35:17 CET 2009


Hi,

there is a problem related to linkage against the new OpenCSW X11  
libraries.
The error is seen as undefined symbol XSolarisIASetProcessInfo as in  
here:

> configure:19228: /opt/studio/SOS11/SUNWspro/bin/cc -o conftest -xO3 - 
> xarch=v8 -I/opt/csw/X11/include -I/opt/csw/include -I/opt/csw/ 
> include/gtk-1.2 -I/opt/csw/include/glib-1.2 -I/opt/csw/lib/glib/ 
> include -I/opt/csw/X11/include -I/opt/csw/include -xarch=v8 -L/opt/ 
> csw/lib -L/opt/csw/X11/lib conftest.c -L/opt/csw/lib -lgtk -lgdk - 
> lgmodule -lglib -ldl -lXi -lXext -lX11 -lsocket -lnsl -lm  >&5
> Undefined                       first referenced
>  symbol                             in file
> XSolarisIASetProcessInfo            /lib/libX11.so.4
> ld: fatal: Symbol referencing errors. No output written to conftest

The problem is caused by programs linking to CSW libXext first and  
then later to
Solaris libX11 which also needs libXext. As the provided dependency  
libXext.so.0
is already provided by CSW libXext the already bound one is used -  
unfortunately
it does not have the needed symbol in it.

The easy workaround of adding Solaris libXext explicitly by adding
   EXTRA_LINKER_FLAGS = /usr/openwin/lib/libXext.so
to the Makefile may or may not work. It does explicitly not work if
the CSW libXext is also pulled in:

> configure:19228: /opt/studio/SOS11/SUNWspro/bin/cc -o conftest -xO3 - 
> xarch=v8 -I/opt/csw/X11/include -I/opt/csw/include -I/opt/csw/ 
> include/gtk-1.2 -I/opt/csw/include/glib-1.2 -I/opt/csw/lib/glib/ 
> include -I/opt/csw/X11/include -I/opt/csw/include -xarch=v8 -L/opt/ 
> csw/lib -L/opt/csw/X11/lib /usr/openwin/lib/libXext.so conftest.c -L/ 
> opt/csw/lib -lgtk -lgdk -lgmodule -lglib -ldl -lXi -lXext -lX11 - 
> lsocket -lnsl -lm  >&5
> ld: fatal: recording name conflict: file `/usr/openwin/lib/ 
> libXext.so' and file `/opt/csw/X11/lib/libXext.so' provide identical  
> dependency names: libXext.so.0  (possible multiple inclusion of the  
> same file)

Maybe someone has a good solution on how to cope this in the general  
case.
Of course the trivial one would be to recompile everything needing x11
against the CSW libs, which would pull in loads of stuff even if the
Solaris library would be sufficient.


Best regards

   -- Dago



More information about the maintainers mailing list