After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155989 - Patch to allow building on Cygwin
Patch to allow building on Cygwin
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: build
2.4.x
Other Windows
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-10-20 20:59 UTC by Roger Leigh
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to enable -no-undefined (658 bytes, patch)
2004-10-20 21:01 UTC, Roger Leigh
none Details | Review

Description Roger Leigh 2004-10-20 20:59:37 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
Comment 1 Roger Leigh 2004-10-20 21:01:58 UTC
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?
Comment 2 Cedric Gustin 2004-10-21 06:13:50 UTC
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.
Comment 3 Murray Cumming 2004-10-21 07:32:04 UTC
Cedric, so does this patch look OK to you, or does it need to be change?
Comment 4 Roger Leigh 2004-10-21 18:19:12 UTC
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
Comment 5 Murray Cumming 2004-10-21 21:01:46 UTC
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.
Comment 6 Murray Cumming 2004-10-25 16:56:25 UTC
Applied to glibmm-2-4.