Problem building with Cabal + TH + Library with FFI to C++ via C Wrapper
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"
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: