C++ libraries and GHCI

Paolo Losi paolo.losi at gmail.com
Mon Sep 14 04:33:05 EDT 2009

Hi all,

I'm working on a tentative implementation of haskell binding to libsvm [1]:


The package includes libsvm C++ sources.
While it works perfectly with ghc --make (try to install the package and
compile http://bitbucket.org/pao/hsvm/raw/6cf7ca91f1e5/test/test.hs),
it fails with ghci:

(hsvm)(env)paolo at moltrasio:~/trash$ ghci test.hs
GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main> main
Loading package syb ... linking ... done.
Loading package array- ... linking ... done.
Loading package containers- ... linking ... done.
Loading package HSvm- ... linking ... <interactive>:
unknown symbol `_ZTV6Kernel'
ghc: unable to load package `HSvm-'

Please note that the symbol is available in libHSHSvm-

$ nm HSHSvm- |grep _ZTV6Kernel
00000000 V _ZTV6Kernel
$ nm libHSHSvm- |grep _ZTV6Kernel
00000000 V _ZTV6Kernel

Can anyone give a look to the problem?


[1] http://www.csie.ntu.edu.tw/~cjlin/libsvm/

More information about the Glasgow-haskell-users mailing list