[cfe-dev] CMake build for clang-check broken on Linux after 241620

Adrian Prantl aprantl at apple.com
Tue Jul 7 16:20:20 PDT 2015


I reverted the responsible commit in r241642.

-- adrian

> On Jul 7, 2015, at 3:43 PM, Siva Chandra <sivachandra at google.com> wrote:
> 
> clang-check fails to link when I do:
> 
> 1. cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ../llvm
> -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5
> 
> 2. ninja clang-check
> 
> Fails with (can be found on the LLDB cmake builder:
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake):
> 
> FAILED: : && /usr/bin/clang++-3.5   -fPIC -fvisibility-inlines-hidden
> -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
> -Wmissing-field-initializers -pedantic -Wno-long-long
> -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11
> -fcolor-diagnostics -fno-common -Woverloaded-virtual
> -fno-strict-aliasing -Wno-nested-anon-types -g
> -Wl,-allow-shlib-undefined
> tools/clang/tools/clang-check/CMakeFiles/clang-check.dir/ClangCheck.cpp.o
> -o bin/clang-check  lib/libLLVMAArch64CodeGen.a
> lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64AsmParser.a
> lib/libLLVMAArch64Desc.a lib/libLLVMAArch64Info.a
> lib/libLLVMAArch64Disassembler.a lib/libLLVMAMDGPUCodeGen.a
> lib/libLLVMAMDGPUAsmPrinter.a lib/libLLVMAMDGPUAsmParser.a
> lib/libLLVMAMDGPUDesc.a lib/libLLVMAMDGPUInfo.a
> lib/libLLVMARMCodeGen.a lib/libLLVMARMAsmPrinter.a
> lib/libLLVMARMAsmParser.a lib/libLLVMARMDesc.a lib/libLLVMARMInfo.a
> lib/libLLVMARMDisassembler.a lib/libLLVMBPFCodeGen.a
> lib/libLLVMBPFAsmPrinter.a lib/libLLVMBPFDesc.a lib/libLLVMBPFInfo.a
> lib/libLLVMCppBackendCodeGen.a lib/libLLVMCppBackendInfo.a
> lib/libLLVMHexagonCodeGen.a lib/libLLVMHexagonDesc.a
> lib/libLLVMHexagonInfo.a lib/libLLVMHexagonDisassembler.a
> lib/libLLVMMipsCodeGen.a lib/libLLVMMipsAsmPrinter.a
> lib/libLLVMMipsAsmParser.a lib/libLLVMMipsDesc.a lib/libLLVMMipsInfo.a
> lib/libLLVMMipsDisassembler.a lib/libLLVMMSP430CodeGen.a
> lib/libLLVMMSP430AsmPrinter.a lib/libLLVMMSP430Desc.a
> lib/libLLVMMSP430Info.a lib/libLLVMNVPTXCodeGen.a
> lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMNVPTXDesc.a
> lib/libLLVMNVPTXInfo.a lib/libLLVMPowerPCCodeGen.a
> lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCAsmParser.a
> lib/libLLVMPowerPCDesc.a lib/libLLVMPowerPCInfo.a
> lib/libLLVMPowerPCDisassembler.a lib/libLLVMSparcCodeGen.a
> lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcAsmParser.a
> lib/libLLVMSparcDesc.a lib/libLLVMSparcInfo.a
> lib/libLLVMSparcDisassembler.a lib/libLLVMSystemZCodeGen.a
> lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZAsmParser.a
> lib/libLLVMSystemZDesc.a lib/libLLVMSystemZInfo.a
> lib/libLLVMSystemZDisassembler.a lib/libLLVMX86CodeGen.a
> lib/libLLVMX86AsmPrinter.a lib/libLLVMX86AsmParser.a
> lib/libLLVMX86Desc.a lib/libLLVMX86Info.a lib/libLLVMX86Disassembler.a
> lib/libLLVMXCoreCodeGen.a lib/libLLVMXCoreAsmPrinter.a
> lib/libLLVMXCoreDesc.a lib/libLLVMXCoreInfo.a
> lib/libLLVMXCoreDisassembler.a lib/libLLVMAnalysis.a
> lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMipa.a
> lib/libLLVMipo.a lib/libLLVMInstCombine.a lib/libLLVMInstrumentation.a
> lib/libLLVMMC.a lib/libLLVMMCParser.a lib/libLLVMObjCARCOpts.a
> lib/libLLVMOption.a lib/libLLVMScalarOpts.a lib/libLLVMSupport.a
> lib/libLLVMTarget.a lib/libLLVMTransformUtils.a lib/libLLVMVectorize.a
> lib/libclangAST.a lib/libclangBasic.a lib/libclangDriver.a
> lib/libclangCodeGen.a lib/libclangFrontend.a
> lib/libclangRewriteFrontend.a lib/libclangStaticAnalyzerFrontend.a
> lib/libclangTooling.a lib/libLLVMAArch64Desc.a
> lib/libLLVMAArch64AsmPrinter.a lib/libLLVMAArch64Info.a
> lib/libLLVMAArch64Utils.a lib/libLLVMAMDGPUAsmPrinter.a
> lib/libLLVMAMDGPUUtils.a lib/libLLVMARMDesc.a
> lib/libLLVMARMAsmPrinter.a lib/libLLVMARMInfo.a
> lib/libLLVMBPFAsmPrinter.a lib/libLLVMHexagonDesc.a
> lib/libLLVMHexagonInfo.a lib/libLLVMMipsAsmPrinter.a
> lib/libLLVMMipsInfo.a lib/libLLVMMSP430AsmPrinter.a
> lib/libLLVMNVPTXAsmPrinter.a lib/libLLVMPowerPCAsmPrinter.a
> lib/libLLVMPowerPCInfo.a lib/libLLVMSparcAsmPrinter.a
> lib/libLLVMSparcInfo.a lib/libLLVMSystemZDesc.a
> lib/libLLVMSystemZAsmPrinter.a lib/libLLVMSystemZInfo.a
> lib/libLLVMX86CodeGen.a lib/libLLVMX86Desc.a
> lib/libLLVMX86AsmPrinter.a lib/libLLVMX86Utils.a lib/libLLVMX86Info.a
> lib/libLLVMXCoreAsmPrinter.a lib/libLLVMAsmPrinter.a
> lib/libLLVMSelectionDAG.a lib/libLLVMCodeGen.a lib/libLLVMXCoreInfo.a
> lib/libLLVMMCDisassembler.a lib/libLLVMipo.a lib/libLLVMVectorize.a
> lib/libLLVMInstrumentation.a lib/libLLVMObjCARCOpts.a
> lib/libLLVMScalarOpts.a lib/libLLVMInstCombine.a lib/libLLVMTarget.a
> lib/libLLVMProfileData.a lib/libLLVMObject.a lib/libLLVMBitWriter.a
> lib/libLLVMIRReader.a lib/libLLVMAsmParser.a lib/libLLVMLinker.a
> lib/libLLVMTransformUtils.a lib/libLLVMipa.a lib/libLLVMAnalysis.a
> lib/libclangStaticAnalyzerCheckers.a lib/libclangStaticAnalyzerCore.a
> lib/libclangFrontend.a lib/libclangDriver.a lib/libLLVMOption.a
> lib/libclangParse.a lib/libLLVMMCParser.a lib/libclangSerialization.a
> lib/libLLVMBitReader.a lib/libclangSema.a lib/libclangEdit.a
> lib/libclangAnalysis.a lib/libclangASTMatchers.a lib/libclangAST.a
> lib/libclangToolingCore.a lib/libclangRewrite.a lib/libclangLex.a
> lib/libclangBasic.a lib/libLLVMCore.a lib/libLLVMMC.a
> lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm
> -Wl,-rpath,"\$ORIGIN/../lib" && :
> lib/libclangCodeGen.a(ObjectFilePCHContainerOperations.cpp.o): In
> function `LLVMInitializeAllTargetInfos()':
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:27:
> undefined reference to `LLVMInitializeAMDGPUTargetInfo'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:29:
> undefined reference to `LLVMInitializeBPFTargetInfo'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:30:
> undefined reference to `LLVMInitializeCppBackendTargetInfo'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:33:
> undefined reference to `LLVMInitializeMSP430TargetInfo'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:34:
> undefined reference to `LLVMInitializeNVPTXTargetInfo'
> lib/libclangCodeGen.a(ObjectFilePCHContainerOperations.cpp.o): In
> function `LLVMInitializeAllTargets()':
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:26:
> undefined reference to `LLVMInitializeAArch64Target'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:27:
> undefined reference to `LLVMInitializeAMDGPUTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:28:
> undefined reference to `LLVMInitializeARMTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:29:
> undefined reference to `LLVMInitializeBPFTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:30:
> undefined reference to `LLVMInitializeCppBackendTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:31:
> undefined reference to `LLVMInitializeHexagonTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:32:
> undefined reference to `LLVMInitializeMipsTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:33:
> undefined reference to `LLVMInitializeMSP430Target'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:34:
> undefined reference to `LLVMInitializeNVPTXTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:35:
> undefined reference to `LLVMInitializePowerPCTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:36:
> undefined reference to `LLVMInitializeSparcTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:37:
> undefined reference to `LLVMInitializeSystemZTarget'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:39:
> undefined reference to `LLVMInitializeXCoreTarget'
> lib/libclangCodeGen.a(ObjectFilePCHContainerOperations.cpp.o): In
> function `LLVMInitializeAllAsmPrinters()':
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:27:
> undefined reference to `LLVMInitializeAArch64AsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:28:
> undefined reference to `LLVMInitializeAMDGPUAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:29:
> undefined reference to `LLVMInitializeARMAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:30:
> undefined reference to `LLVMInitializeBPFAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:31:
> undefined reference to `LLVMInitializeHexagonAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:32:
> undefined reference to `LLVMInitializeMipsAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:33:
> undefined reference to `LLVMInitializeMSP430AsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:34:
> undefined reference to `LLVMInitializeNVPTXAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:35:
> undefined reference to `LLVMInitializePowerPCAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:36:
> undefined reference to `LLVMInitializeSparcAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:37:
> undefined reference to `LLVMInitializeSystemZAsmPrinter'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/AsmPrinters.def:39:
> undefined reference to `LLVMInitializeXCoreAsmPrinter'
> lib/libclangCodeGen.a(ObjectFilePCHContainerOperations.cpp.o): In
> function `LLVMInitializeAllTargetMCs()':
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:27:
> undefined reference to `LLVMInitializeAMDGPUTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:29:
> undefined reference to `LLVMInitializeBPFTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:30:
> undefined reference to `LLVMInitializeCppBackendTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:32:
> undefined reference to `LLVMInitializeMipsTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:33:
> undefined reference to `LLVMInitializeMSP430TargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:34:
> undefined reference to `LLVMInitializeNVPTXTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:35:
> undefined reference to `LLVMInitializePowerPCTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:36:
> undefined reference to `LLVMInitializeSparcTargetMC'
> /usr/local/google/home/sivachandra/llvm_build/include/llvm/Config/Targets.def:39:
> undefined reference to `LLVMInitializeXCoreTargetMC'
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> ninja: build stopped: subcommand failed.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list