2

is there a GUI package that is still up-to-date?

I tried installing both wxHaskell and gtk2hs today and both fail on dependencies I just cannot solve (wxHaskell cannot find some wxWidget libs and while trying the glade tutorial gtk2hs fails on a missing pkg-config libglade2-0 I installed too).

I guess it's just some problem with me not understanding the linux/cabal/package install things good enough but is there a up-to-date tutorial how to get started (install) some GUI lib for Haskell somewhere around?

Here are the errors:

carsten@Carsten-VirtualBox:~$ cabal install glade
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /tmp/glade-0.12.1-12934/glade-0.12.1/SetupWrapper.hs, /tmp/glade-0.12.1-12934/glade-0.12.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /tmp/glade-0.12.1-12934/glade-0.12.1/Setup.hs, /tmp/glade-0.12.1-12934/glade-0.12.1/dist/setup/Main.o )
Linking /tmp/glade-0.12.1-12934/glade-0.12.1/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 glade-0.12.1...
setup: The pkg-config package libglade-2.0 version >=2.0.0 is required but it
could not be found.
cabal: Error: some packages failed to install:
glade-0.12.1 failed during the configure step. The exception was:
ExitFailure 1

and

carsten@Carsten-VirtualBox:~$ cabal install wxc
Resolving dependencies...
[1 of 1] Compiling Main             ( /tmp/wxc-0.90.0.4-13078/wxc-0.90.0.4/Setup.hs, /tmp/wxc-0.90.0.4-13078/wxc-0.90.0.4/dist/setup/Main.o )
Linking /tmp/wxc-0.90.0.4-13078/wxc-0.90.0.4/dist/setup/setup ...
Configuring wxc-0.90.0.4...

  Warning: No config found to match: /usr/bin/wx-config --version=2.9 --version-full
           in /usr/lib/x86_64-linux-gnu/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.

setup: failed
cabal: Error: some packages failed to install:
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1

This is really frustrating me - maybe someone can help me here - thank you!

Random Dev
  • 51,810
  • 9
  • 92
  • 119
  • 1
    Both gtk2hs and wxHaskell are bindings only. To install them, you must first install gtk (in the case of gtk2hs) or wx (in the case of wxHaskell), including (if your distribution makes this distinction) the development versions of the libraries. – Daniel Wagner Oct 05 '12 at 08:33
  • I think I did (both) - as for wx: there seem to be a newer (dev) version (2.9.something) that wxHaskell wants - I just try to compile this - for gtk2hs: gtk is installed (by default I think) and the problem is with a missing gladelib... argh – Random Dev Oct 05 '12 at 09:00
  • 1
    Just in case: you need to install `-dev` versions of all dependencies, e.g. `libglade2-dev`. Also, try not to install from source, it is impossible to maintain afterwards. Use a [PPA](https://launchpad.net/~sat-metalab/+archive/metalab/+packages) instead. – n. m. could be an AI Oct 05 '12 at 11:01
  • @n.m. it's not impossible if you're disciplined enough (for one, use a different location for non-package headers and libs). Also, it's not easy to find a ppa for everything (for example, I'm not aware of any existing for flexc++ - although in this case, compiling it from source is hard too because some of it's dependencies aren't in any ppa's I know either). – Cubic Oct 05 '12 at 13:22

1 Answers1

4

I am running 12.04 and everything works fine for me. Are you sure you have libglade2-dev installed ? That should fix it. Coming from ArchLinux i had the same problem at first when i didn't know there were separate dev libraries, i don't remember having to do this in arch.

user1105045
  • 474
  • 3
  • 15
  • I think you are talking about Gtk2Hs right? And indeed that seems to be part of my problem (another one beeing that my PATH did not include the $HOME/.cabal/bin folder) ... right now trying to cabal install glade ... thank you for now :D – Random Dev Oct 05 '12 at 17:13
  • .. and it works - thank you so much man - wish I could give you more reputation :D – Random Dev Oct 05 '12 at 17:16
  • Arch packages come with headers. It is similar to source-based distros like Gentoo in that way. – Salil Oct 11 '12 at 04:00