5

I tried to install WX 0.90.0.1 on Haskell Platform 2012.2.0.0 using "cabal install wx" but got the following result:

Configuring wxc-0.90.0.4...
setup.exe: wx-config: does not exist
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install.
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.

Can anyone help?

user1023733
  • 805
  • 5
  • 14
  • try downloading and maually installing wxc .. I mean cabal unpack wxc .. then go inside the folder and do cabal install . – Satvik Sep 11 '12 at 10:25
  • 1
    Are you on Windows? If so, read on... It took me ages and some help which I think I documented at home I'll check later and update if so. Did you follow the instructions at http://www.haskell.org/haskellwiki/WxHaskell/Windows to the letter? With the current version you have to compile wxWidgets from source, the previous one you can use an installer (I went this route), but neither way is straightforward. I feel your pain. – AndrewC Sep 11 '12 at 10:43
  • I've checked, and can't find any documentation of what finally worked. As I recall installing wx-config, trying wxpack, messing with some environment variables and telling it to ignore wx-config at some point in some way, and then starting again. Certainly you'll need wxwidgets compiled and installed first before you do anything with cabal. – AndrewC Sep 12 '12 at 01:17
  • For anyone who runs into a similar error on the Mac: I got around it by first installing wxWidgets: `brew install wxwidgets`. – Hew Wolff Jun 19 '17 at 14:48

2 Answers2

4

I had the same problem with wxc-0.90.0.4, but failed during the build process and found that the error had been corrected in the Github repository for wxHaskell.

The error can be fixed by unpacking wxc as suggested by Satvik: cabal unpack wxc

Then modify the few lines of code as per the Github repository above and then in the wxc directory do: cabal install

After that you should be able to do: cabal install vx

As an alternative use the version that is built against wxWidgets 2.8: cabal install wx-0.13.2.3

Community
  • 1
  • 1
Mikkel
  • 762
  • 5
  • 17
  • One year later, this problem is still there... following your advice to change the line of code in wxc did not work for me :( Trying to install wx-0.13.2.3 also fails: wx-0.13.2.3 depends on wxcore-0.13.2.3 which failed to install. – Renato Mar 15 '14 at 10:48
1

I did the following :

  1. sudo apt-get install libwxgtk2.9-0

  2. sudo apt-get install libwxgtk2.9-dev

  3. cabal install wx-0.13.2.3

and it was OK.

Bikash Gyawali
  • 969
  • 2
  • 15
  • 33