[haskell-llvm] llvm-base with LLVM 3.2

Marcelo Sousa dipython at gmail.com
Sat Jun 16 14:57:33 BST 2012


Hello,

I'm trying to use the llvm-base package with my version of llvm 3.2.
I have no problem installing the llvm-base package but when I try to
build my actual haskell code I get the following linker errors:

/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMInitNativeTarget':
extra.cpp:(.text+0xf): undefined reference to `LLVMInitializeX86TargetMC'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMModuleGetOrInsertFunction':
extra.cpp:(.text+0x3da): undefined reference to
`llvm::Module::getOrInsertFunction(llvm::StringRef,
llvm::FunctionType*)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMHasInitializer':
extra.cpp:(.text+0x44b): undefined reference to
`llvm::GlobalValue::isDeclaration() const'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMBuildGetResult':
extra.cpp:(.text+0x723): undefined reference to
`llvm::ExtractValueInst::getIndexedType(llvm::Type*,
llvm::ArrayRef<unsigned int>)'
extra.cpp:(.text+0x74c): undefined reference to
`llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*,
unsigned int, llvm::Instruction*)'
extra.cpp:(.text+0x803): undefined reference to
`llvm::ExtractValueInst::init(llvm::ArrayRef<unsigned int>,
llvm::Twine const&)'
extra.cpp:(.text+0x89c): undefined reference to
`llvm::ConstantExpr::getExtractValue(llvm::Constant*,
llvm::ArrayRef<unsigned int>)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMSetDoesNotThrow':
extra.cpp:(.text+0xc1f): undefined reference to
`llvm::Function::removeAttribute(unsigned int, llvm::Attributes)'
extra.cpp:(.text+0xc44): undefined reference to
`llvm::Function::addAttribute(unsigned int, llvm::Attributes)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMGetModuleFromAssembly':
extra.cpp:(.text+0xdf8): undefined reference to
`llvm::SMDiagnostic::print(char const*, llvm::raw_ostream&, bool)
const'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMLinkModules':
extra.cpp:(.text+0x110f): undefined reference to
`llvm::Linker::LinkModules(llvm::Module*, llvm::Module*, unsigned int,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>*)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMLoadLibraryPermanently':
extra.cpp:(.text+0x1363): undefined reference to
`llvm::sys::DynamicLibrary::getPermanentLibrary(char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>*)'
extra.cpp:(.text+0x1369): undefined reference to
`llvm::sys::DynamicLibrary::Invalid'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMInlineFunction':
extra.cpp:(.text+0x14f9): undefined reference to
`llvm::InlineFunction(llvm::CallSite, llvm::InlineFunctionInfo&,
bool)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMBuildRetMultiple':
extra.cpp:(.text+0x27ac): undefined reference to
`llvm::UndefValue::get(llvm::Type*)'
extra.cpp:(.text+0x2838): undefined reference to
`llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*,
unsigned int, llvm::Instruction*)'
extra.cpp:(.text+0x287f): undefined reference to
`llvm::InsertValueInst::init(llvm::Value*, llvm::Value*,
llvm::ArrayRef<unsigned int>, llvm::Twine const&)'
extra.cpp:(.text+0x295b): undefined reference to
`llvm::ConstantExpr::getInsertValue(llvm::Constant*, llvm::Constant*,
llvm::ArrayRef<unsigned int>)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(extra.o):
In function `LLVMGetIntrinsic':
extra.cpp:(.text+0x2bbf): undefined reference to
`llvm::Intrinsic::getDeclaration(llvm::Module*, llvm::Intrinsic::ID,
llvm::ArrayRef<llvm::Type*>)'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `sbcV_info':
(.text+0xf4f7): undefined reference to `LLVMStructSetBody'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `sben_info':
(.text+0xf62a): undefined reference to `LLVMGetStructName'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `sbeZ_info':
(.text+0xf6d1): undefined reference to `LLVMStructCreateNamed'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `scCY_info':
(.text+0x144e4): undefined reference to `LLVMSetCleanup'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `scDO_info':
(.text+0x1459c): undefined reference to `LLVMAddClause'
/home/marcelosousa/.cabal/lib/llvm-base-3.0.1.0/ghc-7.0.3/libHSllvm-base-3.0.1.0.a(Core.o):
In function `scEE_info':
(.text+0x14673): undefined reference to `LLVMBuildLandingPad'

Any ideas on how to fix this?
Regards,
Marcelo



More information about the Haskell-llvm mailing list