As said, the latest llvm-toolchain-3.8 in debian/mipsel is segfaulting because of a linker error. llvm-toolchain-3.7 seems to be fine. /usr/bin/ld: BFD (GNU Binutils for Debian) 2.26 internal error, aborting at ../../bfd/merge.c:909 in _bfd_merged_section_offset /usr/bin/ld: Please report this bug. collect2: error: ld returned 1 exit status you can see the build logs here https://buildd.debian.org/status/package.php?p=llvm-toolchain-3.8&suite=sid and here a failure: https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-3.8&arch=mipsel&ver=1%3A3.8-2&stamp=1457482885 thanks Gianfranco
Hi Gianfranco, Please could you create a (small) testcase that we can use to reproduce the problem. Building an entire toolchain is just too much. At very least a tarball of the object files and libraries involved, along with the linker command line, would help. Cheers Nick
Hi Nick, unfortunately I don't know how to create a small testcase. The failure seems to happen when a lot of .a static libraries are tried to be linked together. I extracted them with some scripting, and put them in a tarball 1,9G mar 19 22:12 foo.tar.gz so maybe the regression is in llvm, because the new 3.8 version tries to link 2 GB of static libraries, and I'm sure the failure is not really a bug :p the old build was linking them dynamically. I think you can close if you want! Sorry for the noise, Gianfranco /usr/bin/g++-5 -fPIC -std=c++0x -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O2 -g -DNDEBUG -Wl,-O3 -Wl,--gc-sections -Wl,-z,relro -Wl,-z,defs -shared -Wl,-soname,libLLVM-3.8.so.1 -o ../../lib/libLLVM-3.8.so.1 CMakeFiles/LLVM.dir/libllvm.cpp.o -Wl,--whole-archive ../../lib/libLLVMSupport.a ../../lib/libLLVMCore.a ../../lib/libLLVMIRReader.a ../../lib/libLLVMCodeGen.a ../../lib/libLLVMSelectionDAG.a ../../lib/libLLVMAsmPrinter.a ../../lib/libLLVMMIRParser.a ../../lib/libLLVMBitReader.a ../../lib/libLLVMBitWriter.a ../../lib/libLLVMTransformUtils.a ../../lib/libLLVMInstrumentation.a ../../lib/libLLVMInstCombine.a ../../lib/libLLVMScalarOpts.a ../../lib/libLLVMipo.a ../../lib/libLLVMVectorize.a ../../lib/libLLVMObjCARCOpts.a ../../lib/libLLVMLinker.a ../../lib/libLLVMAnalysis.a ../../lib/libLLVMLTO.a ../../lib/libLLVMMC.a ../../lib/libLLVMMCParser.a ../../lib/libLLVMMCDisassembler.a ../../lib/libLLVMObject.a ../../lib/libLLVMOption.a ../../lib/libLLVMDebugInfoCodeView.a ../../lib/libLLVMDebugInfoDWARF.a ../../lib/libLLVMDebugInfoPDB.a ../../lib/libLLVMSymbolize.a ../../lib/libLLVMExecutionEngine.a ../../lib/libLLVMInterpreter.a ../../lib/libLLVMMCJIT.a ../../lib/libLLVMOrcJIT.a ../../lib/libLLVMRuntimeDyld.a ../../lib/libLLVMTarget.a ../../lib/libLLVMAArch64CodeGen.a ../../lib/libLLVMAArch64Info.a ../../lib/libLLVMAArch64AsmParser.a ../../lib/libLLVMAArch64Disassembler.a ../../lib/libLLVMAArch64AsmPrinter.a ../../lib/libLLVMAArch64Desc.a ../../lib/libLLVMAArch64Utils.a ../../lib/libLLVMAMDGPUCodeGen.a ../../lib/libLLVMAMDGPUAsmParser.a ../../lib/libLLVMAMDGPUAsmPrinter.a ../../lib/libLLVMAMDGPUInfo.a ../../lib/libLLVMAMDGPUDesc.a ../../lib/libLLVMAMDGPUUtils.a ../../lib/libLLVMARMCodeGen.a ../../lib/libLLVMARMInfo.a ../../lib/libLLVMARMAsmParser.a ../../lib/libLLVMARMDisassembler.a ../../lib/libLLVMARMAsmPrinter.a ../../lib/libLLVMARMDesc.a ../../lib/libLLVMBPFCodeGen.a ../../lib/libLLVMBPFAsmPrinter.a ../../lib/libLLVMBPFInfo.a ../../lib/libLLVMBPFDesc.a ../../lib/libLLVMCppBackendCodeGen.a ../../lib/libLLVMCppBackendInfo.a ../../lib/libLLVMHexagonCodeGen.a ../../lib/libLLVMHexagonAsmParser.a ../../lib/libLLVMHexagonInfo.a ../../lib/libLLVMHexagonDesc.a ../../lib/libLLVMHexagonDisassembler.a ../../lib/libLLVMMipsCodeGen.a ../../lib/libLLVMMipsAsmPrinter.a ../../lib/libLLVMMipsDisassembler.a ../../lib/libLLVMMipsInfo.a ../../lib/libLLVMMipsDesc.a ../../lib/libLLVMMipsAsmParser.a ../../lib/libLLVMMSP430CodeGen.a ../../lib/libLLVMMSP430AsmPrinter.a ../../lib/libLLVMMSP430Info.a ../../lib/libLLVMMSP430Desc.a ../../lib/libLLVMNVPTXCodeGen.a ../../lib/libLLVMNVPTXInfo.a ../../lib/libLLVMNVPTXAsmPrinter.a ../../lib/libLLVMNVPTXDesc.a ../../lib/libLLVMPowerPCCodeGen.a ../../lib/libLLVMPowerPCAsmParser.a ../../lib/libLLVMPowerPCDisassembler.a ../../lib/libLLVMPowerPCAsmPrinter.a ../../lib/libLLVMPowerPCInfo.a ../../lib/libLLVMPowerPCDesc.a ../../lib/libLLVMSparcCodeGen.a ../../lib/libLLVMSparcInfo.a ../../lib/libLLVMSparcDesc.a ../../lib/libLLVMSparcAsmPrinter.a ../../lib/libLLVMSparcAsmParser.a ../../lib/libLLVMSparcDisassembler.a ../../lib/libLLVMSystemZCodeGen.a ../../lib/libLLVMSystemZAsmParser.a ../../lib/libLLVMSystemZDisassembler.a ../../lib/libLLVMSystemZAsmPrinter.a ../../lib/libLLVMSystemZInfo.a ../../lib/libLLVMSystemZDesc.a ../../lib/libLLVMX86CodeGen.a ../../lib/libLLVMX86AsmParser.a ../../lib/libLLVMX86Disassembler.a ../../lib/libLLVMX86AsmPrinter.a ../../lib/libLLVMX86Desc.a ../../lib/libLLVMX86Info.a ../../lib/libLLVMX86Utils.a ../../lib/libLLVMXCoreCodeGen.a ../../lib/libLLVMXCoreDisassembler.a ../../lib/libLLVMXCoreAsmPrinter.a ../../lib/libLLVMXCoreInfo.a ../../lib/libLLVMXCoreDesc.a ../../lib/libLLVMAsmParser.a ../../lib/libLLVMLineEditor.a ../../lib/libLLVMProfileData.a ../../lib/libLLVMPasses.a ../../lib/libLLVMLibDriver.a -Wl,--no-whole-archive ../../lib/libLLVMObjCARCOpts.a ../../lib/libLLVMDebugInfoDWARF.a ../../lib/libLLVMDebugInfoPDB.a -lffi ../../lib/libLLVMExecutionEngine.a ../../lib/libLLVMRuntimeDyld.a ../../lib/libLLVMAArch64Info.a ../../lib/libLLVMAArch64AsmPrinter.a ../../lib/libLLVMAArch64Utils.a ../../lib/libLLVMAMDGPUAsmPrinter.a ../../lib/libLLVMAMDGPUInfo.a ../../lib/libLLVMARMInfo.a ../../lib/libLLVMARMAsmPrinter.a ../../lib/libLLVMBPFAsmPrinter.a ../../lib/libLLVMBPFInfo.a ../../lib/libLLVMHexagonDesc.a ../../lib/libLLVMHexagonInfo.a ../../lib/libLLVMMipsDesc.a ../../lib/libLLVMMipsAsmPrinter.a ../../lib/libLLVMMipsInfo.a ../../lib/libLLVMMSP430AsmPrinter.a ../../lib/libLLVMMSP430Info.a ../../lib/libLLVMNVPTXInfo.a ../../lib/libLLVMNVPTXAsmPrinter.a ../../lib/libLLVMPowerPCAsmPrinter.a ../../lib/libLLVMPowerPCInfo.a ../../lib/libLLVMSparcDesc.a ../../lib/libLLVMSparcAsmPrinter.a ../../lib/libLLVMSparcInfo.a ../../lib/libLLVMSystemZAsmPrinter.a ../../lib/libLLVMSystemZInfo.a ../../lib/libLLVMX86AsmPrinter.a ../../lib/libLLVMX86Utils.a ../../lib/libLLVMSelectionDAG.a ../../lib/libLLVMAsmPrinter.a ../../lib/libLLVMCodeGen.a ../../lib/libLLVMBitWriter.a ../../lib/libLLVMInstrumentation.a ../../lib/libLLVMTarget.a ../../lib/libLLVMXCoreAsmPrinter.a ../../lib/libLLVMMCDisassembler.a ../../lib/libLLVMXCoreInfo.a -ledit ../../lib/libLLVMipo.a ../../lib/libLLVMIRReader.a ../../lib/libLLVMAsmParser.a ../../lib/libLLVMScalarOpts.a ../../lib/libLLVMInstCombine.a ../../lib/libLLVMLinker.a ../../lib/libLLVMProfileData.a ../../lib/libLLVMVectorize.a ../../lib/libLLVMTransformUtils.a ../../lib/libLLVMAnalysis.a ../../lib/libLLVMObject.a ../../lib/libLLVMBitReader.a ../../lib/libLLVMCore.a ../../lib/libLLVMMCParser.a ../../lib/libLLVMMC.a ../../lib/libLLVMOption.a ../../lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm -Wl,-rpath,"\$ORIGIN/../lib" Old build log g++-5 -std=c++0x -g -O2 -Wl,-R -Wl,'$ORIGIN' -Wl,--gc-sections -rdynamic -L/«PKGBUILDDIR»/build-llvm/Release/lib -L/«PKGBUILDDIR»/build-llvm/Release/lib -shared -o /«PKGBUILDDIR»/build-llvm/Release/lib/libLLVM-3.7.so /«PKGBUILDDIR»/build-llvm/tools/llvm-shlib/Release/libllvm.o \ -Wl,--whole-archive -lLLVMPowerPCAsmParser -lLLVMARMDisassembler -lLLVMPowerPCAsmPrinter -lLLVMARMAsmPrinter -lLLVMSystemZInfo -lLLVMMSP430CodeGen -lLLVMMCDisassembler -lLLVMOrcJIT -lLLVMCore -lLLVMPowerPCDesc -lLLVMNVPTXDesc -lLLVMSparcDesc -lLLVMX86AsmParser -lLLVMNVPTXInfo -lLLVMARMAsmParser -lLLVMPowerPCDisassembler -lLLVMMCParser -lLLVMMipsCodeGen -lLLVMSelectionDAG -lLLVMXCoreCodeGen -lLLVMMSP430Desc -lLLVMXCoreDesc -lLLVMLineEditor -lLLVMInstCombine -lLLVMVectorize -lLLVMSparcCodeGen -lLLVMInterpreter -lLLVMHexagonDisassembler -lLLVMAArch64Info -lLLVMBitWriter -lLLVMProfileData -lLLVMScalarOpts -lLLVMAMDGPUDesc -lLLVMSystemZDesc -lLLVMX86CodeGen -lLLVMX86Utils -lLLVMSystemZAsmPrinter -lLLVMXCoreInfo -lLLVMLTO -lLLVMSparcDisassembler -lLLVMCodeGen -lLLVMipa -lLLVMBitReader -lLLVMRuntimeDyld -lLLVMARMCodeGen -lLLVMPowerPCInfo -lLLVMSupport -lLLVMAMDGPUInfo -lLLVMHexagonCodeGen -lLLVMNVPTXAsmPrinter -lLLVMARMDesc -lLLVMX86Disassembler -lLLVMTarget -lLLVMBPFAsmPrinter -lLLVMAMDGPUCodeGen -lLLVMObject -lLLVMCppBackendInfo -lLLVMAsmPrinter -lLLVMMipsAsmPrinter -lLLVMDebugInfoPDB -lLLVMAArch64AsmPrinter -lLLVMX86Desc -lLLVMX86AsmPrinter -lLLVMARMInfo -lLLVMAArch64Desc -lLLVMSparcInfo -lLLVMPowerPCCodeGen -lLLVMIRReader -lLLVMSparcAsmPrinter -lLLVMCppBackendCodeGen -lLLVMBPFDesc -lLLVMPasses -lLLVMMIRParser -lLLVMExecutionEngine -lLLVMAArch64Disassembler -lLLVMHexagonDesc -lLLVMMipsDisassembler -lLLVMMSP430Info -lLLVMAnalysis -lLLVMTransformUtils -lLLVMInstrumentation -lLLVMAsmParser -lLLVMMC -lLLVMXCoreAsmPrinter -lLLVMSystemZDisassembler -lLLVMMipsDesc -lLLVMBPFCodeGen -lLLVMAMDGPUAsmPrinter -lLLVMObjCARCOpts -lLLVMXCoreDisassembler -lLLVMAMDGPUUtils -lLLVMSystemZCodeGen -lLLVMAArch64CodeGen -lLLVMSystemZAsmParser -lLLVMipo -lLLVMAMDGPUAsmParser -lLLVMAArch64AsmParser -lLLVMBPFInfo -lLLVMAArch64Utils -lLLVMLinker -lLLVMDebugInfoDWARF -lLLVMOption -lLLVMHexagonInfo -lLLVMMCJIT -lLLVMX86Info -lLLVMMipsAsmParser -lLLVMMSP430AsmPrinter -lLLVMSparcAsmParser -lLLVMMipsInfo -lLLVMLibDriver -lLLVMNVPTXCodeGen -Wl,--no-whole-archive -Wl,--soname,libLLVM-3.7.so.1 -Wl,-Bsymbolic-functions -Wl,--no-undefined -lz -lpthread -lffi -ledit -ltinfo -ldl -lm
Too much to link...