bos/llvm — Issue #27: Linking failure when using llvm-base
Author: Nenmin
Created: 2012-01-22 08:44:29+00:00
State: open

I'm on Arch Linux using llvm-3.0-1. I did a cabal install of llvm-base 3.0.0.0, and everything went fine.

But when I try to build a program that imports LLVM.FFI.Core, I get

[4 of 4] Compiling Main ( Main.hs, Main.o )
Linking Main ...
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `s9Pa_info':
(.text+0xa432): undefined reference to `LLVMOpaqueTypeInContext'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sbh8_info':
(.text+0xf902): undefined reference to `LLVMResolveTypeHandle'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sbhK_info':
(.text+0xf99c): undefined reference to `LLVMRefineType'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sblI_info':
(.text+0xfd6d): undefined reference to `LLVMDisposeTypeHandle'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sbnj_info':
(.text+0xfee2): undefined reference to `LLVMCreateTypeHandle'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `scFX_info':
(.text+0x147fa): undefined reference to `LLVMBuildUnwind'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sdl3_info':
(.text+0x16ec4): undefined reference to `LLVMDeleteTypeName'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `sdlU_info':
(.text+0x16f8d): undefined reference to `LLVMAddTypeName'
/home/karl/.cabal/lib/llvm-base-3.0.0.0/ghc-7.0.3/libHSllvm-base-3.0.0.0.a(Core.o): In function `seTF_info':
(.text+0x1ce7e): undefined reference to `LLVMOpaqueType'
collect2: ld returned 1 exit status