-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gtk 0.14.10 doesn't build with ghc 8.4.3 on mac #249
Comments
Try |
Thanks. I've had this problem when installing threadscope and turning |
can we just add "gtk -fhave-quartz-gtk" as dependency to .yaml or .cabal in Stack instead of |
Yes, you can set cabal flags a number of different ways. If the project uses
If it uses
Keep in mind though that people with the X11 version of Gtk+ 2 on macOS will not be able to build if this flag is set. |
This includes two layered changes so the gtk2hs packages build on Darwin: - For `glib`, `gio`, `gtk`, `gtk3`, and `pango`: the fix for version 0.13.8.0 from gtk2hs/gtk2hs#293 . I expect at some point the referenced fix (or one like it) will be released and and brought into nixpkgs, at which point the override and patch files here can (in fact must) be removed. - For `gtk` and `gtk3`: also apply the required cabal flag cited in gtk2hs/gtk2hs#249 to specify the Quartz rather than X11 backend (Quartz is the one that both nixpkgs and macOS support out-the-box). This override is likely to be wanted indefinitely. Both modifications are required for a successful build of `gtk` or `gtk3` on Darwin right now.
This includes two layered changes so the gtk2hs packages build on Darwin: - For `glib`, `gio`, `gtk`, `gtk3`, and `pango`: the fix for version 0.13.8.0 from gtk2hs/gtk2hs#293 . I expect at some point the referenced fix (or one like it) will be released and and brought into nixpkgs, at which point the override and patch files here can (in fact must) be removed. - For `gtk` and `gtk3`: also apply the required cabal flag cited in gtk2hs/gtk2hs#249 to specify the Quartz rather than X11 backend (Quartz is the one that both nixpkgs and macOS support out-the-box). This override is likely to be wanted indefinitely. Both modifications are required for a successful build of `gtk` or `gtk3` on Darwin right now.
This includes two layered changes so the gtk2hs packages build on Darwin: - For `glib`, `gio`, `gtk`, `gtk3`, and `pango`: the fix for version 0.13.8.0 from gtk2hs/gtk2hs#293 . I expect at some point the referenced fix (or one like it) will be released and and brought into nixpkgs, at which point the override and patch files here can (in fact must) be removed. - For `gtk` and `gtk3`: also apply the required cabal flag cited in gtk2hs/gtk2hs#249 to specify the Quartz rather than X11 backend (Quartz is the one that both nixpkgs and macOS support out-the-box). This override is likely to be wanted indefinitely. Both modifications are required for a successful build of `gtk` or `gtk3` on Darwin right now.
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
cabal install -j5 gtk
...
[162 of 209] Compiling Graphics.UI.Gtk.Embedding.Socket ( dist/build/Graphics/UI/Gtk/Embedding/Socket.hs, dist/build/Graphics/UI/Gtk/Embedding/Socket.o )
Graphics/UI/Gtk/Embedding/Socket.chs:175:6: error:
• Couldn't match expected type ‘Ptr ()’
with actual type ‘Maybe DrawWindow’
• In the second argument of ‘\ (Socket arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_socket_add_id argPtr1 arg2’, namely
‘(fromNativeWindowId windowId)’
In the expression:
(\ (Socket arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_socket_add_id argPtr1 arg2)
(toSocket self) (fromNativeWindowId windowId)
In an equation for ‘socketAddId’:
socketAddId self windowId
= (\ (Socket arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_socket_add_id argPtr1 arg2)
(toSocket self) (fromNativeWindowId windowId)
|
175 | (fromNativeWindowId windowId)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Graphics/UI/Gtk/Embedding/Socket.chs:187:3: error:
• Couldn't match type ‘Ptr ()’ with ‘Maybe DrawWindow’
Expected type: IO (Maybe DrawWindow)
Actual type: IO (Ptr ())
• In the second argument of ‘($)’, namely
‘(\ (Socket arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_socket_get_id argPtr1)
(toSocket self)’
In the expression:
liftM toNativeWindowId
$ (\ (Socket arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_socket_get_id argPtr1)
(toSocket self)
In an equation for ‘socketGetId’:
socketGetId self
= liftM toNativeWindowId
$ (\ (Socket arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_socket_get_id argPtr1)
(toSocket self)
|
187 | {# call unsafe socket_get_id #}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
cabal: Leaving directory '/var/folders/9b/rh4y2gy92hgdb6ktv4df1jv00000gn/T/cabal-tmp-73334/gtk-0.14.10'
cabal: Error: some packages failed to install:
gtk-0.14.10-IREoa0zChZaE2a3ulq7OE failed during the building phase. The
exception was:
ExitFailure 1
The text was updated successfully, but these errors were encountered: