[Haskell-cafe] Cabal and LLVM bindings

Ville Tirronen aleator at gmail.com
Fri Mar 12 07:02:48 EST 2010

> Do you happen to use template haskell?  It looks like the interpreter
> is trying to load llvm, which is currently not supported.  That
> doesn't explain why it works with ghc --make though.  Do you do
> anything special in your .cabal file?

I do use template haskell for deriving binary instances for  some data
types and
getting proper version tags. But shouldn't touch llvm parts at all.
The cabal file is
as basic as it gets. If I drop template-haskell (and with it pretty
large part of my program)
cabal does not complain.

LLVM library does not in general work in ghci, but how does this affect cabal?

Simple work-around is to make a monolithic .so/dylib out of LLVM and modify
LLVM bindings package to use that instead of linking to .a files.
(Either by hand
or using svn version on llvm that supports ./configure
--enable-shared). This is
rather lot of work though.


> On 11 March 2010 12:30, Ville Tirronen <aleator at gmail.com> wrote:
>> Hi!
>> I'm trying to get cabal build my toy compiler, which is based on llvm
>> bindings on hackage. Everything is fine with ghc --make,
>> but with cabal install I get:
>> Loading package llvm- ... <command line>: can't load .so/.DLL
>> for: LLVMSystem (dlopen(libLLVMSystem.dylib, 9): image not found)
>> cabal: Error: some packages failed to install:
>> QV-0.1 failed during the building phase. The exception was:
>> ExitFailure 1
>> This is done on os x 10.5.8, if that has any relevance.
>> Anyone got any hints on how to proceed with this?
>> Ville Tirronen
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> --
> Push the envelope.  Watch it bend.

More information about the Haskell-Cafe mailing list