Problem building Gtk2 using MinGW/dmake on Windows XP



Hi,

For some strange reason, I felt the need to build another Gtk2-Perl
that runs on Windows using a basic set of tools.  Last time I did this
was in February of 2006, with Perl 5.8.7, gtk+-2.86, glib-2.8.3,
MinGW-1.0, dmake 4.4.  I still have that build as a zipfile that I can
drop onto new installs of Windows, but I was looking to update.

I started building this contraption using Perl 5.8.8,
gtk+2.12.0/glib-2.14.1, Cairo-1.043 and Gtk2/Glib 1.161;  I have been
able to build the Cairo and Glib Perl modules, but not Gtk2.

More about my setup:
gtk/glib and friends for Windows downloaded from ftp.gnome.org
MinGW version 5.1.3  (from Sourceforge page)
dmake 4.8 (from search.cpan.org)
unxutilities zipfile from Sourceforge, I'm running dmake under the
unxutils version of zsh on Windows XP

I first hit problems with undefined references when compiling Glib.  I
saw this e-mail here:

http://mail.gnome.org/archives/gtk-perl-list/2005-November/msg00086.html

which caused me to add dll's to EXTRALIBS and LDLOADLIBS in the
Makefile, which got Glib and Cairo compiled.  The same trick is not
working for Gtk2.  Here's the output when I run the 'dmake' command
for Gtk2:

GTK2PERL-BUILD# dmake 2>&1 | tee /Temp/dmake_errors.log
Running Mkbootstrap for Gtk2 ()
C:\perl\5.8.8\bin\perl.exe -MExtUtils::Command -e chmod 644 Gtk2.bs
dlltool --def Gtk2.def --output-exp dll.exp
g++ -o blib\arch\auto\Gtk2\Gtk2.dll -Wl,--base-file -Wl,dll.base -mdll
-s -L"c:\perl\5.8.8\lib\CORE" -L"C:\apps\MinGW\lib" xs\*.o
-Wl,--image-base,0x69100000  C:\perl\5.8.8\lib\CORE\libperl58.a
C:\perl\5.8.8\lib\libintl.a C:\perl\5.8.8\lib\libiconv.a
C:\apps\MinGW\lib\libmsvcrt.a C:\apps\MinGW\lib\libmoldname.a
C:\apps\MinGW\lib\libkernel32.a C:\apps\MinGW\lib\libuser32.a
C:\apps\MinGW\lib\libgdi32.a C:\apps\MinGW\lib\libwinspool.a
C:\apps\MinGW\lib\libcomdlg32.a C:\apps\MinGW\lib\libadvapi32.a
C:\apps\MinGW\lib\libshell32.a C:\apps\MinGW\lib\libole32.a
C:\apps\MinGW\lib\liboleaut32.a C:\apps\MinGW\lib\libnetapi32.a
C:\apps\MinGW\lib\libuuid.a C:\apps\MinGW\lib\libws2_32.a
C:\apps\MinGW\lib\libmpr.a C:\apps\MinGW\lib\libwinmm.a
C:\apps\MinGW\lib\libversion.a C:\apps\MinGW\lib\libodbc32.a
C:\apps\MinGW\lib\libodbccp32.a C:\perl\5.8.8\bin\intl.dll
C:\perl\site\5.8.8\lib\auto\Glib\Glib.dll
C:\perl\site\5.8.8\lib\auto\Cairo\Cairo.dll
C:\perl\5.8.8\bin\libgtk-win32-2.0-0.dll
C:\perl\5.8.8\bin\libgdk-win32-2.0-0.dll
C:\perl\5.8.8\bin\libatk-1.0-0.dll
C:\perl\5.8.8\bin\libgdk_pixbuf-2.0-0.dll
C:\perl\5.8.8\bin\libpangowin32-1.0-0.dll
C:\perl\5.8.8\bin\libpangocairo-1.0-0.dll
C:\perl\5.8.8\bin\libpango-1.0-0.dll C:\perl\5.8.8\bin\libcairo-2.dll
C:\perl\5.8.8\bin\libgobject-2.0-0.dll
C:\perl\5.8.8\bin\libgmodule-2.0-0.dll
C:\perl\5.8.8\bin\libglib-2.0-0.dll
C:\perl\5.8.8\bin\libgthread-2.0-0.dll
C:\perl\5.8.8\lib\libcairo.dll.a C:\perl\5.8.8\lib\libglib-2.0.dll.a
dll.exp
xs\GdkCairo.o:GdkCairo.c:(.text+0x19e): undefined reference to
`cairo_object_from_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0x28e): undefined reference to
`cairo_object_from_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0x46d): undefined reference to
`cairo_object_from_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0x77e): undefined reference to
`cairo_object_from_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0x86e): undefined reference to
`cairo_object_from_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0xa7c): undefined reference to
`cairo_struct_to_sv'
xs\GdkCairo.o:GdkCairo.c:(.text+0xc01): undefined reference to
`cairo_struct_from_sv'
xs\GtkPageSetup.o:GtkPageSetup.c:(.text+0x1b1d): undefined reference
to `SvGKeyFile'
xs\GtkPageSetup.o:GtkPageSetup.c:(.text+0x1d5e): undefined reference
to `SvGKeyFile'
xs\GtkPaperSize.o:GtkPaperSize.c:(.text+0x1b4d): undefined reference
to `SvGKeyFile'
xs\GtkPaperSize.o:GtkPaperSize.c:(.text+0x1d6e): undefined reference
to `SvGKeyFile'
xs\GtkPrintContext.o:GtkPrintContext.c:(.text+0x8e): undefined
reference to `cairo_object_to_sv'
xs\GtkPrintContext.o:GtkPrintContext.c:(.text+0xb87): undefined
reference to `cairo_object_from_sv'
xs\GtkPrintSettings.o:GtkPrintSettings.c:(.text+0xced): undefined
reference to `SvGKeyFile'
xs\GtkPrintSettings.o:GtkPrintSettings.c:(.text+0xf2e): undefined
reference to `SvGKeyFile'
xs\PangoCairo.o:PangoCairo.c:(.text+0x10f): undefined reference to
`cairo_object_to_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0x915): undefined reference to
`cairo_font_type_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xa3d): undefined reference to
`cairo_font_type_to_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xb4e): undefined reference to
`cairo_object_to_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xc3e): undefined reference to
`cairo_object_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xd2b): undefined reference to
`cairo_object_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xe3e): undefined reference to
`cairo_object_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0xf2e): undefined reference to
`cairo_object_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0x104e): undefined reference to
`cairo_object_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0x113e): more undefined references
to `cairo_object_from_sv' follow
xs\PangoCairo.o:PangoCairo.c:(.text+0x1ab5): undefined reference to
`cairo_struct_from_sv'
xs\PangoCairo.o:PangoCairo.c:(.text+0x1b9e): undefined reference to
`cairo_struct_to_sv'
collect2: ld returned 1 exit status
dmake.EXE:  Error code 129, while making 'blib\arch\auto\Gtk2\Gtk2.dll'

I also tried the below idea to make sure it wasn't a command line
length problem:

http://mail.gnome.org/archives/gtk-perl-list/2007-April/msg00058.html

As far as I can tell, I've hacked the Makefile and added all of the
libraries that contain the above calls, but the Gtk2 build is still
not happy.

The *rough* build instructions that have gotten me this far are here
in case anyone is interested:
http://wiki.antlinux.com/pmwiki.php?n=HowTos.GTKForWindows#BuildOctober2007

Suggestions? Ideas?  I'm open to them.

Thanks,

Brian



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