Le problème fondamental:Haskell gtk type d'installation conflits
Je tente d'installer le paquet gtk
de Haskell utilisant le standard mac instructions sur OSX 10.10.4. Spécifiquement, je veux courir threadscope
, ainsi j'ai besoin de gtk
. Les premières étapes avec homebrew
et l'amende de travail gtk buildtools
, mais quand je
cabal install gtk
ou utilise
cabal install --with-gcc=gcc-4.8 gtk
j'obtiens l'erreur de compilation suivante:
Graphics/UI/Gtk/Embedding/Plug.chs:120:6:
Couldn't match expected type ‘Ptr()’
with actual type ‘Maybe DrawWindow’
In the first argument of ‘gtk_plug_new’, namely
‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
In the second argument of ‘($)’, namely
‘gtk_plug_new
(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
Graphics/UI/Gtk/Embedding/Plug.chs:137:6:
Couldn't match expected type ‘Ptr()’
with actual type ‘Maybe DrawWindow’
In the second argument of ‘\ (Display arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_plug_new_for_display argPtr1 arg2’, namely
‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
In the second argument of ‘($)’, namely
‘(\ (Display arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_plug_new_for_display argPtr1 arg2)
display
(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
Graphics/UI/Gtk/Embedding/Plug.chs:151:3:
Couldn't match type ‘Ptr()’ with ‘Maybe DrawWindow’
Expected type: IO (Maybe DrawWindow)
Actual type: IO (Ptr())
In the second argument of ‘($)’, namely
‘(\ (Plug arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_plug_get_id argPtr1)
(toPlug self)’
In the expression:
liftM toNativeWindowId
$ (\ (Plug arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_plug_get_id argPtr1)
(toPlug self)
cabal: Error: some packages failed to install:
J'avais déjà bibliothèque Haskell gtk
et threadscope
application installée et en cours d'exécution avant de mettre à jour ma plate-forme Haskell de ghc 7.8.4
à ghc 7.10.2
. Au début, j'ai supposé un conflit d'installation, mais j'ai retiré à plusieurs reprises la plate-forme Haskell de mon système en utilisant le thorough removal instructions et j'ai recommencé l'installation threadscope
sans succès. J'ai même supprimé et ré-installé le gtk+
sous-jacent et les paquets connexes en utilisant homebrew
, encore une fois sans succès.
Je ne suis pas sûr d'où les types Ptr()
et Maybe DrawWindow
proviennent et donc d'où le conflit pourrait provenir. Toute idée sur ce qui pourrait mal se passer serait la bienvenue!
Bonjour, merci pour votre réponse! Malheureusement, cela a entraîné les mêmes erreurs que ci-dessus lors de la construction de gtk. –
Utilisez-vous GHC 7.10.2? La recette ci-dessus crée un fil de discussion dans un bac à sable, de sorte que vous pouvez le suivre sans déranger vos paquets installés si vous êtes actuellement sur une version différente de GHC. – ErikR
Oui, j'utilise GHC 7.10.2, et je suis très confus pourquoi la recette n'a pas fonctionné, puisqu'un bac à sable était mon truc de dernier recours. –