
Hello. 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. Any clues?

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?

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-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.
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.
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. Romildo
participants (2)
-
Henning Thielemann
-
José Romildo Malaquias