GNOME Bugzilla – Bug 371464
Gtk2 doesn't compile with cygwin (patch included)
Last modified: 2008-10-19 12:09:28 UTC
Hi! Trying to build Gtk2-1.140 under cygwin generates a lot of errors such as xs/GtkMenuToolButton.o:GtkMenuToolButton.c:(.text+0x95f): undefined reference to `_gperl_get_object_check' xs/GtkMenuToolButton.o:GtkMenuToolButton.c:(.text+0xb71): undefined reference to `_gperl_get_object_check' xs/GtkMenuToolButton.o:GtkMenuToolButton.c:(.text+0xbab): more undefined references to `_gperl_get_object_check' follow The win32 linker needs all symbols resolved at link time. So libGlib.dll.a has to be supplied to EXTRALIBS and LDLOADLIBS. The patch for find_extra_libs() in Makefile.PL tries to find the library similar to MSWin32. Adding a simple file (e. g. /usr/lib/perl5/site_perl/5.8/cygwin/auto/Glib/libGlib.dll.a) to set_libs() doesn't work for me so it has to be split in arguments for -L and -l. Best regards Dirk
Created attachment 76075 [details] [review] patch for Gtk2-1.140 to work with cygwin
Thanks for the report and the patch. Maybe now it's finally time to roll this into ExtUtils::Depends properly. There's already a find_extra_libs in EU::Depends but it looks like it still needs some work before it can be used. Once this is fixed though, the line in get_makefile_vars referring to it can be uncommented and we should have this working for every module that uses EU::Depends. Unless you beat me to it, I'll look into it.
I think this is fixed in ExtUtils::Depends 0.301. Please reopen this bug if you still see the problem.