Reputation: 25666
I'm on Ubuntu 13.10 and trying to install wxHaskell. I installed wxWidgets 2.9 from the http://repos.codelite.org/wx3.0/ubuntu/
repository.
The basic cabal install wx
gets me
src/cpp/eljgrid.cpp:61:65: error: no matching function for call to ‘wxGridCellEditor::PaintBackground(wxRect, wxGridCellAttr*)’
self->PaintBackground(wxRect(x, y, w, h), (wxGridCellAttr*)attr);
^
[...]
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.
Downloading from the GitHub repository and building from source gets me:
setup: can't find source for Graphics/UI/WXCore/WxcClassInfo in src/haskell,
dist/build/autogen
Failed to install wxcore-0.90.1.0
cabal: Error: some packages failed to install:
wxcore-0.90.1.0 failed during the building phase. The exception was:
ExitFailure 1
Resolving dependencies...
Configuring wx-0.90.1.0...
cabal: At least the following dependencies are missing:
wxcore >=0.90.1.0
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: wx-0.90.1.0
trying: wx-0.90.1.0:+splitbase
rejecting: wxcore-0.90.0.3, 0.90.0.1, 0.90, 0.13.2.3, 0.13.2.1, 0.13.2,
0.12.1.7, 0.12.1.6, 0.12.1.5, 0.12.1.4, 0.12.1.3, 0.12.1.2, 0.12.1.1,
0.11.1.2, 0.11.1.1, 0.11.1.0, 0.11.0, 0.10.13.0, 0.10.13, 0.10.12, 0.10.11,
0.10.10, 0.10.9, 0.10.8, 0.10.7, 0.10.6, 0.10.5, 0.10.4, 0.10.3, 0.10.2,
0.10.1 (conflict: wx-0.90.1.0:splitbase => wxcore>=0.90.1.0)
What's going on with this and what's required to fix it?
Upvotes: 1
Views: 519
Reputation: 84529
I know this is an old post but it took me a certain time to install wxHaskell (on Linux), therefore it is worth sharing. The instructions given at https://wiki.haskell.org/WxHaskell/Linux seriously need to be refreshed.
First:
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libwxgtk3.0-dev
sudo apt-get install libwxgtk-media3.0-dev
Then (after cabal sandbox init
if you use sandboxes):
cabal install wxdirect
cabal install wxc
cabal install wxcore
cabal install wx
Upvotes: 0
Reputation: 64740
It sounds like you have cloned the github copy of wxHaskell:
git clone https://github.com/wxHaskell/wxHaskell
Then you tried to install wxHaskell without first installing any of its build dependencies. Notice your error message:
cabal: At least the following dependencies are missing:
wxcore >=0.90.1.0
That version of wxcore isn't on hackage (yet), but it is in the repo you JUST cloned (see https://github.com/wxHaskell/wxHaskell/blob/master/wxcore/wxcore.cabal). So first go to the wxcore
directory and cabal install that library.
EDIT: Notice the dependency tree goes deeper. You'll need to install several wx*
packages first.
Upvotes: 1