GNOME Bugzilla – Bug 155989
Patch to allow building on Cygwin
Last modified: 2004-12-22 21:47:04 UTC
The attached patch allows glibmm to build in a Cygwin environment by using the -no-undefined option for libtool (as for MinGW). The patch is against 2.4.4, but should apply equally well to the mainline. Note that it should be safe to use -no-undefined by default for all platforms, and may even have a small performance benefit, though this would need verifying. See http://thread.gmane.org/gmane.comp.gnu.libtool.general/3866 Regards, Roger
Created attachment 32854 [details] [review] Patch to enable -no-undefined This uses PLATFORM_WIN32, rather than OS_WIN32 for enabling -no-undefined. The win32_dlls_extra_libs which is also in the conditional may still require to be only used when OS_WIN32 is used, but I couldn't see any actual use of this variable--perhaps it should be removed?
win32_dlls_extra_libs is set to sublib_win32_dlls_libs when building dlls on win32. sublib_win32_dlls_libs is a list of explicit internal library dependencies. By internal library, I mean a library built earlier in the build process from the same source tarball. Example : To create the gtkmm DLL, there are external dependencies (libsigc++, glibmm) that are taken care of at configure time, and internal dependencies (gdkmm, atkmm and pangomm, all built in the gtkmm distribution and not installed yet) that are required to resolve the symbols in the gtkmm DLL (remember DLLs are like executables). As a result, in gtkmm/gtk/gtkmm/Makefile.am, one has the following line sublib_win32_dlls_libs = $(top_builddir)/gdk/gdkmm/libgdkmm-2.4.la \ $(top_builddir)/atk/atkmm/libatkmm-1.6.la \ $(top_builddir)/pango/pangomm/libpangomm-1.4.la For glibmm, there is no internal library dependency -> sublib_win32_dlls_libs and win32_dlls_extra_libs are virtually unused. But because we want to have identical build procedures between glibmm and gtkmm, I strongly suggest to keep these variables "as-is" in case some internal dependencies are added for glibmm.
Cedric, so does this patch look OK to you, or does it need to be change?
WRT the win32_dlls_extra_libs, this sounds like it's just as applicable for Cygwin as for MinGW, in which case the patch will be OK as is; it certainly built fine for me. I'm currently building Gtkmm, so I may have some patches for that over the next few days. Regards, Roger
Applied to HEAD then. I'll do gtkmm-2-4 later. I don't really understand when PLATFORM_WIN32 should be used, and when OS_WIN32, but I delegate all win32 things to Cedric. Roger, please patch the ChangeLog in future.
Applied to glibmm-2-4.