Re: problem building from CVS tree under Solaris

Shaw Terwilliger (sterwill@postman.abisource.com)
Wed, 16 Jun 1999 11:33:46 -0500


Moses DeJong wrote:
> [...]
>
> make[3]: Leaving directory `/project/neon/users/mo/abi/src/tools/cdump/xp'
> /opt/gnu/bin/make ABI_ROOT=/project/neon/users/mo/abi/src/.. -C unix build
> make[3]: Entering directory `/project/neon/users/mo/abi/src/tools/cdump/unix'
> Building with [LicensedTrademarks:Off Debug:Off].
> Linking dynamic /project/neon/users/mo/abi/src/../src/SunOS_5.6_sparc32_OBJ/bin/cdump
> Undefined first referenced
> symbol in file
> g_static_mutex_get_mutex_impl /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_thread_functions_for_glib_use /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_static_private_get /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_thread_use_default_impl /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_static_private_set /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_threads_got_initialized /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> g_log /project/neon/users/mo/mozilla/install_solaris/lib/libgmodule.so
> ld: fatal: Symbol referencing errors. No output written to /project/neon/users/mo/abi/src/../src/SunOS_5.6_sparc32_OBJ/bin/cdump
> collect2: ld returned 1 exit status
> make[3]: *** [/project/neon/users/mo/abi/src/../src/SunOS_5.6_sparc32_OBJ/bin/cdump] Error 1
> make[3]: Leaving directory `/project/neon/users/mo/abi/src/tools/cdump/unix'
> make[2]: *** [build] Error 2
> make[2]: Leaving directory `/project/neon/users/mo/abi/src/tools/cdump'
> make[1]: *** [build] Error 2
> make[1]: Leaving directory `/project/neon/users/mo/abi/src/tools'
> make: *** [build] Error 2

To link an application with the GTK or GLIB libraries, we insert the
output of "glib-config --libs" into the link line. It's would be
something like:

cc -o application myobject.o thisobject.o thisrequiresgtk.o \
`gtk-config --libs` -lpng -lzlib -lm

gtk-config should be installed into a directory in your path when
you installed the GTK libraries. However, if you've installed two
different versions of GTK to different places on your system,
it's possible an old "gtk-config" is in your path before the new one.
gtk-config might represent the requirements of an older GTK (or GLIB)
installation and not the newer one. It's possible an older
implementation of gmodule didn't include those undefined symbols,
but a newer GTK or GLIB installation would have included an extra
library referenced by gtk-config (or glib-config). This is a rare
situation, but I've had it happen to me between upgrades that spanned
large revisions of GTK.

Another possibility is that mismatched versions of GLIB or GTK shared
libraries are in the linker's path. You might try doing a find for
libglib* libgmodule* libgdk* libgtk* and seeing if any competing
versions are around.

-- 
Shaw Terwilliger


This archive was generated by hypermail 1.03b2.