Problem building with Cabal + TH + Library with FFI to C++ via C Wrapper

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem building with Cabal + TH + Library with FFI to C++ via C Wrapper

Dear Cafe,

I have recently run into a very annoying issue that I was not able to get around. I have a local package that makes use of the snappy compression library, which boasts bindings to C++ through a C wrapper.

Everything compiles fine with ghc --make, but cabal install hits a wall when TemplateHaskell kicks in and decides to load the entire dependency chain.

Here is the important bit of the error message I get after running "cabal install"

Loading package snappy- ... linking ... ghc: /home/ubuntu/.cabal/lib/snappy- unknown symbol `_ZTV8BSSource'
ghc: unable to load package `snappy-'

I'm quite certain all the libs are in PATH. "cabal install snappy" installs fine when typed separately by itself and everything works fine (the program works, including compression via snappy) when I compile my local package with ghc --make.

The problem only occurs on a Ubuntu 64-bit server, and I wasn't able to replicate the issue on my local OS X box. On my local, cabal install works just fine.

I did find a previous note on Cafe with the exact same problem, but no solution was posted at the time:

Any help is much appreciated.


Haskell-Cafe mailing list
[hidden email]