Re: GTK+ Compile error.




On Tue, 24 Nov 1998, Craige McWhirter wrote:
> Eveniong :)

Hello.

> 	Sorry to bug you with this, I've tried several mailing lists, 
> associates and #E. When compiling GTK+ I get the following error:
> 
> gcc -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -o .libs/testgtk \
>     testgtk.o -Wl,--rpath -Wl,/opt/gnome/lib .libs/libgtk.so     \
>     -Wl,--rpath -Wl,/opt/gnome/lib ../gdk/.libs/libgdk.so        \
>     -L/usr/X11R6/lib -lXext -lX11 -L/usr/X11R6/lib -lXext -lX11  \
>     -L/opt/gnome/lib -lglib -lm  
> .libs/libgtk.so: undefined reference to `g_module_supported'
> .libs/libgtk.so: undefined reference to `g_module_error'
> .libs/libgtk.so: undefined reference to `g_module_make_resident'
> .libs/libgtk.so: undefined reference to `g_module_close'
> .libs/libgtk.so: undefined reference to `g_module_name'
> .libs/libgtk.so: undefined reference to `g_module_symbol'
> .libs/libgtk.so: undefined reference to `g_module_open'
> make[2]: *** [testgtk] Error 1
> make[2]: Leaving directory `/usr/src/gnomecvs/gtk+/gtk'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/gnomecvs/gtk+'
> make: *** [all-recursive-am] Error 2
> 
> 	I've followed the tutorial to the letter, glib is in OK, all 
> the relevent variables are set. Over the last 3 weeks I have downloaded 
> GTK+ and glib several times and re-compiled them to no avail. 
> 	Any thoughts on what might be going down? 

It looks to me like your Makefile was incorrectly generated.  The
corresponding line in my make process is:

gcc -O6 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -o .libs/testgtk
testgtk.o -Wl,--rpath -Wl,/opt/gnome/lib .libs/libgtk.so -Wl,--rpath
-Wl,/opt/gnome/lib ../gdk/.libs/libgdk.so -L/usr/X11R6/lib -lXext
-lX11 -L/usr/X11R6/lib -lXext -lX11 -L/opt/gnome/lib -rdynamic
-lgmodule -lglib -ldl -lm

Note the "-lgmodule", this is where it find the functions its giving
you errors on.  in the gtk+ directory, if you do a
"grep GLIB_LIBS gtk/Makefile", you will probably see something like
   GLIB_LIBS = -L/opt/gnome/lib  -lglib
instead of
   GLIB_LIBS = -L/opt/gnome/lib -rdynamic -lgmodule  -lglib -ldl
(Obviously, if your prefix for glib was something other than
/opt/gnome, the -L parameter should reflect your glib directory).

To fix this, I would recommend reconfiguring gtk+.  First make sure
that glib is installed properly with "glib-config gmodule --libs".
You should get switches that look more like the second GLIB_LIBS line
than the first.  If it isn't, then you have to fix your glib installation
before proceeding, ask for more help if you need it.

Next, remove the config.cache file, and rerun 
"./autogen.sh --prefix=/opt/gnome" (or whatever you want your
autogen switches to be).  Then double check that it worked with the grep
command above.  If this doesn't work, than there is something wrong with
the autogen.sh process on your machine, ask for more help if you need it.


Best of Luck,
-Gleef



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