[llvm-dev] [help] Kaleidoscope build fails after llvm-3.8

vivek pandya via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 16 05:48:05 PST 2016

Hello ,

I have build llvm from release_38 branch ( only llvm and clang ) and
install it. My DYLD_LIBRARY_PATH points to installation-directory/lib.

I am compiling example files for Kaleidoscope with following command :

clang++ -g toy.cpp -std=c++11 `llvm-config --cxxflags --ldflags
--system-libs --libs core mcjit native` -O3 -o toy

but it fails with following error:
Undefined symbols for architecture x86_64:
  "llvm::CmpInst::CmpInst(llvm::Type*, llvm::Instruction::OtherOps,
llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, llvm::Twine const&,
llvm::Instruction*)", referenced from:
      llvm::IRBuilder<true, llvm::ConstantFolder,
>::CreateFCmp(llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*,
llvm::Twine const&, llvm::MDNode*) in toy-1f302b.o
  "llvm::DIBuilder::createFunction(llvm::DIScope*, llvm::StringRef,
llvm::StringRef, llvm::DIFile*, unsigned int, llvm::DISubroutineType*,
bool, bool, unsigned int, unsigned int, bool,
llvm::DISubprogram*)", referenced from:
      (anonymous namespace)::FunctionAST::codegen() in toy-1f302b.o
  "vtable for llvm::PHINode", referenced from:
      llvm::IRBuilder<true, llvm::ConstantFolder,
llvm::IRBuilderDefaultInserter<true> >::CreatePHI(llvm::Type*, unsigned
int, llvm::Twine const&) in toy-1f302b.o
  NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
ld: symbol(s) not found for architecture x86_64
clang-3.8: error: linker command failed with exit code 1 (use -v to see

With previous version 3.8.0svn it used to build successfully. Can someone
help me what I am doing wrong ?

*Vivek Pandya*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160216/2b4d950f/attachment.html>

More information about the llvm-dev mailing list