[cfe-dev] Error in building clang examples in llvm

Violeta Ilieva vilieva at princeton.edu
Fri May 3 10:27:37 PDT 2013


Hello all,

I have configured the llvm source code on my machine through following the
steps for Unix-like systems (http://clang.llvm.org/get_started.html) and am
currently trying to run the sample plugin print-fns located in
llvm/tools/clang/examples.

According to this discussion (
http://comments.gmane.org/gmane.comp.compilers.clang.user/58) I should run
"make BUILD_EXAMPLES=1 -C tools/clang" in the build directory. When I do
that, I get the following error:

llvm[2]: Linking Debug+Asserts executable clang-interpreter
Undefined symbols:
  "llvm::ParseIR(llvm::MemoryBuffer*, llvm::SMDiagnostic&,
llvm::LLVMContext&)", referenced from:
      clang::CodeGenAction::ExecuteAction()      in
libclangCodeGen.a(CodeGenAction.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [/Users/V/build/Debug+Asserts/bin/clang-interpreter] Error 1
make[1]: *** [clang-interpreter/.makeall] Error 2
make: *** [examples/.makeall] Error 2

The same happens when I run "make" in the clang/examples/PrintFunctionNames
directory in effort to compile the plugin.

Any ideas as to why this occurs?

Thanks,
Violeta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130503/a9b1a27a/attachment.html>


More information about the cfe-dev mailing list