4

I'm having some existing code that I'm not able to run without gtk2hs. But I can't get it installed. I tried with cabal before but found out that the correct solution for now is to build from darcs. So I do :

darcs get --lazy http://code.haskell.org/gtk2hs
cd gtk2hs
export PATH=$HOME/Library/Haskell/bin:$PATH
sh bootstrap.sh

And get this :

Resolving dependencies...
Configuring gio-0.12.4.1...
setup: The pkg-config package gio-2.0 version >=2.16.4 is required but it
could not be found.
Resolving dependencies...
Configuring cairo-0.12.4.1...
setup: The pkg-config package cairo version >=1.2.0 is required but it could
not be found.
Resolving dependencies...
Configuring pango-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring gtk-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring gtk3-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.

I'm on osx with most recent versions of cabal and darcs.

Jeremy Knees
  • 652
  • 1
  • 7
  • 21
  • Do you have GTK installed? It looks to me like for some reason Cabal can't find the actual GTK libraries... – MathematicalOrchid Oct 29 '13 at 08:56
  • @MathematicalOrchid how did you found that? It's just that to me errors looks like nonsense, what does they trying to say? `The pkg-config package cairo version >=1.2.0 is required but it could not be found` — is it that pkg-config outdated? Or that cairo outdated? I.e. I am having GTK, but experiencing the same problem. – Hi-Angel May 17 '15 at 14:10
  • @MathematicalOrchid From the author's problem *(mine had only one error)* I can infer that the version error rather about a cairo, and still I am having a problem with understanding the message: why does it trying to install «0.12.4.1» version, but complains about the «1.2.0» version? – Hi-Angel May 17 '15 at 14:19

1 Answers1

3

You must install the gtk C libraries before you install the Haskell bindings to them. Visit the installation instructions and check the section for your operating system if you need instructions on how to do this.

Daniel Wagner
  • 145,880
  • 9
  • 220
  • 380