Closed s5k6 closed 8 years ago
I think you need to install gtk2hs-buildtools
.
cabal install gtk2hs-buildtools
. $HOME/.cabal/bin
is on $PATH
.cabal install diagrams-gtk
If you want to build gtk2hs-buildtools
in a sandbox, you'll need to put the resulting executables on your $PATH
somehow.
This should of course be in the README. I'll try to put it in next week.
Please let us know whether these steps are enough.
That worked well, just some warnings. The complete set of instructions to do get this working is now (on my machine):
cabal sandbox init
PATH+=':.cabal-sandbox/bin/'
cabal update
cabal install cabal
cabal install gtk2hs-buildtools
cabal install diagrams diagrams-gtk
It fails if I put the packages together in one single cabal install
instruction. The installation of cabal
itself is req'd, otherwise
it wails with
[...]
cabal: Error: some packages failed to install:
cairo-0.13.3.0 failed during the configure step. The exception
was: user error (The package 'cairo' requires Cabal library
version -any && >=1.24 but no suitable version is installed.)
[...]
glib-0.13.4.0 failed during the configure step. The exception was:
user error (The package 'glib' requires Cabal library version -any
&& >=1.24 but no suitable version is installed.)
[...]
And a lot of failures due to dependencies.
The successful compilation spills out the following warnings,
[...]
Building cairo-0.13.3.0...
Warning: /tmp/pkgConf-glib-0.13.420448977631967513926.0: Unrecognized field abi on line 28
[...]
Configuring gio-0.13.3.0...
Warning: /tmp/pkgConf-cairo-0.13.32947025671726956429.0: Unrecognized field abi on line 35
[...]
Building pango-0.13.3.0...
Warning: /tmp/pkgConf-pango-0.13.311015139291801979802.0: Unrecognized field abi on line 29
[...]
Building diagrams-cairo-1.3.0.6...
Warning: /tmp/pkgConf-gio-0.13.36281750111656478042.0: Unrecognized field abi on line 33
[...]
Building gtk-0.14.4...
Warning: /tmp/pkgConf-gtk-0.141497983152038664370.4: Unrecognized field abi on line 175
[...]
takes around 25 Minutes (4×3GHz CPU, 8GiB RAM) and will consume 307MB of disk space. Which brings me to the question: Is it smart to do this in a sandbox? Or is that just the way it has to be with Haskell?
Thanks for your help!
I'm a big fan of sandboxes, and would definitely recommend them here. You can get a bit fancier, and share some built artifacts between multiple sandboxes to save time & space. cabal, stack, & Nix all do this at varying levels of convenience & granularity.
Thanks for the feedback that it worked, and that gtk
needs a recent cabal
. I think if you upgrade your cabal-install
program, the "unrecognized field" warnings go away - but they're just warnings, and ignoring them should be fine.
More feedback: Yes, indeed, after a global
cabal --no-require-sandbox install cabal-install
the cabal binary got updated (I did not know that cabal-install
was
a separate thing from installing cabal
) and the warnings went away.
I'm on a different machine now and I've noticed that I additionally
had to cabal install alex
to build gtk2hs-buildtools, otherwise I
see
Configuring gtk2hs-buildtools-0.13.2.1...
Failed to install gtk2hs-buildtools-0.13.2.1
Build log ( /tmp/foo/.cabal-sandbox/logs/gtk2hs-buildtools-0.13.2.1.log ):
cabal: Entering directory '/tmp/cabal-tmp-9379/gtk2hs-buildtools-0.13.2.1'
Configuring gtk2hs-buildtools-0.13.2.1...
cabal: The program 'alex' version >=3.0.1 is required but it could not be
found.
Thanks for helping me!
Here is the output of trying to install diagrams-gtk:
The log files are empty. I have tired this after successfully doing
Actually I was forced to
cabal install cabal
as without there was a complaint about an outdated cabal library.All this happened on an up-to-date Arch Linux.