QtCreator Clang Code Model (Qt 5.9.1 & QtC 4.4) ld error



  • Hello,

    I'm having troubles compiling QtCreator on OpenSUSE 42.3 for Clang 3.9.1.

    I successfully built Qt 5.9.2 (std++1y enabled) using the same clang binary.
    QtCreator builds fine when the env variable LLVM_INSTALL_DIR is not set,
    yet when I point that to /usr (or llvm-config --obj-root) it fails with this error:

    cd clangrefactoringbackend/ && ( test -e Makefile || /usr/local/Qt-5.9.2/bin/qmake -o Makefile /nepohome/Developer/qt/qt-creator/src/tools/clangrefactoringbackend/clangrefactoringbackend.pro ) && make -f Makefile 
    make[3]: Entering directory '/nepohome/Developer/qt/qt-creator-build/src/tools/clangrefactoringbackend'
    clang++ -ccc-gcc-name g++ -stdlib=libc++ -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../../lib/qtcreator:$ORIGIN/../../lib/qtcreator/plugins:$ORIGIN:$ORIGIN/..:$ORIGIN/../lib/qtcreator' -Wl,-z,origin -Wl,-rpath,/usr/lib64 -Wl,-rpath,/usr/local/Qt-5.9.2/lib -o ../../../libexec/qtcreator/clangrefactoringbackend .obj/release-shared/refactoringcompilationdatabase.o .obj/release-shared/symbolfinder.o .obj/release-shared/symbollocationfinderaction.o .obj/release-shared/refactoringserver.o .obj/release-shared/macropreprocessorcallbacks.o .obj/release-shared/findusrforcursoraction.o .obj/release-shared/clangquery.o .obj/release-shared/clangtool.o .obj/release-shared/sourcerangeextractor.o .obj/release-shared/locationsourcefilecallbacks.o .obj/release-shared/clangquerygatherer.o .obj/release-shared/sourcerangefilter.o .obj/release-shared/clangrefactoringbackendmain.o   -L/nepohome/Developer/qt/qt-creator-build/lib/qtcreator -lClangbackendipc -lSqlite -lUtils -lclangTooling -lclangIndex -lclangFrontend -lclangParse -lclangSerialization -lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers -lclangASTMatchers -lclangToolingCore -lclangAST -lclangLex -lclangBasic -lLLVMLTO -lLLVMObjCARCOpts -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF -lLLVMMIRParser -lLLVMCoverage -lLLVMTableGen -lLLVMOrcJIT -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMBPFAsmPrinter -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMAMDGPUDisassembler -lLLVMAMDGPUCodeGen -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMObjectYAML -lLLVMLibDriver -lLLVMOption -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMLineEditor -lLLVMPasses -lLLVMipo -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMTransformUtils -lLLVMMC -lLLVMBitWriter -lLLVMBitReader -lLLVMAnalysis -lLLVMProfileData -lLLVMCore -lLLVMSupport -lrt -ldl -ltinfo -lz -lm -L/usr/local/Qt-5.9.2/lib -lQt5Concurrent -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -lGL -lpthread 
    /usr/bin/ld: warning: libtinfo.so.6, needed by /usr/lib64/libedit.so.0, may conflict with libtinfo.so.5
    .obj/release-shared/symbolfinder.o:(.data.rel.ro._ZTVZN5clang7tooling24newFrontendActionFactoryIN12ClangBackEnd16USRFindingActionEEENSt3__110unique_ptrINS0_21FrontendActionFactoryENS4_14default_deleteIS6_EEEEPT_PNS0_19SourceFileCallbacksEE28FrontendActionFactoryAdapter[_ZTVZN5clang7tooling24newFrontendActionFactoryIN12ClangBackEnd16USRFindingActionEEENSt3__110unique_ptrINS0_21FrontendActionFactoryENS4_14default_deleteIS6_EEEEPT_PNS0_19SourceFileCallbacksEE28FrontendActionFactoryAdapter]+0x20): undefined reference to `clang::tooling::FrontendActionFactory::runInvocation(clang::CompilerInvocation*, clang::FileManager*, std::__1::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*)'
    .obj/release-shared/symbolfinder.o:(.data.rel.ro._ZTVZN5clang7tooling24newFrontendActionFactoryIN12ClangBackEnd26SymbolLocationFinderActionEEENSt3__110unique_ptrINS0_21FrontendActionFactoryENS4_14default_deleteIS6_EEEEPT_PNS0_19SourceFileCallbacksEE28FrontendActionFactoryAdapter[_ZTVZN5clang7tooling24newFrontendActionFactoryIN12ClangBackEnd26SymbolLocationFinderActionEEENSt3__110unique_ptrINS0_21FrontendActionFactoryENS4_14default_deleteIS6_EEEEPT_PNS0_19SourceFileCallbacksEE28FrontendActionFactoryAdapter]+0x20): undefined reference to `clang::tooling::FrontendActionFactory::runInvocation(clang::CompilerInvocation*, clang::FileManager*, std::__1::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*)'
    .obj/release-shared/clangquery.o: In function `ClangBackEnd::ClangQuery::findLocations()':
    /nepohome/Developer/qt/qt-creator/src/tools/clangrefactoringbackend/source/clangquery.cpp:75: undefined reference to `clang::tooling::ClangTool::buildASTs(std::__1::vector<std::__1::unique_ptr<clang::ASTUnit, std::__1::default_delete<clang::ASTUnit> >, std::__1::allocator<std::__1::unique_ptr<clang::ASTUnit, std::__1::default_delete<clang::ASTUnit> > > >&)'
    .obj/release-shared/clangtool.o: In function `ClangBackEnd::ClangTool::createTool() const':
    /nepohome/Developer/qt/qt-creator/src/tools/clangrefactoringbackend/source/clangtool.cpp:112: undefined reference to `clang::tooling::ClangTool::ClangTool(clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::shared_ptr<clang::PCHContainerOperations>)'
    clang-3.9.1: error: linker command failed with exit code 1 (use -v to see invocation)
    Makefile:124: recipe for target '../../../libexec/qtcreator/clangrefactoringbackend' failed
    make[3]: *** [../../../libexec/qtcreator/clangrefactoringbackend] Error 1
    make[3]: Leaving directory '/nepohome/Developer/qt/qt-creator-build/src/tools/clangrefactoringbackend'
    Makefile:253: recipe for target 'sub-clangrefactoringbackend-make_first' failed
    make[2]: *** [sub-clangrefactoringbackend-make_first] Error 2
    make[2]: Leaving directory '/nepohome/Developer/qt/qt-creator-build/src/tools'
    Makefile:442: recipe for target 'sub-tools-make_first-ordered' failed
    make[1]: *** [sub-tools-make_first-ordered] Error 2
    make[1]: Leaving directory '/nepohome/Developer/qt/qt-creator-build/src'
    Makefile:46: recipe for target 'sub-src-make_first-ordered' failed
    make: *** [sub-src-make_first-ordered] Error 2
    

    Can anyone give me a hint how to proceed?

    thanks in advance
    Arno


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.