Re: [Gtk2hs-users] cairo error: ghc.exe: unable to load package `cairo-0.12.0'
Hi Daniel, On 04.04.2011, at 16:01, Daniel wrote:
Hi list,
I've built gtk2hs successfully for ghc-7.0.2, but if I try to load the example Drawing.hs from the cairo packages demo folder I get:
*Main> :load Drawing.hs [1 of 1] Compiling Main ( Drawing.hs, interpreted ) Ok, modules loaded: Main. *Main> main Loading package transformers-0.2.2.0 ... linking ... done. Loading package mtl-2.0.1.0 ... linking ... done. Loading package array-0.3.0.2 ... linking ... done. Loading package containers-0.4.0.0 ... linking ... done. Loading package process-1.0.1.5 ... linking ... done. Loading package time-1.2.0.3 ... linking ... done. Loading package random-1.0.0.3 ... linking ... done. Loading package haskell98-1.1.0.1 ... linking ... done. Loading package cairo-0.12.0 ... linking ... <interactive>: C:/users/daniel/appd ata/roaming/cabal\cairo-0.12.0\ghc-7.0.2\HScairo-0.12.0.o: unknown symbol `_cair o_image_surface_get_data' ghc.exe: unable to load package `cairo-0.12.0'
Have tried many things so far:
* Starting with re-inited package database * Doing a $ nm /h/Gtk+/bin/libcairo-2.dll | grep -i cairo_image_surface_get_data yielding 68de04d8 T _cairo_image_surface_get_data * Temporarily renaming libcairo-2.dll (the only one found on my setup, even not-in-PATH ones are non-existent) yielding as expected "dll not found" error * as you can see there is no "literal" space in the gtk+ installation path (h:\Gtk+), only in the users haskell package installation path, but that's fairly standard with Windows I guess * Compilable with ghc --make ... though, but that's sadly not sufficient as Chart package isn't installable due to this issue
If ghc --make works but interactively the object cannot be found, then it might be a ghc problem rather than ours, especially since the symbol exists in the DLL. Can somebody from the ghc group shed some light on the issue? Cheers, Axel
Hi again, I can't get my head around one question: On one side I can install gtk2hs with the workaround from http://hackage.haskell.org/trac/gtk2hs/ticket/1203 applied. When I run ghc-pkg list the packages are listed as installed and I can compile some demo apps - apart from the mentioned package load error in ghci - using them, BUT... ... when I try cabal install threadscope (as an example package depending on gtk2hs) it complains about cairo etc. not being installed and tries to re-install it on-the-fly failing due to whats described her: http://hackage.haskell.org/trac/gtk2hs/ticket/1203! As opposed to when I'm using the stepwise approach of cabal unpack first, then cabal configure etc. Also I found two slightly similar looking questions on the list, but again I don't feel skilled enough to make best use of them, maybe they help any other http://www.mail-archive.com/gtk2hs-devel@lists.sourceforge.net/msg00580.html http://www.mail-archive.com/gtk2hs-devel@lists.sourceforge.net/msg00598.html Cheers Daniel 2011/4/4 Axel Simon <Axel.Simon@in.tum.de>:
Hi Daniel,
On 04.04.2011, at 16:01, Daniel wrote:
Hi list,
I've built gtk2hs successfully for ghc-7.0.2, but if I try to load the example Drawing.hs from the cairo packages demo folder I get:
*Main> :load Drawing.hs [1 of 1] Compiling Main ( Drawing.hs, interpreted ) Ok, modules loaded: Main. *Main> main Loading package transformers-0.2.2.0 ... linking ... done. Loading package mtl-2.0.1.0 ... linking ... done. Loading package array-0.3.0.2 ... linking ... done. Loading package containers-0.4.0.0 ... linking ... done. Loading package process-1.0.1.5 ... linking ... done. Loading package time-1.2.0.3 ... linking ... done. Loading package random-1.0.0.3 ... linking ... done. Loading package haskell98-1.1.0.1 ... linking ... done. Loading package cairo-0.12.0 ... linking ... <interactive>: C:/users/daniel/appd ata/roaming/cabal\cairo-0.12.0\ghc-7.0.2\HScairo-0.12.0.o: unknown symbol `_cair o_image_surface_get_data' ghc.exe: unable to load package `cairo-0.12.0'
Have tried many things so far:
* Starting with re-inited package database * Doing a $ nm /h/Gtk+/bin/libcairo-2.dll | grep -i cairo_image_surface_get_data yielding 68de04d8 T _cairo_image_surface_get_data * Temporarily renaming libcairo-2.dll (the only one found on my setup, even not-in-PATH ones are non-existent) yielding as expected "dll not found" error * as you can see there is no "literal" space in the gtk+ installation path (h:\Gtk+), only in the users haskell package installation path, but that's fairly standard with Windows I guess * Compilable with ghc --make ... though, but that's sadly not sufficient as Chart package isn't installable due to this issue
If ghc --make works but interactively the object cannot be found, then it might be a ghc problem rather than ours, especially since the symbol exists in the DLL. Can somebody from the ghc group shed some light on the issue?
Cheers, Axel
participants (2)
-
Axel Simon -
Daniel Kahlenberg