[haskell-llvm] fatal error with ghci and llvm

Henning Thielemann lemming at henning-thielemann.de
Fri Nov 23 21:34:30 GMT 2012


On Fri, 23 Nov 2012, José Romildo Malaquias wrote:

> On Fri, Nov 23, 2012 at 09:34:19PM +0100, Henning Thielemann wrote:
>>
>> There are problems with the configure procedure of llvm-base. The
>> configure file fetches the llvm-base.buildinfo.in file and replaces the
>> variables with informations for your system. The result ends up in
>>    ~/.ghc/your-ghc-version/package.conf.d/llvm-base-3.0.0.1-some-hash.conf
>>
>> You may post the content of this file for further diagnostics.
>
> The packages have been installed using the package manager on my gentoo
> linux system. So I do not have the above mentioned file. But I could
> locate the following files on the system:
>
> $ locate -i -r 'llvm-base.*conf'
> /usr/lib64/ghc-7.6.1/gentoo/llvm-base-3.0.1.0.conf
> /usr/lib64/ghc-7.6.1/package.conf.d/llvm-base-3.0.1.0-0a76b512a47d36e81e4c0b82deb34fb6.conf
>
> I am attaching the second one.

Yes, this is what I meant. It looks like the config is missing the 
LLVM-3.0 shared object. Do you use LLVM-3.0? That is, it does not look 
like a conflict but like something missing. You may also post your 
llvm-base.buildinfo.in file. My one has this content:

llvm-git> cat base/llvm-base.buildinfo.in
cpp-options: -DTARGET=@llvm_target@
cc-options: @llvm_cppflags@
ghc-options: -pgml @CXX@
extra-libraries: LLVM-3.0 stdc++
extra-lib-dirs: @llvm_extra_libdirs@
ld-options: @llvm_ldoptions@
include-dirs: @llvm_includedir@

(I have locally moved @llvm_cppflags@ from cpp-options to cc-options.)

The critical lines in my llvm-base....conf are:

extra-libraries: LLVM-3.0 stdc++
extra-ghci-libraries:
ld-options: /usr/lib/llvm-3.0/lib/libLLVMXCoreCodeGen.a
             /usr/lib/llvm-3.0/lib/libLLVMTableGen.a
             /usr/lib/llvm-3.0/lib/libLLVMSystemZCodeGen.a
             ...


More information about the Haskell-llvm mailing list