Re: gobject build broken



James Henstridge writes:
 > I was just trying to build glib HEAD again, and ran into some build
 > trouble with the following error message:
 >   libtool: link: error: cannot link shared libraries into libtool libraries

 > Tor's latest patch to gobject/Makefile.am (rev 1.26) adds the following:
 >   libgobject_1_3_la_LIBADD = $(libglib)

 > Which ends up dynamically linking one dyanmic libtool library to another,
 > which libtool-1.3.x doesn't like.  This works with the CVS version of
 > libtool, so my question is whether we are going to require it for glib and
 > gtk+ builds now.

And if requiring a bleeding-edge libtool is not considered a good
idea, I guess something like this would fix this problem. I.e. use the
libtool library for LIBADDs on Win32 platforms only.

Index: gmodule/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/gmodule/Makefile.am,v
retrieving revision 1.26
diff -u -2 -r1.26 Makefile.am
--- gmodule/Makefile.am	2001/03/09 21:33:23	1.26
+++ gmodule/Makefile.am	2001/03/10 10:23:34
@@ -36,4 +36,5 @@
 
 if PLATFORM_WIN32
+libadd_libglib = $(libglib)
 no_undefined = -no-undefined
 endif
@@ -48,15 +49,13 @@
 	-export-dynamic $(no_undefined) $(export_symbols)
 
-libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
-# we should really depend on $(libglib) for libgmodule.la, but libtool has a
-# problem with this ;( Ummm? Does it?
+libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libadd_libglib)
 
 libgplugin_a_la_SOURCES = libgplugin_a.c
 libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
-libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
+libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libadd_libglib)
 
 libgplugin_b_la_SOURCES = libgplugin_b.c
 libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
-libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib)
+libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libadd_libglib)
 
 noinst_PROGRAMS = testgmodule
Index: gobject/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/gobject/Makefile.am,v
retrieving revision 1.26
diff -u -2 -r1.26 Makefile.am
--- gobject/Makefile.am	2001/03/09 21:39:50	1.26
+++ gobject/Makefile.am	2001/03/10 10:23:34
@@ -30,5 +30,8 @@
 	-export-dynamic $(no_undefined) $(export_symbols)	\
 @STRIP_END@
+
+if PLATFORM_WIN32
 libgobject_1_3_la_LIBADD = $(libglib)
+endif
 
 #
Index: gthread/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/gthread/Makefile.am,v
retrieving revision 1.20
diff -u -2 -r1.20 Makefile.am
--- gthread/Makefile.am	2001/03/09 21:41:37	1.20
+++ gthread/Makefile.am	2001/03/10 10:23:34
@@ -26,4 +26,5 @@
 
 if PLATFORM_WIN32
+libadd_libglib = $(libglib)
 no_undefined = -no-undefined
 endif
@@ -37,5 +38,5 @@
 	-export-dynamic $(no_undefined) $(export_symbols)
 
-libgthread_1_3_la_LIBADD = @G_THREAD_LIBS_EXTRA@ @G_THREAD_LIBS@ $(libglib)
+libgthread_1_3_la_LIBADD = @G_THREAD_LIBS_EXTRA@ @G_THREAD_LIBS@ $(libadd_libglib)
 
 gthread.rc: $(top_builddir)/config.status $(top_srcdir)/gthread/gthread.rc.in
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/tests/Makefile.am,v
retrieving revision 1.32
diff -u -2 -r1.32 Makefile.am
--- tests/Makefile.am	2001/03/09 21:43:36	1.32
+++ tests/Makefile.am	2001/03/10 10:23:34
@@ -1,6 +1,2 @@
-if PLATFORM_WIN32
-no_undefined = -no-undefined
-endif
-
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule @GLIB_DEBUG_FLAGS@
 
@@ -12,4 +8,9 @@
 libgobject = $(top_builddir)/gobject/libgobject-1.3.la
 
+if PLATFORM_WIN32
+libadd_libglib = $(libglib)
+no_undefined = -no-undefined
+endif
+
 EXTRA_DIST = \
 	$(test_scripts)		\
@@ -91,9 +92,9 @@
 libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
 libmoduletestplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
-libmoduletestplugin_a_la_LIBADD = @G_MODULE_LIBS@ $(libgmodule) $(libglib)
+libmoduletestplugin_a_la_LIBADD = @G_MODULE_LIBS@ $(libgmodule) $(libadd_libglib)
 
 libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
 libmoduletestplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
-libmoduletestplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libgmodule) $(libglib)
+libmoduletestplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libgmodule) $(libadd_libglib)
 
 makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/tests/makefile.mingw.in





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