What gcc version are you using, 4.8 or 4.9?If you are using gcc 4.8, the problem may relate to libstdc++ incompatibility, e.g., the Clang 3.4.2 binary distro was compiled with gcc 4.9, whose libstdc++ is incompatible with the version shipped with gcc 4.8.
For example, here is a similar issue: http://osdir.com/ml/ubuntu-bugs/2014-06/msg07786.htmlI am seeing the same error as yours on my Ubuntu 14.04 box, where gcc version is 4.8.2. Actually, when I invoke the Clang 3.4.2 binary distro, I see the following errors:
$ ~/work/compilers/compiler-install/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/bin/clang -v /home/chenyang/work/compilers/compiler-install/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/bin/clang: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/chenyang/work/compilers/compiler-install/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/bin/clang)
And: $ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_DEBUG_MESSAGE_LENGTH I will build gcc 4.9 and check if it would work.But seems it's hard for us to get around this incompatibility issue. Maybe Eric knows more?
- Yang On 07/17/2014 10:23 AM, John Regehr wrote:
Sorry, I should have said: using the system g++ compiler and linking against the LLVM/Clang 3.4.2 binary distro, I get the error below.But I get the same error when trying to build C-Reduce using clang++ 3.4.2 and linking against clang++ 3.4.2.John On 07/17/2014 11:08 AM, John Regehr wrote:Using the LLVM/Clang 3.4.2 binary distribution for my OS (Ubuntu 14.04) I cannot build C-Reduce, the final clang_delta link fails. Can someone take a look? Using this same compiler I'm able to build LLVM so I suspect the problem is on our side... John/home/regehr/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/lib/libclangDriver.a(Driver.o):/home/ben/development/llvm/3.4/rc1/llvm.src/tools/clang/lib/Driver/Driver.cpp:functionclang::driver::Driver::GetFilePath(char const*, clang::driver::ToolChain const&) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'/home/regehr/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/lib/libclangAST.a(DeclPrinter.o):/home/ben/development/llvm/3.4/rc1/llvm.src/tools/clang/lib/AST/DeclPrinter.cpp:functionclang::declvisitor::Base<clang::declvisitor::make_ptr, (anonymous namespace)::DeclPrinter, void>::Visit(clang::Decl*): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'/home/regehr/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/lib/libclangLex.a(PPMacroExpansion.o):/home/ben/development/llvm/3.4/rc1/llvm.src/tools/clang/lib/Lex/PPMacroExpansion.cpp:functionclang::Preprocessor::ExpandBuiltinMacro(clang::Token&): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'/home/regehr/clang+llvm-3.4.2-x86_64-linux-gnu-ubuntu-14.04/lib/libclangLex.a(Pragma.o):/home/ben/development/llvm/3.4/rc1/llvm.src/tools/clang/lib/Lex/Pragma.cpp:functionclang::Preprocessor::Handle_Pragma(clang::Token&): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'