[Haskell-cafe] Linking problems with a fresh gtk2hs build

Olivier Boudry olivier.boudry at gmail.com
Fri Oct 26 09:17:25 EDT 2007


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071026/7946e2a8/attachment.htm


More information about the Haskell-Cafe mailing list