Open Quuxplusone opened 4 years ago
llvm-10.0 and llvm-10.0.1 fail to compile on an RPi4 using gcc-10.1.0 and glibc-2.31
llvm-10.0 successfully compiles on an RPi4 using gcc-9.2 and glibc-2.30
cmake -LAH -DCMAKE_C_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" -DCMAKE_CXX_FLAGS_RELEASE="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" -DCMAKE_INSTALL_PREFIX=/usr/local -DLLVM_ENABLE_FFI=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_ENABLE_RTTI=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE -DLLVM_BINUTILS_INCDIR=/usr/local/include -Wno-dev -G Ninja ../
... FAILED: lib/libLLVM-10.so : && /usr/local/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -Wl,-z,defs -Wl,-z,nodelete -Wl,-rpath-link,/mnt/sda8/usr/src/llvm-10.0.0.src/build/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libLLVM-10.so -o lib/libLLVM-10.so tools/llvm-shlib/CMakeFiles/LLVM.dir/libllvm.cpp.o -Wl,-rpath,"\$ORIGIN/../lib" -Wl,--version-script,/mnt/sda8/usr/src/llvm-10.0.0.src/build/./lib/tools/llvm-shlib/simple_version_script.map -Wl,--whole-archive lib/libLLVMDemangle.a lib/libLLVMSupport.a lib/libLLVMCore.a lib/libLLVMFuzzMutate.a lib/libLLVMIRReader.a lib/libLLVMCodeGen.a lib/libLLVMSelectionDAG.a lib/libLLVMAsmPrinter.a lib/libLLVMMIRParser.a lib/libLLVMGlobalISel.a lib/libLLVMBinaryFormat.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a lib/libLLVMBitstreamReader.a lib/libLLVMDWARFLinker.a lib/libLLVMFrontendOpenMP.a lib/libLLVMTransformUtils.a lib/libLLVMInstrumentation.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMScalarOpts.a lib/libLLVMipo.a lib/libLLVMVectorize.a lib/libLLVMObjCARCOpts.a lib/libLLVMCoroutines.a lib/libLLVMCFGuard.a lib/libLLVMLinker.a lib/libLLVMAnalysis.a lib/libLLVMLTO.a lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMMCDisassembler.a lib/libLLVMMCA.a lib/libLLVMObject.a lib/libLLVMObjectYAML.a lib/libLLVMOption.a lib/libLLVMRemarks.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMDebugInfoGSYM.a lib/libLLVMDebugInfoMSF.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoPDB.a lib/libLLVMSymbolize.a lib/libLLVMExecutionEngine.a lib/libLLVMInterpreter.a lib/libLLVMJITLink.a lib/libLLVMMCJIT.a lib/libLLVMOrcError.a lib/libLLVMOrcJIT.a lib/libLLVMRuntimeDyld.a lib/libLLVMTarget.a lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmParser.a lib/libLLVMARMDisassembler.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a lib/libLLVMARMUtils.a lib/libLLVMAsmParser.a lib/libLLVMLineEditor.a lib/libLLVMProfileData.a lib/libLLVMCoverage.a lib/libLLVMPasses.a lib/libLLVMTextAPI.a lib/libLLVMDlltoolDriver.a lib/libLLVMLibDriver.a lib/libLLVMXRay.a lib/libLLVMWindowsManifest.a -Wl,--no-whole-archive lib/libLLVMObjCARCOpts.a lib/libLLVMDebugInfoPDB.a /usr/lib/libffi.so lib/libLLVMExecutionEngine.a lib/libLLVMJITLink.a lib/libLLVMOrcError.a lib/libLLVMRuntimeDyld.a lib/libLLVMipo.a lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMInstrumentation.a lib/libLLVMLinker.a lib/libLLVMVectorize.a lib/libLLVMAsmPrinter.a lib/libLLVMDebugInfoDWARF.a lib/libLLVMGlobalISel.a lib/libLLVMSelectionDAG.a lib/libLLVMCodeGen.a lib/libLLVMBitWriter.a lib/libLLVMScalarOpts.a lib/libLLVMAggressiveInstCombine.a lib/libLLVMInstCombine.a lib/libLLVMTransformUtils.a lib/libLLVMCFGuard.a lib/libLLVMTarget.a lib/libLLVMAnalysis.a lib/libLLVMMCDisassembler.a lib/libLLVMProfileData.a lib/libLLVMOption.a lib/libLLVMObject.a lib/libLLVMBitReader.a lib/libLLVMCore.a lib/libLLVMRemarks.a lib/libLLVMBitstreamReader.a lib/libLLVMMCParser.a lib/libLLVMMC.a lib/libLLVMDebugInfoCodeView.a lib/libLLVMDebugInfoMSF.a lib/libLLVMTextAPI.a lib/libLLVMBinaryFormat.a lib/libLLVMSupport.a lib/libLLVMDemangle.a -lz -lrt -ldl -lncursesw -lpthread -lm /usr/local/lib/libxml2.so && : /usr/local/bin/ld: lib/libLLVMOrcJIT.a(Core.cpp.o): in function `std::__future_base::_State_baseV2::_M_break_promise(std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>)': Core.cpp:(.text._ZNSt13__future_base13_State_baseV216_M_break_promiseESt10unique_ptrINS_12_Result_baseENS2_8_DeleterEE[_ZNSt13__future_base13_State_baseV216_M_break_promiseESt10unique_ptrINS_12_Result_baseENS2_8_DeleterEE]+0x120): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMOrcJIT.a(Core.cpp.o): in function `std::promise<llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol> > >::set_value(llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol> >&&)': Core.cpp:(.text._ZNSt7promiseIN4llvm8DenseMapINS0_3orc15SymbolStringPtrENS0_18JITEvaluatedSymbolENS0_12DenseMapInfoIS3_EENS0_6detail12DenseMapPairIS3_S4_EEEEE9set_valueEOSA_[_ZNSt7promiseIN4llvm8DenseMapINS0_3orc15SymbolStringPtrENS0_18JITEvaluatedSymbolENS0_12DenseMapInfoIS3_EENS0_6detail12DenseMapPairIS3_S4_EEEEE9set_valueEOSA_]+0x11c): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMOrcJIT.a(Core.cpp.o): in function `std::future<llvm::DenseMap<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol, llvm::DenseMapInfo<llvm::orc::SymbolStringPtr>, llvm::detail::DenseMapPair<llvm::orc::SymbolStringPtr, llvm::JITEvaluatedSymbol> > >::get()': Core.cpp:(.text._ZNSt6futureIN4llvm8DenseMapINS0_3orc15SymbolStringPtrENS0_18JITEvaluatedSymbolENS0_12DenseMapInfoIS3_EENS0_6detail12DenseMapPairIS3_S4_EEEEE3getEv[_ZNSt6futureIN4llvm8DenseMapINS0_3orc15SymbolStringPtrENS0_18JITEvaluatedSymbolENS0_12DenseMapInfoIS3_EENS0_6detail12DenseMapPairIS3_S4_EEEEE3getEv]+0x78): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >)' /usr/local/bin/ld: lib/libLLVMSupport.a(Parallel.cpp.o): in function `std::promise<void>::set_value()': Parallel.cpp:(.text._ZNSt7promiseIvE9set_valueEv[_ZNSt7promiseIvE9set_valueEv]+0x118): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMSupport.a(Parallel.cpp.o): in function `llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::stop()': Parallel.cpp:(.text._ZN4llvm8parallel6detail12_GLOBAL__N_118ThreadPoolExecutor4stopEv+0x160): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >)' /usr/local/bin/ld: lib/libLLVMSupport.a(Parallel.cpp.o): in function `llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::~ThreadPoolExecutor()': Parallel.cpp:(.text._ZN4llvm8parallel6detail12_GLOBAL__N_118ThreadPoolExecutorD2Ev+0x1f8): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMSupport.a(ThreadPool.cpp.o): in function `std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()': ThreadPool.cpp:(.text._ZNSt13__future_base11_Task_stateISt8functionIFvvEESaIiES2_E6_M_runEv[_ZNSt13__future_base11_Task_stateISt8functionIFvvEESaIiES2_E6_M_runEv]+0xb8): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMSupport.a(ThreadPool.cpp.o): in function `std::packaged_task<void ()>::~packaged_task()': ThreadPool.cpp:(.text._ZNSt13packaged_taskIFvvEED2Ev[_ZNSt13packaged_taskIFvvEED5Ev]+0x100): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o): in function `void llvm::unique_function<void (llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > >)>::CallImpl<llvm::RuntimeDyldImpl::resolveExternalSymbols()::{lambda(llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > >)#1}>(void*, llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > >&)': RuntimeDyld.cpp:(.text._ZN4llvm15unique_functionIFvNS_8ExpectedISt3mapINS_9StringRefENS_18JITEvaluatedSymbolESt4lessIS3_ESaISt4pairIKS3_S4_EEEEEEE8CallImplIZNS_15RuntimeDyldImpl22resolveExternalSymbolsEvEUlSC_E_EEvPvRSC_+0x130): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_notify_all(unsigned int*)' /usr/local/bin/ld: lib/libLLVMRuntimeDyld.a(RuntimeDyld.cpp.o): in function `llvm::RuntimeDyldImpl::resolveExternalSymbols()': RuntimeDyld.cpp:(.text._ZN4llvm15RuntimeDyldImpl22resolveExternalSymbolsEv+0x314): undefined reference to `std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >)' collect2: error: ld returned 1 exit status
Note also that llvm-10.0 builds successfully on an RPi4 with gcc-10.1.0 and glibc-2.31 using aarch64
llvm-10.0 and llvm-10.0.1 fail to compile on an RPi4 using gcc-10.1.0 and glibc-2.31
llvm-10.0 successfully compiles on an RPi4 using gcc-9.2 and glibc-2.30