Linking problems with a fresh gtk2hs build

Hello, I just built gtk2hs 0.9.12 using MinGW, GTK_2.0 and ghc-6.8.0.20071016. I just changed some EXTERNALDEPS in the Makefile based on info found in the following page http://haskell.org/haskellwiki/Grapefruit 25a126,128
if HAVE_SPLIT_BASE tools_c2hs_c2hsLocal_EXTERNALDEPS += pretty containers array endif 358a362,364 if HAVE_SPLIT_BASE libHSgtk_a_EXTERNALDEPS += containers array endif 1578a1585,1587 if HAVE_SPLIT_BASE libHSsoegtk_a_EXTERNALDEPS += old-time endif
I had no problem building and installing the library but when trying to compile the HelloWorld example to check the installation I get this error: C:\Temp>ghc --make HelloGtk.hs Linking HelloGtk.exe ... C:/Progra~1/Haskell/lib/gtk2hs/libHSgtk.a(Gtk__1.o)(.text+0x419):fake: undefined reference to `__stginit_gtkzm0zi9zi12_GraphicsziUIziGtkziLayoutziHPaned_' collect2: ld returned 1 exit status I found an irc log talking of using nm to track the problem. Tried nm and got this (different from the problem specified in the irc log). nm libHSgtk.a | grep __stginit_gtkzm0zi9zi12_GraphicsziUIziGtkziLayoutziHPaned_ U ___stginit_gtkzm0zi9zi12_GraphicsziUIziGtkziLayoutziHPaned_ c:\MinGW\bin\nm.exe: HPaned__4.o: File format not recognized c:\MinGW\bin\nm.exe: MenuBar__48.o: File format not recognized The "missing symbol" is found but I have a problem with the HPaned__4.o and MenuBar__48.o of the libHSgtk.a file. Any idea of what could have gone wrong? Thanks, Olivier.

More info on this problem: I rebuilt the whole stuff using exactly the same method and working from a new extract of the sources. Now I get the same kind of error but on another object. This error looks a bit random!?! nm.exe libHSgtk.a > /dev/null C:\MinGW\bin\nm.exe: TextView__112.o: File format not recognized I checked the other libraries and they all look OK except libHSgtk.a Could it have something to do with split objects? I have hundreds of TextView__... objects. I'm no trying to rebuild the whole stuff with --disable-split-objs. Olivier.

On Fri, 2007-10-26 at 09:17 -0400, Olivier Boudry wrote:
Hello,
I just built gtk2hs 0.9.12 using MinGW, GTK_2.0 and ghc-6.8.0.20071016. I just changed some EXTERNALDEPS in the Makefile based on info found in the following page http://haskell.org/haskellwiki/Grapefruit
I'm not sure what's going wrong there. I should note that there is a gtk2hs-0.9.12 branch which contains the fixes to build with ghc-6.8.0.x and there will be a gtk2hs point release once ghc-6.8.1 is released. You could try cleaning, and ./configure --disable-split-objs to see if that fares any better. Duncan
participants (2)
-
Duncan Coutts
-
Olivier Boudry