Open zmodem opened 9 years ago
This is now the last test we need to patch around downstream because it doesn't just work.
This should eventually be fixed by passing CMAKE_C*_FLAGS through to where Go can see them.
In the meantime, you could work around the issue by moving the flag into $CC/$CXX.
Is this:
/work/chromium/src/tools/clang/scripts/../../../third_party/llvm/../llvm- bootstrap-install/bin/clang++
the correct path to the compiler used to build LLVM?
Yup.
Did you configure cmake to pass any additional flags to the compiler (maybe to link against another standard library?)
Yes, I invoke cmake like this:
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_THREADS=OFF -DCMAKE_C_COMPILER=/work/chromium/src/tools/clang/scripts/../../../third_party/llvm/../llvm-bootstrap-install/bin/clang -DCMAKE_CXX_COMPILER=/work/chromium/src/tools/clang/scripts/../../../third_party/llvm/../llvm-bootstrap-install/bin/clang++ -DCMAKE_C_FLAGS=--gcc-toolchain=/work/gcc482prefix -DCMAKE_CXX_FLAGS=--gcc-toolchain=/work/gcc482prefix -DCMAKE_EXE_LINKER_FLAGS= -DCMAKE_SHARED_LINKER_FLAGS= -DCMAKE_MODULE_LINKER_FLAGS= -DCMAKE_INSTALL_PREFIX=/work/chromium/src/tools/clang/scripts/../../../third_party/llvm/../llvm-build/Release+Asserts -DCHROMIUM_TOOLS_SRC=/work/chromium/src/tools/clang/scripts/.. '-DCHROMIUM_TOOLS=plugins;blink_gc_plugin' /work/chromium/src/tools/clang/scripts/../../../third_party/llvm
The important bit is -DCMAKE_CXX_FLAGS=--gcc-toolchain=/work/gcc482prefix, which points Clang to a newer GCC than my system one.
This set-up is probably uncommon, so I don't expect anyone to jump through hoops to accommodate it, I mostly just filed this to keep track of the test failure.
Is this:
/work/chromium/src/tools/clang/scripts/../../../third_party/llvm/../llvm-bootstrap-install/bin/clang++
the correct path to the compiler used to build LLVM?
Did you configure cmake to pass any additional flags to the compiler (maybe to link against another standard library?)
Output from llvm-go test -x I tried with LLVM r221592 and still get the same error. Attaching the output when adding the -x flag.
Are you sure you are on trunk? That output looks like it came from a version of LLVM pre-r220462.
If you are still having problems, you can try modifying the first line of the test/Bindings/Go/go.test file to look like this:
; RUN: llvm-go test -x llvm.org/llvm/bindings/go/llvm
That should show you the subcommands that the "go" command is running.
I was using tags/google/stable/2014-10-28 which corresponds to r220284.
I'll see if it still happens on trunk.
Are you sure you are on trunk? That output looks like it came from a version of LLVM pre-r220462.
If you are still having problems, you can try modifying the first line of the test/Bindings/Go/go.test file to look like this:
; RUN: llvm-go test -x llvm.org/llvm/bindings/go/llvm
That should show you the subcommands that the "go" command is running.
Extended Description
Bindings/Go/go.test fails on my machine when running in an environment that doesn't have a C++11-capable compiler on PATH.
From what I understand, the test runs cmake, inputs flags based on llvm-flags and then tries to build parts of LLVM, which seems a little brittle.
FAIL: LLVM :: Bindings/Go/go.test (15805 of 19507) **** TEST 'LLVM :: Bindings/Go/go.test' FAILED **** Script:
cd /usr/local/google/work/chromium/src/third_party/llvm/test/Bindings/Go/../../../bindings/go/llvm && env CGO_CPPFLAGS="$(/work/chromium/src/third_party/llvm-build/Release+Asserts/./bin/llvm-config --cppflags)" CGO_CXXFLAGS=-std=c++11 CGO_LDFLAGS="$(/work/chromium/src/third_party/llvm-build/Release+Asserts/./bin/llvm-config --ldflags --libs --system-libs $(../build.sh --print-components)) $CGO_LDFLAGS" /usr/lib/google-golang/bin/go test -tags byollvm .
Exit Code: 2
Command Output (stdout):
FAIL _/usr/local/google/work/chromium/src/third_party/llvm/bindings/go/llvm [build failed]
-- Command Output (stderr):
_/usr/local/google/work/chromium/src/third_party/llvm/bindings/go/llvm
/work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMMCJIT.a(MCJIT.cpp.o):/work/chromium/src/third_party/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp:function llvm::LinkingMemoryManager::getSymbolAddress(std::string const&): error: undefined reference to 'std::throw_out_of_range_fmt(char const, ...)' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86ISelLowering.cpp.o):/work/chromium/src/third_party/llvm/lib/Target/X86/X86ISelLowering.cpp:function llvm::X86TargetLowering::LowerVECTOR_SHUFFLE(llvm::SDValue, llvm::SelectionDAG&) const: error: undefined reference to 'std::__throw_out_of_range_fmt(char const, ...)' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMAsmPrinter.a(DwarfDebug.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:function llvm::LexicalScopes::LexicalScopes(): error: undefined reference to 'std::detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMAsmPrinter.a(DwarfDebug.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:function llvm::LexicalScopes::LexicalScopes(): error: undefined reference to 'std::detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMAsmPrinter.a(DwarfDebug.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:function llvm::LexicalScopes::LexicalScopes(): error: undefined reference to 'std::detail::_Prime_rehash_policy::_M_next_bkt(unsigned long) const' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMAsmPrinter.a(WinCodeViewLineTables.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp:function llvm::WinCodeViewLineTables::getFullFilepath(llvm::MDNode const*): error: undefined reference to 'std::throw_out_of_range_fmt(char const, ...)' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMAsmPrinter.a(WinCodeViewLineTables.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp:function llvm::WinCodeViewLineTables::getFullFilepath(llvm::MDNode const): error: undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMCodeGen.a(LexicalScopes.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/LexicalScopes.cpp:function _ZNSt10_HashtableIPKN4llvm6MDNodeESt4pairIKS3_NS0_12LexicalScopeEESaIS7_ENSt8detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_emplaceIJRKSt21piecewise_construct_tSt5tupleIJRNS0_12DIDescriptorEEESP_IJRPS6_SR_ODnObEEEEES4_INS9_14_Node_iteratorIS7_Lb0ELb0EEEbESt17integralconstantIbLb1EEDpOT: error: undefined reference to 'std::detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMCodeGen.a(LexicalScopes.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/LexicalScopes.cpp:function _ZNSt10_HashtableISt4pairIPKN4llvm6MDNodeES4_ES0_IKS5_NS1_12LexicalScopeEESaIS8_ENSt8detail10_Select1stESt8equal_toIS5_ENS1_9pair_hashIS4_S4_EENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRKSt21piecewise_construct_tSt5tupleIJS5_EESQ_IJPS7_NS1_14DILexicalBlockEPS2_bEEEEES0_INSA_14_Node_iteratorIS8_Lb0ELb1EEEbESt17integralconstantIbLb1EEDpOT: error: undefined reference to 'std::detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const' /work/chromium/src/third_party/llvm-build/Release+Asserts/lib/libLLVMCodeGen.a(LexicalScopes.cpp.o):/work/chromium/src/third_party/llvm/lib/CodeGen/LexicalScopes.cpp:function _ZNSt10_HashtableIPKN4llvm6MDNodeESt4pairIKS3_NS0_12LexicalScopeEESaIS7_ENSt8detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_emplaceIJRKSt21piecewise_construct_tSt5tupleIJPS1_EESP_IJPS6_NS0_12DIDescriptorEDnbEEEEES4_INS9_14_Node_iteratorIS7_Lb0ELb0EEEbESt17integralconstantIbLb1EEDpOT: error: undefined reference to 'std::__detail::_Prime_rehash_policy::_M_need_rehash(unsigned long, unsigned long, unsigned long) const' clang-3.6: error: linker command failed with exit code 1 (use -v to see invocation)
--