[Haskell-cafe] Re: BerkeleyDBXML linking problems.
Sebastiaan Visser
sfvisser at cs.uu.nl
Tue Jun 30 07:39:09 EDT 2009
(crosspost from haskell-libraries)
Hello all, again.
Meanwhile I've been able to install this package without too much
trouble on a Linux system. Unfortunately MacOSX is still a problem.
Both on Linux and Mac I installed the Berkeley DB and DBXML packages
with `--prefix=/usr' so all include files and libraries end up in a
standard place.
Also both on Linux and Mac I installed the Haskell BerkeleyDB bindings
just with:
cabal install BerkeleyDB
Because the DBXML include files are installed under /usr/include/dbxml/
*.hpp and the BerkeleyDBXML binding accesses them without this prefix
I did:
cabal install BerkeleyDBXML --extra-include-dirs=/usr/include/dbxml
On both system installation is not a problem. Compiling the demo
`adventure' included in de bindings distribution works fine on Linux
but fails on MacOSX. The errors are the ones in my previous mail
below. A full hpaste of it can be found here[1].
Any idea where the difference in behaviour comes from on these
platforms and how to fix this? Unfortunately, my knowledge of the c++
toolchain and Haskell FFI bindings using these is _very_ limited.
Thanks,
Sebastiaan
[1] http://www.hpaste.org/fastcgi/hpaste.fcgi/view?id=6389#a6389
On Jun 26, 2009, at 12:56 PM, Sebastiaan Visser wrote:
> Hello all,
>
> After manually specifying where to find the appropriate include and
> library directories for the dbxml distribution, I succeeded to
> install both the BerkeleyDB and the BerkeleyDBXML Haskell bindings.
> They both nicely show up in `ghc-pkg list'.
>
> But when I try to compile my own test or the demo program included
> in the BerkeleyDBXML package it will kindly present me a dozen or so
> pages of linking errors. The top lines are:
>
> Undefined symbols:
> "std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::_Rep::_M_destroy(std::allocator<char>
> const&)", referenced from:
> __xmlDocument_setContent in
> libHSBerkeleyDBXML-0.6.2.a(dbxml_helper.o)
> ...
>
> Do I have to tell GHC where to find the original dbxml libraries
> when compiling my BerkeleyDBXML aware Haskell programs?
>
> Small system overview:
> - Mac OS X 10.5.7
> - GHC 6.10.3
> - BerkeleyDB 0.7.1
> - BerkeleyDBXML 0.6.2
> - gcc/g++ 4.0.1
>
> Any clue on how to fix this?
>
> Thanks,
>
> --
> Sebastiaan Visser
More information about the Haskell-Cafe
mailing list