Problems compiling gtk-2.4 on Solaris 9



I've had nothing but problems attempting to compile gtk-2.4 on Solaris
9 (then again, I have nothing but problems trying to compile anything
on Solaris).

Currently, here are the packages I'm trying to install and the
relevant configure options...
glib-2.4.8       configure --enable-threads --with-libiconv=gnu
--prefix=/usr/local/gtk-2.4
atk-1.8.0        configure --prefix=/usr/local/gtk-2.4
pango-1.6.0    configure --prefix=/usr/local/gtk-2.4
gtk+-2.4.14     configure --prefix=/usr/local/gtk-2.4


for glib, atk, and pango, the configure flags were sufficient, and I
set my PKG_CONFIG_PATH env var to :
/usr/local/gtk-2.4/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/sfw/lib/pkgconfig:/usr/lib/pkgconfig

I'm using the libiconv, expat, and zlib packages from www.sunfreeware.com. 
It was necessary to set the CFLAGS env var to
"-I/usr/local/gtk-2.4/include/glib-2.0
-I/usr/local/gtk-2.4/lib/glib-2.0/include
-I/usr/local/gtk-2.4/include/atk-1.0
-I/usr/local/gtk-2.4/include/pango-1.0 -I/usr/sfw/include
-I/usr/sfw/include/freetype2" in order to get the freetype2
dependencies of gtk to resolve. This is Sun's freetype2, I'm not sure
which version. I tried compiling freetype 2.1.9 and linking against
that, but the Xsun header files didn't seem to work with it.

Everything seems to configure and compile without errors in this
configuration, but when I try to run any of various gtk utilities
(let's use gtk-demo for example), I get the following error:

[grega maul:/usr/local/gtk-2.4/bin] $ ./gtk-demo
ld.so.1: ./gtk-demo: fatal: relocation error: file
/usr/local/gtk-2.4/lib/libgtk-x11-2.0.so.0: symbol gdk_threads_lock:
referenced symbol not found
Killed
[grega maul:/usr/local/gtk-2.4/bin] $ 


Here's the output of ldd on gtk-demo, just to show that it is using
the version of gtk that I compiled, not the ones that are shipped as
part of Sun Gnome 2.0 Desktop which can be found in /usr/lib:

[grega maul:/usr/local/gtk-2.4/bin] $ ldd gtk-demo
        libgdk_pixbuf-2.0.so.0 =>       
/usr/local/gtk-2.4/lib/libgdk_pixbuf-2.0.so.0
        libgdk-x11-2.0.so.0 =>   /usr/local/gtk-2.4/lib/libgdk-x11-2.0.so.0
        libgtk-x11-2.0.so.0 =>   /usr/local/gtk-2.4/lib/libgtk-x11-2.0.so.0
        libXext.so.0 =>  /usr/lib/libXext.so.0
        libXft.so.2 =>   /usr/lib/libXft.so.2
        libfontconfig.so.1 =>    /usr/lib/libfontconfig.so.1
        libX11.so.4 =>   /usr/lib/libX11.so.4
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
libnsl.so.1 =>   /usr/lib/libnsl.so.1
libpangoxft-1.0.so.0 =>  /usr/local/gtk-2.4/lib/libpangoxft-1.0.so.0
libpangox-1.0.so.0 =>    /usr/local/gtk-2.4/lib/libpangox-1.0.so.0
libpango-1.0.so.0 =>     /usr/local/gtk-2.4/lib/libpango-1.0.so.0
libatk-1.0.so.0 =>       /usr/local/gtk-2.4/lib/libatk-1.0.so.0
libgobject-2.0.so.0 =>   /usr/local/gtk-2.4/lib/libgobject-2.0.so.0
libgmodule-2.0.so.0 =>   /usr/local/gtk-2.4/lib/libgmodule-2.0.so.0
libdl.so.1 =>    /usr/lib/libdl.so.1
        libglib-2.0.so.0 =>      /usr/local/gtk-2.4/lib/libglib-2.0.so.0
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libXrender.so.1 =>       /usr/sfw/lib/libXrender.so.1
        libexpat.so.0 =>         /usr/local/lib/libexpat.so.0
        libfreetype.so.6 =>      /usr/sfw/lib/libfreetype.so.6
        libXst.so.1 =>   /usr/openwin/lib/libXst.so.1
        libz.so.1 =>     /usr/local/lib/libz.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libpangoft2-1.0.so.0 =>  /usr/local/gtk-2.4/lib/libpangoft2-1.0.so.0
        libz.so.1 (SUNW_1.1) =>  (version not found)
        libicuuc.so.2 =>         /usr/lib/libicuuc.so.2
        libST.so.1 =>    /usr/lib/libST.so.1
        libstsf.so.1 =>  /usr/lib/ST/libstsf.so.1
        libicudata.so.2 =>       /usr/lib/libicudata.so.2
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libCrun.so.1 =>  /usr/lib/libCrun.so.1
        libdoor.so.1 =>  /usr/lib/libdoor.so.1
        libmd5.so.1 =>   /usr/lib/libmd5.so.1
        /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
        libthread.so.1 =>        /usr/lib/libthread.so.1
        /usr/platform/SUNW,Sun-Blade-100/lib/libmd5_psr.so.1
[grega maul:/usr/local/gtk-2.4/bin] $



And when I use nm to try to inspect the library that's being
complained about (/usr/local/gtk-2.4/lib/libgtk-x11-2.0.so.0), and
look for the undefined symbol, gdk_threads_lock, I get the following:

[grega maul:/usr/local/gtk-2.4/bin] $ nm
/usr/local/gtk-2.4/lib/libgtk-x11-2.0.so.0 | grep gdk_threads_lock
[20594] |         0|       0|NOTY |GLOB |0    |UNDEF  |gdk_threads_lock
[grega maul:/usr/local/gtk-2.4/bin] $


So it looks like my problem is that somehow in the compilation
process, gdk_threads_lock ends up UNDEF in the library. I originally
thought it was because I didn't use --enable-threads for the configure
of glib, but I added that and the symbol is still undefined.

Anyone have any ideas?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]