[Haskell-cafe] Ghci dynamic linking (Was: C++ libraries and GHCI)

Paolo Losi paolo.losi at gmail.com
Tue Sep 29 10:36:57 EDT 2009


Hi all,

I would really appreciate if anyone could
give a look to the following problem.

Thanks in advance!!!
Paolo


---------- Forwarded message ----------
From: Paolo Losi <paolo.losi at gmail.com>
Date: Mon, Sep 14, 2009 at 10:33 AM
Subject: C++ libraries and GHCI
To: glasgow-haskell-users at haskell.org


Hi all,

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

http://hackage.haskell.org/package/HSvm

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-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.1 ... linking ... done.
Loading package HSvm-0.1.0.2.89 ... linking ... <interactive>:
/home/paolo/trash/hsvm/lib/HSvm-0.1.0.2.89/ghc-6.10.4/HSHSvm-0.1.0.2.89.o:
unknown symbol `_ZTV6Kernel'
ghc: unable to load package `HSvm-0.1.0.2.89'

Please note that the symbol is available in libHSHSvm-0.1.0.2.89.a

$ nm HSHSvm-0.1.0.2.89.o |grep _ZTV6Kernel
00000000 V _ZTV6Kernel
$ nm libHSHSvm-0.1.0.2.89.a |grep _ZTV6Kernel
00000000 V _ZTV6Kernel

Can anyone give a look to the problem?

Thanks
Paolo

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



-- 
Paolo Losi
e-mail: paolo at enuan.com
mob:   +39 348 7705261

ENUAN Srl
Via XX Settembre, 12 - 29100 Piacenza


More information about the Haskell-Cafe mailing list