mesa: 788fd04dacb9eb1e32010050c57cd2f49779311b (master) The SCons build fails with clang. $ clang -v Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: x86_64-pc-linux-gnu Thread model: posix $ scons [...] clang -o build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_arit build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_arit.o build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_main.o -L/usr/lib/llvm-3.0/lib build/linux-x86_64-debug/gallium/drivers/llvmpipe/libllvmpipe.a build/linux-x86_64-debug/gallium/auxiliary/libgallium.a -lLLVMBitWriter -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMX86Info -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lpthread -lffi -ldl -lm /usr/lib/llvm-3.0/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86TargetMachine::X86TargetMachine(llvm::Target const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::Reloc::Model, llvm::CodeModel::Model, bool)': (.text+0x2cd): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)' [...]
The error points to llvm, specifically /usr/lib/llvm-3.0/lib/libLLVMX86CodeGen.a, not being compiled with clang. Can you check that? OG.
The Make build using clang successfully builds the llvmpipe unit tests so the problem appears to be with SCons only. Perhaps linking should be done with clang++ instead of with clang?
(In reply to comment #2) > Perhaps linking should be done with clang++ instead of with clang? I suspect so. Is $CXX set to clang++?
(In reply to comment #3) > I suspect so. Is $CXX set to clang++? Yes, $CXX is set to clang++. SCons build with clang also fails at the same place on Mac OS X.
commit 4f109ca4e8ca2c1f0a60b52fa79dd907777e8bee Author: Vinson Lee <vlee@freedesktop.org> Date: Tue Jul 24 23:02:18 2012 -0700 scons: Fix build with clang. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.