Skip to content
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

Cannot build gtk on OS X using stack #807

Closed
dhobbs opened this issue Aug 17, 2015 · 14 comments
Closed

Cannot build gtk on OS X using stack #807

dhobbs opened this issue Aug 17, 2015 · 14 comments

Comments

@dhobbs
Copy link

dhobbs commented Aug 17, 2015

Using the following stack version:

~ $ stack --version
Version 0.1.3.1, Git revision 908b04205e6f436d4a5f420b1c6c646ed2b804d7

stack build gtk --flag gtk:have-quartz-gtk gives the following error:

~ $ stack build gtk --flag gtk:have-quartz-gtk
Run from outside a project, using implicit global config
Using resolver: lts-3.1 from global config file: /Users/darren/.stack/global/stack.yaml
Invalid flag specification:
- Package 'gtk' not found (specified on command line)

I'm trying to install threadscope (which requires gtk) on a mac, using stack. The error below is what happens if -fhave-quartz-gtk isn't supplied, which is why I suspect it isn't making it through when I use a wildcard package.

stack build gtk --flag *:have-quartz-gtk
Run from outside a project, using implicit global config
Using resolver: lts-3.1 from global config file: /Users/darren/.stack/global/stack.yaml
gtk-0.13.9: configure
gtk-0.13.9: build

--  While building package gtk-0.13.9 using:
      /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack75520/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options -hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/darren/.stack/global/.stack-work/logs/gtk-0.13.9.log
@snoyberg
Copy link
Contributor

The issue is that stack prevents you from modifying flags of snapshot packages, because doing so leads to contamination of the snapshot database. One option is to create a stack.yaml to be very explicit about moving gtk to the extra-deps, e.g.:

resolver: lts-3.1
extra-deps:
- gtk-0.13.9
flags:
    gtk:
        have-quartz-gtk: true
packages: []

Then running stack build threadscope in that directory should work. That said, we should think about ways to improve the user interface here.

@snoyberg
Copy link
Contributor

One possibility is that, instead of complaining about using a flag on a snapshot package, we simply take it out of the snapshot and put it in extra-deps. I'm leaning towards that being the best solution here.

@chrisdone
Copy link
Member

👍

@snoyberg
Copy link
Contributor

Alright, I've just pushed a commit that should make stack behave as described. @dhobbs Can you test out the latest master (stack upgrade --git) with the original command stack build gtk --flag gtk:have-quartz-gtk?

@snoyberg snoyberg added this to the 0.2.0.0 milestone Aug 18, 2015
@dhobbs
Copy link
Author

dhobbs commented Aug 18, 2015

It's still failing the same way I'm afraid. Sorry I can't be more helpful here, I'm not very familiar with cabal flags. I can confirm that when using cabal with LTS-3.1, cabal install gtk -fhave-quartz-gtk does work so it's not due to a bad version of the library.

Embarrassingly I've only just noticed that threadscope itself isn't in LTS so I would have faceplanted shortly after this step anyway.

@snoyberg
Copy link
Contributor

Can you provide the -v output? And are you sure you're using the newly
compiled stack executable?

On Tue, Aug 18, 2015, 1:06 PM Darren [email protected] wrote:

It's still failing the same way I'm afraid. Sorry I can't be more helpful
here, I'm not very familiar with cabal flags. I can confirm that when using
cabal with LTS-3.1, cabal install gtk -fhave-quartz-gtk does work so it's
not due to a bad version of the library.

Embarrassingly I've only just noticed that threadscope itself isn't in LTS
so I would have faceplanted shortly after this step anyway.


Reply to this email directly or view it on GitHub
#807 (comment)
.

@dhobbs
Copy link
Author

dhobbs commented Aug 19, 2015

~/projects/threadscope $ stack -v build gtk --flag gtk:have-quartz-gtk
Version 0.1.3.1, Git revision 3325901806f8f96d851e96d27b3db4b8b1236889 X86_64
2015-08-19 10:22:48.152919: [debug] Checking for project config at: /Users/darren/projects/threadscope/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 10:22:48.153089: [debug] Checking for project config at: /Users/darren/projects/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 10:22:48.153149: [debug] Checking for project config at: /Users/darren/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 10:22:48.153191: [debug] Checking for project config at: /Users/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 10:22:48.153228: [debug] Checking for project config at: /stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 10:22:48.153265: [debug] No project config file found, using defaults. @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:493:13)
2015-08-19 10:22:48.153521: [info] Run from outside a project, using implicit global config @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:242:13)
2015-08-19 10:22:48.15433: [info] Using resolver: lts-3.1 from global config file: /Users/darren/.stack/global/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:256:32)
2015-08-19 10:22:48.159249: [debug] Run process: ghc --info @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.201469: [debug] Run process: ghc --numeric-version @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.222879: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal id @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.242644: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.264986: [debug] Checking resolver: lts-3.1 @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Source src/Stack/Build/Source.hs:147:17)
2015-08-19 10:22:48.26954: [warn] - Implicitly adding gtk to extra-deps based on command line flag @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Source src/Stack/Build/Source.hs:198:17)
2015-08-19 10:22:48.456793: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.493967: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:48.575055: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:49.000528: [debug] All installs are local; releasing snapshot lock early. @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build src/Stack/Build.hs:92:28)
2015-08-19 10:22:49.001098: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 10:22:49.249261: [info] gtk-0.13.9: configure @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:583:18)
2015-08-19 10:22:49.250056: [debug] Run process: /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack57273/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ --package-db=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/pkgdb/ --dependency=array=array-0.5.1.0-d4206b835b96b5079d918fa1eab1a9a8 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=bytestring=bytestring-0.10.6.0-6e8453cb70b477776f26900f41a5e17a --dependency=cairo=cairo-0.13.1.0-e0800204aae7b50d95a633dc766ca73b --dependency=containers=containers-0.5.6.2-2b49cce16f8a2908df8454387e550b93 --dependency=gio=gio-0.13.1.0-08c977da748214e4716b8c821c7141e2 --dependency=glib=glib-0.13.2.1-18a676d4041468177668d08a3b8b1f70 --dependency=mtl=mtl-2.2.1-5cf332b11edb88a6040af20fd6a58acb --dependency=pango=pango-0.13.1.0-9f4303199be8e4e704bb7bf9cd679195 --dependency=text=text-1.2.1.3-2395ef415c1b20175aae83b50060e389 --libdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/lib --bindir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/bin --datadir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/share --docdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 --htmldir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 --haddockdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:668:21)
2015-08-19 10:22:52.526079: [info] gtk-0.13.9: build @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:583:18)
2015-08-19 10:22:52.526169: [debug] Run process: /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack57273/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:668:21)

--  While building package gtk-0.13.9 using:
      /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack57273/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options -hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/darren/.stack/global/.stack-work/logs/gtk-0.13.9.log

    [1 of 2] Compiling Gtk2HsSetup      ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
    [2 of 2] Compiling Main             ( SetupMain.hs, dist/setup-wrapper/Main.o )
    Linking dist/setup-wrapper/setup ...
    Configuring gtk-0.13.9...
    Building gtk-0.13.9...
    Preprocessing library gtk-0.13.9...
    [  1 of 209] Compiling Graphics.UI.Gtk.ModelView.Sequence ( Graphics/UI/Gtk/ModelView/Sequence.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/ModelView/Sequence.o )
    [  2 of 209] Compiling Graphics.UI.Gtk.Gdk.Enums ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Gdk/Enums.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Gdk/Enums.o )
    [  3 of 209] Compiling Graphics.UI.Gtk.General.Enums ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/Enums.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/Enums.o )
    [  4 of 209] Compiling Graphics.UI.Gtk.General.Threading ( Graphics/UI/Gtk/General/Threading.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/Threading.o )
    [  5 of 209] Compiling Graphics.UI.Gtk.Signals ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Signals.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Signals.o )
    [  6 of 209] Compiling Graphics.UI.Gtk.Types ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Types.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Types.o )
    [  7 of 209] Compiling Graphics.UI.Gtk.General.DNDTypes ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/DNDTypes.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/DNDTypes.o )
    [  8 of 209] Compiling Graphics.UI.Gtk.Abstract.ContainerChildProperties ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/ContainerChildProperties.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/ContainerChildProperties.o )
    [  9 of 209] Compiling Graphics.UI.Gtk.Embedding.Types ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Types.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Types.o )
    [ 10 of 209] Compiling Graphics.UI.Gtk.Embedding.Embedding ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Embedding.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Embedding.o )
    [ 11 of 209] Compiling Graphics.UI.Gtk.ModelView.Types ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/ModelView/Types.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/ModelView/Types.o )
    [ 12 of 209] Compiling Graphics.UI.Gtk.Gdk.PixbufData ( Graphics/UI/Gtk/Gdk/PixbufData.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Gdk/PixbufData.o )
    [ 13 of 209] Compiling Graphics.UI.Gtk.Gdk.PixbufAnimation ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Gdk/PixbufAnimation.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Gdk/PixbufAnimation.o )
    [ 14 of 209] Compiling Graphics.UI.Gtk.Builder ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Builder.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Builder.o )
    [ 15 of 209] Compiling Graphics.UI.Gtk.Abstract.Separator ( Graphics/UI/Gtk/Abstract/Separator.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Separator.o )
    [ 16 of 209] Compiling Graphics.UI.Gtk.Abstract.Scrollbar ( Graphics/UI/Gtk/Abstract/Scrollbar.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Scrollbar.o )
    [ 17 of 209] Compiling Graphics.UI.Gtk.Abstract.Scale ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Scale.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Scale.o )
    [ 18 of 209] Compiling Graphics.UI.Gtk.Abstract.Object ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Object.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Object.o )
    [ 19 of 209] Compiling Graphics.UI.Gtk.Abstract.Paned ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Paned.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Paned.o )
    [ 20 of 209] Compiling Graphics.UI.Gtk.General.Structs ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/Structs.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/General/Structs.o )
    [ 21 of 209] Compiling Graphics.UI.Gtk.Abstract.Range ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Range.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Abstract/Range.o )
    [ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Plug.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Graphics/UI/Gtk/Embedding/Plug.o )

    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)

@snoyberg
Copy link
Contributor

Unless I'm misreading, this looks like quite a different problem than the one you initially had, am I mistaken? Can you confirm which version of gtk you were able to successfully compile with cabal?

@dhobbs
Copy link
Author

dhobbs commented Aug 19, 2015

The compile error is what you get on a mac when using cabal if the -fhave-quartz-gtk cabal flag is not supplied.

@snoyberg
Copy link
Contributor

Ahh, OK, that helps quite a bit, thank you. I think I know what that problem means.

@snoyberg
Copy link
Contributor

OK, I think I got it that time. master should hopefully do it.

@dhobbs
Copy link
Author

dhobbs commented Aug 19, 2015

That did it!

~/projects/threadscope $ stack -v build gtk --flag gtk:have-quartz-gtk
Version 0.1.3.1, Git revision b763b0efaa10cfafff51c0e01bc5157b6f063368 X86_64
2015-08-19 12:47:02.678531: [debug] Checking for project config at: /Users/darren/projects/threadscope/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 12:47:02.678982: [debug] Checking for project config at: /Users/darren/projects/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 12:47:02.67903: [debug] Checking for project config at: /Users/darren/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 12:47:02.679071: [debug] Checking for project config at: /Users/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 12:47:02.679185: [debug] Checking for project config at: /stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:466:9)
2015-08-19 12:47:02.679253: [debug] No project config file found, using defaults. @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:493:13)
2015-08-19 12:47:02.679799: [info] Run from outside a project, using implicit global config @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:242:13)
2015-08-19 12:47:02.681753: [info] Using resolver: lts-3.1 from global config file: /Users/darren/.stack/global/stack.yaml @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Config src/Stack/Config.hs:256:32)
2015-08-19 12:47:02.687834: [debug] Run process: ghc --info @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:02.738462: [debug] Run process: ghc --numeric-version @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:02.761857: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal id @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:02.790957: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:02.813036: [debug] Checking resolver: lts-3.1 @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Source src/Stack/Build/Source.hs:162:17)
2015-08-19 12:47:02.816609: [warn] - Implicitly adding gtk to extra-deps based on command line flag @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Source src/Stack/Build/Source.hs:213:17)
2015-08-19 12:47:03.090777: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:03.133607: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:03.214002: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/pkgdb/ dump --expand-pkgroot @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:03.760284: [debug] All installs are local; releasing snapshot lock early. @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build src/Stack/Build.hs:92:28)
2015-08-19 12:47:03.760948: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)
2015-08-19 12:47:04.0386: [info] gtk-0.13.9: configure @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:583:18)
2015-08-19 12:47:04.039299: [debug] Run process: /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack63762/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ configure --user --package-db=clear --package-db=global --package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ --package-db=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/pkgdb/ --dependency=array=array-0.5.1.0-d4206b835b96b5079d918fa1eab1a9a8 --dependency=base=base-4.8.1.0-075aa0db10075facc5aaa59a7991ca2f --dependency=bytestring=bytestring-0.10.6.0-6e8453cb70b477776f26900f41a5e17a --dependency=cairo=cairo-0.13.1.0-e0800204aae7b50d95a633dc766ca73b --dependency=containers=containers-0.5.6.2-2b49cce16f8a2908df8454387e550b93 --dependency=gio=gio-0.13.1.0-08c977da748214e4716b8c821c7141e2 --dependency=glib=glib-0.13.2.1-18a676d4041468177668d08a3b8b1f70 --dependency=mtl=mtl-2.2.1-5cf332b11edb88a6040af20fd6a58acb --dependency=pango=pango-0.13.1.0-9f4303199be8e4e704bb7bf9cd679195 --dependency=text=text-1.2.1.3-2395ef415c1b20175aae83b50060e389 --libdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/lib --bindir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/bin --datadir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/share --docdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 --htmldir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 --haddockdir=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/doc/gtk-0.13.9 -fhave-quartz-gtk @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:668:21)
2015-08-19 12:47:07.679543: [info] gtk-0.13.9: build @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:583:18)
2015-08-19 12:47:07.679636: [debug] Run process: /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack63762/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options "-hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file" @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:668:21)
2015-08-19 12:50:49.767004: [info] gtk-0.13.9: install @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:583:18)
2015-08-19 12:50:49.767105: [debug] Run process: /Users/darren/.stack/programs/x86_64-osx/ghc-7.10.2/bin/runhaskell -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ /var/folders/w_/hxywk7kd52g2jjvqdtw6qx5w0000gn/T/stack63762/gtk-0.13.9/Setup.hs --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ install @(stack_5d6BW9mjZpYKU0uYDUjIqC:Stack.Build.Execute src/Stack/Build/Execute.hs:668:21)
2015-08-19 12:50:50.993836: [debug] Run process: ghc-pkg --no-user-package-db --package-db=/Users/darren/.stack/snapshots/x86_64-osx/lts-3.1/7.10.2/pkgdb/ --package-db=/Users/darren/.stack/global/.stack-work/install/x86_64-osx/lts-3.1/7.10.2/pkgdb/ field --simple-output gtk id @(stack_5d6BW9mjZpYKU0uYDUjIqC:System.Process.Read src/System/Process/Read.hs:257:3)

@dhobbs dhobbs closed this as completed Aug 19, 2015
@snoyberg
Copy link
Contributor

Awesome, thanks for reporting and testing.

@asheshambasta
Copy link

asheshambasta commented Feb 4, 2018

I'm not sure if this is the right place to report this, but I seem to be having trouble installing gtk on my Mac:

-> % stack --version
Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db (5454 commits) x86_64 hpack-0.20.0

Full error dump here.

Edit

As @cocreature pointed me to gtk2hs/gtk2hs#112, it works as described in this comment. So please ignore my comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants