[haskell-llvm] fatal error with ghci and llvm

José Romildo Malaquias j.romildo at gmail.com
Fri Nov 23 21:58:26 CET 2012

On Fri, Nov 23, 2012 at 09:34:19PM +0100, Henning Thielemann wrote:
> 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- ...
> >
> > 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-
> 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'

I am attaching the second one.

> 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?

I did not say that. Probably it was another person.

-------------- next part --------------
name: llvm-base
id: llvm-base-
license: BSD3
maintainer: Bryan O'Sullivan <bos at serpentine.com>, Lennart Augustsson <lennart at augustsson.net>
stability: experimental
homepage: https://github.com/bos/llvm
synopsis: FFI bindings to the LLVM compiler toolkit.
description: FFI bindings to the LLVM compiler toolkit.
             We try to stay up to date with LLVM releases.  The current version
             of this package is compatible with LLVM 3.0 and 2.9.  Please
             understand that the package may or may not work against older LLVM
             releases; we don't have the time or resources to test across
             multiple releases.
             * New in 3.0: Builds against LLVM 3.0.
             * New in Builds against LLVM 2.9.
             * New in Util.Memory for memory related intrinsics.
             * New in Adapted to LLVM 2.8 (removed support for Union types).
category: Compilers/Interpreters, Code Generation
author: Bryan O'Sullivan, Lennart Augustsson
exposed: True
exposed-modules: LLVM.FFI.Analysis LLVM.FFI.BitReader
                 LLVM.FFI.BitWriter LLVM.FFI.Core LLVM.FFI.ExecutionEngine
                 LLVM.FFI.Support LLVM.FFI.Target LLVM.FFI.Transforms.IPO
                 LLVM.FFI.Transforms.Scalar LLVM.Target.Native
hidden-modules: LLVM.Target.ARM LLVM.Target.Alpha
                LLVM.Target.Blackfin LLVM.Target.CBackend LLVM.Target.CellSPU
                LLVM.Target.CppBackend LLVM.Target.MSP430 LLVM.Target.Mips
                LLVM.Target.PIC16 LLVM.Target.PowerPC LLVM.Target.Sparc
                LLVM.Target.SystemZ LLVM.Target.X86 LLVM.Target.XCore
trusted: False
import-dirs: /usr/lib64/llvm-base-
library-dirs: /usr/lib64/llvm-base-
hs-libraries: HSllvm-base-
extra-libraries: LLVMCppBackendCodeGen LLVMCppBackendInfo
                 LLVMAsmParser LLVMTableGen LLVMDebugInfo LLVMX86CodeGen
                 LLVMSelectionDAG LLVMAsmPrinter LLVMX86AsmParser
                 LLVMX86Disassembler LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter
                 LLVMX86Utils LLVMJIT LLVMMCDisassembler LLVMMCParser
                 LLVMInstrumentation LLVMInterpreter LLVMCodeGen LLVMipo
                 LLVMVectorize LLVMScalarOpts LLVMInstCombine LLVMLinker
                 LLVMTransformUtils LLVMipa LLVMAnalysis LLVMArchive LLVMBitReader
                 LLVMBitWriter LLVMMCJIT LLVMRuntimeDyld LLVMExecutionEngine
                 LLVMTarget LLVMMC LLVMObject LLVMCore LLVMSupport pthread ffi dl m
include-dirs: /usr/include
depends: base-
haddock-interfaces: /usr/share/doc/llvm-base-
haddock-html: /usr/share/doc/llvm-base-

More information about the Glasgow-haskell-users mailing list