GNOME Bugzilla – Bug 591233
Build error on Windows using Strawberry Perl
Last modified: 2009-08-10 21:10:12 UTC
Looks like linker on Windows needs gtk2perl_* functions which are actually in another distribution now (Pango) in PangoAttributes.xs. C:\strawberry\cpan\build\Gtk2-1.221-a_jrai>dmake dlltool --def Gtk2.def --output-exp dll.exp [ LD blib\arch\auto\Gtk2\Gtk2.dll ] xs/Gtk2.o:Gtk2.c:(.text+0x553f): undefined reference to `gtk2perl_pango_attribute_get_type' xs/Gtk2.o:Gtk2.c:(.text+0x5555): undefined reference to `gtk2perl_pango_attr_iterator_get_type ' xs/Gtk2.o:Gtk2.c:(.text+0x55ef): undefined reference to `gtk2perl_pango_script_iter_get_type' xs/GdkPango.o:GdkPango.c:(.text+0x807): undefined reference to `gtk2perl_pango_attribute_get_t ype' xs/GdkPango.o:GdkPango.c:(.text+0x8e6): undefined reference to `gtk2perl_pango_attribute_regis ter_custom_type' xs/GdkPango.o:GdkPango.c:(.text+0xa3f): undefined reference to `gtk2perl_pango_attribute_get_t ype' xs/GdkPango.o:GdkPango.c:(.text+0xbef): undefined reference to `gtk2perl_pango_attribute_get_t ype' xs/GdkPango.o:GdkPango.c:(.text+0xcf6): undefined reference to `gtk2perl_pango_attribute_regis ter_custom_type' xs/GdkPango.o:GdkPango.c:(.text+0xf3f): undefined reference to `gtk2perl_pango_attribute_get_t ype' xs/GdkPango.o:GdkPango.c:(.text+0x11f8): undefined reference to `gtk2perl_pango_attribute_get_ type' xs/GdkPango.o:GdkPango.c:(.text+0x1287): undefined reference to `gtk2perl_pango_attribute_regi ster_custom_type' xs/GdkPango.o:GdkPango.c:(.text+0x13e8): undefined reference to `gtk2perl_pango_attribute_get_ type' collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\Gtk2\Gtk2.dll'
Looks like pango-perl does not export this function. Pango.a library is being linked in.
I've worked around the problem by adding these strings to Pango.def when building pango-perl: gtk2perl_pango_attribute_get_type _gtk2perl_pango_attribute_get_type = gtk2perl_pango_attribute_get_type gtk2perl_pango_attr_iterator_get_type _gtk2perl_pango_attr_iterator_get_type = gtk2perl_pango_attr_iterator_get_type gtk2perl_pango_script_iter_get_type _gtk2perl_pango_script_iter_get_type = gtk2perl_pango_script_iter_get_type gtk2perl_pango_attribute_register_custom_type _gtk2perl_pango_attribute_register_custom_type = gtk2perl_pango_attribute_register_custom_type Then rebuilding and reinstalling Pango. Now Gtk2 builds and installs ok. I don't seem to find how this Pango.def is generated (it's not in source tarball).
Created attachment 140267 [details] [review] Patch to pango-perl to export more functions Found the solution myself. This patch should be applied to Pango perl extension distribution to enable exporting of functions used by Gtk2.pm
This was already reported earlier and got fixed in the git repository. I haven't gotten around to rolling a new release of Pango yet, but I'll try to do that soon. *** This bug has been marked as a duplicate of 576373 ***