Error installing gtk3

Hello everyone, I am trying to install gtk3 on Debian Wheezy (i386), without much success (see attached file for detailed error). I tried running |cabal update|, deleting ~/.ghc/<environment>/package.conf.d/glib* ~/.ghc/<environment>/package.conf.d/gtk* ~/.ghc/<environment>/package.conf.d/webkit* ~/.cabal/bin/gtk* ~/.cabal/packages/hackage.haskell.org/glib* ~/.cabal/packages/hackage.haskell.org/gtk* ~/.cabal/packages/hackage.haskell.org/webkit* and then recompiling, but I am still stuck with the same error. Any idea on where to look / what to do to fix this? Thanks -F

Hi Francesco,
it seems that you're running a different Gtk version than the developers.
You can safely add a castPtr around the mentioned function calls (toWindow parent) that appear on the lines mentioned in the error message, i.e. Graphics/UI/Gtk/Printing/PrintOperation.chs:409 and others.
If that works, please submit a patch!
Regards,
Axel
On May 12, 2014, at 3:02 PM, Francesco Ariis
Hello everyone, I am trying to install gtk3 on Debian Wheezy (i386), without much success (see attached file for detailed error). I tried running |cabal update|, deleting
~/.ghc/<environment>/package.conf.d/glib* ~/.ghc/<environment>/package.conf.d/gtk* ~/.ghc/<environment>/package.conf.d/webkit* ~/.cabal/bin/gtk* ~/.cabal/packages/hackage.haskell.org/glib* ~/.cabal/packages/hackage.haskell.org/gtk* ~/.cabal/packages/hackage.haskell.org/webkit*
and then recompiling, but I am still stuck with the same error. Any idea on where to look / what to do to fix this? Thanks -F
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Mon, May 12, 2014 at 04:36:52PM +0200, Axel Simon wrote:
Hi Francesco,
it seems that you're running a different Gtk version than the developers.
You can safely add a castPtr around the mentioned function calls (toWindow parent) that appear on the lines mentioned in the error message, i.e. Graphics/UI/Gtk/Printing/PrintOperation.chs:409 and others.
If that works, please submit a patch!
Regards, Axel
Hey Axel, thanks for the suggestions; I might need a more guidance. Reading the code I know that toWindow has type toWindow :: WindowClass o => o -> Window and Window is newtype Window = Window (ForeignPtr (Window)) deriving (Eq,Ord) Finally, castPtr has type castPtr :: Ptr a -> Ptr b Now, ghc complains that it expects |Ptr ()| instead of |Window|; I am not sure how to pipe the above functions together to obtain this. Searching Hoogle I found a functions with compatible signatures unsafeForeignPtrToPtr :: ForeignPtr a -> Ptr a labelled as "potentially dangerous operation" (and how would I get to that |ForeignPtr (Window)|? Pattern match?). In so many words: how to use |castPtr| here? Thanks in advance -F
participants (2)
-
Axel Simon
-
Francesco Ariis