[haskell-llvm] fatal error with ghci and llvm

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


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

> When experimenting with the module LLVM.Core in GHCi on my gentoo linux
> system, I have got a fatal error:
>
>
> $ ghci
> GHCi, version 7.6.1: http://www.haskell.org/ghc/  :? for help
> Loading package ghc-prim ... linking ... done.
> Loading package integer-gmp ... linking ... done.
> Loading package base ... linking ... done.
>
> Prelude> :m + LLVM.Core
>
> Prelude LLVM.Core> IntEQ
> Loading package llvm-base-3.0.1.0 ...
>
> GHCi runtime linker: fatal error: I found a duplicate definition for symbol
>   LLVMAddAlwaysInlinerPass
> whilst processing object file
>   /usr/lib64/llvm/libLLVMipo.a
> This could be caused by:
>   * Loading two different object files which export the same symbol
>   * Specifying the same object file twice on the GHCi command line
>   * An incorrect `package.conf' entry, causing some object to be
>     loaded twice.
> GHCi cannot safely continue in this situation.  Exiting now.  Sorry.

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.


You said earlier that you use a custom path for llvm. Maybe you have 
conflicts between two versions, one in /usr/lib and one in /usr/local/lib?


More information about the Glasgow-haskell-users mailing list