Reputation: 61041
For the life of me I can't figure out how to install cairo on Windows!
I need it for Haskell Charts, but when I follow setup instructions and get to running:
cabal install gtk
I get this error:
Linking dist/setup-wrapper\setup.exe ...
Configuring glib-0.12.2...
setup.exe: The program pkg-config version >=0.9.0 is required but it could not
be found.
cabal.exe: Error: some packages failed to install:
cairo-0.12.2 failed during the configure step. The exception was:
ExitFailure 1
gio-0.12.2 depends on glib-0.12.2 which failed to install.
glib-0.12.2 failed during the configure step. The exception was:
ExitFailure 1
gtk-0.12.2 depends on glib-0.12.2 which failed to install.
pango-0.12.2 depends on glib-0.12.2 which failed to install.
If I go to cairo site, they don't have anywhere any kind of setup. Just a bunch of dlls that I don't know what to do with (how to make Haskell see them).
Any help appreciated, as I've been trying to install the damn thing for hours!
Upvotes: 11
Views: 28106
Reputation: 2428
The 64-bit GTK3 installer worked for me. In the installer, I kept the "Set up PATH environment variable" checkbox checked, as recommended in this otherwise outdated guide.
Not important: Before that, I tried the 32-bit GTK2 installer as recommended in the cairocffi documentation under "Installing cairo on Windows", but that resulted in cannot load library 'C:\Program Files (x86)\GTK2-Runtime\bin\libcairo-2.dll': error 0xc1
, and then I found this WeasyPrint issue (WeasyPrint apparently uses cairo and is from the same company as cairocffi and CairoSVG), which led me to the documentation, which links to the 64-bit version linked above.
Upvotes: 0
Reputation: 12652
Since the answers on this page have been posted, GTK has stopped publishing Windows binaries. A third party compiles up-to-date dll
s here: http://www.tarnyko.net/dl/gtk.htm
Upvotes: 1
Reputation: 62818
I'm not 100% sure, but you might need to do
cabal install gtk2hs-buildtools
before you can install gtk
itself.
Upvotes: 0
Reputation: 152707
You need to download the all-in-one bundle available here. You can discover this link yourself by visiting http://www.gtk.org/ and clicking "Download", then "Windows (32-bit)". Extract it to a directory that doesn't include spaces, and add that directory to your PATH. You will also need to cabal install gtk2hs-buildtools
before you attempt to cabal install gtk
.
These instructions can also be found on the gtk2hs website.
Upvotes: 5