Re: glib 2.2.3/2.3.2 binary incompatibility



I wrote:
 > For ABI compatibility also that will have to be added (back) to
 > 2.4's gobject.def then.

I guess one way to eventually be able to get rid of those two entry
points being exported from the gobject DLL, would be to drop them from
the gobject import library (through some makefile acrobatics). This
means that applications that get built after these import libraries
get widely distributed, import these two functions from the glib DLL
where they actually are.

Then, after some years, perhaps one could assume that all glib-using
applications have been rebuilt at least once and replaced older
builds. Then remove the two functions from gobject.def?

Nah, too risky.

Still, just for cleanliness, it's probably a good idea to filter out
the incorrectly exported entries from gobject's import libraries (the
gcc and MS ones).

Suggested patch:

Index: gobject/Makefile.am
===================================================================
RCS file: /cvs/gnome/glib/gobject/Makefile.am,v
retrieving revision 1.56
diff -u -3 -r1.56 Makefile.am
--- gobject/Makefile.am	12 Sep 2003 20:33:31 -0000	1.56
+++ gobject/Makefile.am	4 Mar 2004 11:14:07 -0000
@@ -38,9 +38,15 @@
 if OS_WIN32
 export_symbols = -export-symbols $(srcdir)/gobject.def
 
-install-libtool-import-lib:
-	$(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir)
-	$(INSTALL) $(srcdir)/gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
+# Acrobatics to remove incorrectly exported entries from the import library
+# (Can't remove from DLL as that would break ABI.)
+
+libgobject-filtered-2.0.dll.a: gobject.filtered.def
+	dlltool --input-def gobject.filtered.def --output-lib libgobject-filtered-2.0.dll.a
+
+install-libtool-import-lib: libgobject-filtered-2.0.dll.a gobject.filtered.def
+	$(INSTALL) libgobject-filtered-2.0.dll.a $(DESTDIR)$(libdir)/libgobject-2.0.dll.a
+	$(INSTALL) gobject.filtered.def $(DESTDIR)$(libdir)/gobject-2.0.def
 
 uninstall-libtool-import-lib:
 	-rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def
@@ -213,8 +219,11 @@
 	$(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
 endif
 
-gobject-2.0.lib: libgobject-2.0.la gobject.def
-	lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
+gobject.filtered.def: gobject.def
+	grep -E -v '^[ 	]*(g_slist_remove_all|g_unichar_validate)$$' <gobject.def >$@
+
+gobject-2.0.lib: libgobject-2.0.la gobject.filtered.def
+	lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.filtered.def -out:$@
 
 dist-hook: $(BUILT_EXTRA_DIST)
 	files='$(BUILT_EXTRA_DIST)'; \

--tml





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