0

I don't understand the error because it appears to be requiring a version of the same package that I'm trying to install.

$ cabal install gtk-mac-integration
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/SetupWrapper.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/Setup.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/Main.o )
Linking /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/setup ...
[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-mac-integration-0.1.0.4...
setup: The pkg-config package gtk-mac-integration version >=0.9.6 is required
but it could not be found.
cabal: Error: some packages failed to install:
gtk-mac-integration-0.1.0.4 failed during the configure step. The exception
was:
ExitFailure 1
Peter Hall
  • 53,120
  • 14
  • 139
  • 204

1 Answers1

2

It doesn't want the Haskell package gtk-mac-integration, it wants the system package gtk-mac-integration. That is, the Haskell package you're trying to install is just a binding to the gtk-mac-integration library (which I think is bundled with GTK+); you'll have to install it separately before you can install the Haskell package.

If you already have GTK+ installed, then the problem is that the pkg-config tool Cabal uses to find external library dependencies can't find the corresponding .pc files for the library. I don't know how to fix that, though; at least not without more details.

ehird
  • 40,602
  • 3
  • 180
  • 182
  • yes, I already have a version of gtk installed, but it is older. I will try updating gtk, if I can work out how I installed it in the first place. – Peter Hall Mar 31 '12 at 22:59
  • Struggling to get gtk+ updated. With $ ~/.local/bin/jhbuild build meta-gtk-osx-core, I get the error: *** Error during phase configure of gtk+: ########## Error running autoreconf -fis && ./configure --prefix /Users/peter/gtk/inst --libdir '/Users/peter/gtk/inst/lib' --with-gdktarget=quartz --enable-quartz-relocation *** [12/14] – Peter Hall Apr 01 '12 at 00:03
  • Unfortunately, compiling GTK+ is well outside my area of expertise. I suggest asking another question (possibly on Super User? I'm not sure). – ehird Apr 01 '12 at 00:06