[Haskell-cafe] wxHaskell not able to link to libstdc++.so

Ahn, Ki Yung kyagrd at gmail.com
Thu Apr 22 20:05:26 EDT 2010


Dear Haskellers,

I heard from a guy who was having problems with wxHaskell using GHC
6.10.x.  I tried it myself and had the exact same problem occurring
using GHC 6.12.x as well.  I am using the debian unstable version of
ghc6 package.

kyagrd at kyagrd:~/tmp$ head bb.hs
import Graphics.UI.WX
import Graphics.UI.WXCore (bitmapGetSize)

main = start viewer

viewer :: IO ()
viewer = do
bm <- bitmapCreateFromFile "~/sample.jpg"
size <- bitmapGetSize bm
f <- frame [text := "viewer", on paint := onPaint bm, clientSize :=size]


kyagrd at kyagrd:~/tmp$ runghc bb.hs
bb.hs: <command line>: can't load .so/.DLL for: stdc++ (libstdc++.so:
cannot open shared object file: No such file or directory)
kyagrd at kyagrd:~/tmp$ ghc bb.hs
bb.o: In function `r43M_info':
(.text+0x48): undefined reference to
`wxzm0zi12zi1zi4_GraphicsziUIziWXziWindow_zdfDimensionsObject_closure'
bb.o: In function `r43O_info':
(.text+0xa8): undefined reference to
`wxzm0zi12zi1zi4_GraphicsziUIziWXziWindow_zdfPaintObject_closure'
...

The problem is there is no libstdc++.so in my Debian system as well as
the guy who uses Ubunto.  What exists is libstdc++.so.6.

kyagrd at kyagrd:~/tmp$ ls /usr/lib/libstdc++.*
/usr/lib/libstdc++.so.6@  /usr/lib/libstdc++.so.6.0.13

I wonder how wxHaskell was even able to successfully configure and
compile at all.  I didn't have wx package installed before, and I
installed it just today and it successfully configured and compiled but
unable to dynamically link to libstdc++.so.

More serious problem is that wxHaskell doesn't work even making a
symbolic link of libstdc++.so from libstdc++.so.6.

I've also tried running ldconfig -v and ldconfig -p as a root, but still
get the same problem.

Is this a commom problem with the libraries linking to libstdc++.so or
is this just the wxHaskell problem?  Or, is this a ghc problem?

--
Ahn, Ki Yung



More information about the Haskell-Cafe mailing list