4

Env:

  • OS: feodra 16
  • haskell-platform
  • wxGTK-devel
  • ghc 7.0.4

I am trying to install wxHaskell with

cabal install wx

Then these errors are given.

Missing dependencies on foreign libraries: * Missing C libraries: wx_baseu-2.8, wx_baseu_net-2.8, wx_baseu_xml-2.8, wx_gtk2u_core-2.8, wx_gtk2u_adv-2.8, wx_gtk2u_html-2.8, wx_gtk2u_qa-2.8, wx_gtk2u_xrc-2.8, wx_gtk2u_aui-2.8, wx_gtk2u_richtext-2.8, wx_gtk2u_media-2.8, wx_gtk2u_stc-2.8, wx_gtk2u_gl-2.8

And these libraries actually exist in /usr/lib I type following in terminal

ls libwx*.so

and found libs:

  • libwx_baseu-2.8.so
  • libwx_gtk2u_aui-2.8.so
  • libwx_gtk2u_gl-2.8.so
  • ......

I tried cabal install wx --exteral-lib-dirs=/usr/lib , but still no luck.

jilen
  • 5,633
  • 3
  • 35
  • 84

4 Answers4

4

I am not a wx expert, but you likely additionally need the C headers for these libraries. Look for your distribution's "development" package for these libraries; in many distributions, these packages are named the same as the library package itself, but with "-dev" added at the end of the name.

Daniel Wagner
  • 145,880
  • 9
  • 220
  • 380
3
sudo apt-get install libwxgtk-media3.0-dev

works for me

ndong
  • 31
  • 1
  • This command helps tremendously! I got stuck on this for a long time and installing `libwxgtk-media3.0-dev` solves my C library dependency issue. – AlienKevin Feb 24 '20 at 04:09
2

I have figured out the issue (and it only took me the best part of a month :))--you need to have g++ installed on your machine. You can install it with sudo yum install gcc-c++.

Tikhon Jelvis
  • 67,485
  • 18
  • 177
  • 214
  • thanks the error message is really misleading. With fedora I install gcc-c++ package and everything is ok! – jilen Apr 12 '12 at 12:10
  • 1
    Yeah. I spent forever trying out different library directories and stuff with no luck before seeing I needed g++. After that everything worked, which was anticlimactic. – Tikhon Jelvis Apr 12 '12 at 16:12
  • Thank you again!!! I am seeking in the wx-core source code, but... with no lucky. – jilen Apr 12 '12 at 16:20
  • You can get the source (assuming you have the package already) using `cabal unpack wxcore`. If you want to see the source of a package without installing it, you can use `fetch`: `cabal fetch wxcore; cabal unpack wxcore`. However, you probably already have the package and don't need to fetch it. – Tikhon Jelvis Apr 12 '12 at 16:26
1

I don't have a solution, but I hit the exact same problem last night on a fresh Debian Wheezy install, which makes me think that it might be a packaging problem with the wx in cabal.

mvarela
  • 209
  • 1
  • 3
  • 8