Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.0
-
OpenMandriva Cooker - meaning LLVM/Clang 10.0.1, cmake 3.18.0-rc2
Description
Trying to build qttools from the dev branch fails with a load of unresolved LLVM and clang symbols when linking lupdate.
It is missing the following libraries:
LLVMSupport clangBasic clangTooling clangAST clangFrontend clangLex clang-cpp
I'm attaching a workaround patch, but chances are WarpLibClang::WrapLibClang needs to be fixed to detect the needed libraries instead.
Build output without the patch:
[562/709] Linking CXX executable bin/lupdate FAILED: bin/lupdate : && /usr/bin/clang++ -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -Wl,-O2 -Wl,--no-undefined -flto src/linguist/lupdate/CMakeFiles/lupdate.dir/lupdate_autogen/mocs_compilation.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/numerus.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/po.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/projectdescriptionreader.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/qm.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/qph.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/qrcreader.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/runqttool.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/simtexth.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/translator.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/translatormessage.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/ts.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/xliff.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/__/shared/xmlparser.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/cpp.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/java.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/main.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/merge.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/ui.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/qdeclarative.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/clangtoolastreader.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/cpp_clang.cpp.o src/linguist/lupdate/CMakeFiles/lupdate.dir/lupdatepreprocessoraction.cpp.o -o bin/lupdate /usr/lib64/qt6/lib/libQt6QmlDevTools.a /usr/lib64/qt6/lib/libQt6Core.so.6.0.0 /usr/lib64/libclang.so.10 /usr/lib64/libclangHandleCXX.so.10.0.1 -lpthread && : ld: error: undefined symbol: llvm::cl::OptionCategory::registerCategory() >>> referenced by qarraydata.h:0 (/usr/lib64/qt6/include/QtCore/qarraydata.h:0) >>> lto.tmp:(_GLOBAL__sub_I_cpp_clang.cpp) ld: error: undefined symbol: llvm::StringRef::find(llvm::StringRef, unsigned long) const >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by StringRef.h:453 (/usr/include/llvm/ADT/StringRef.h:453) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced 27 more times ld: error: undefined symbol: llvm::StringRef::find_first_of(llvm::StringRef, unsigned long) const >>> referenced by cpp_clang.cpp:101 (../src/linguist/lupdate/cpp_clang.cpp:101) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) >>> referenced by clangtoolastreader.cpp:416 (../src/linguist/lupdate/clangtoolastreader.cpp:416) >>> lto.tmp:(LupdateVisitor::rawCommentsFromSourceLocation(clang::SourceLocation) const) >>> referenced by clangtoolastreader.cpp:421 (../src/linguist/lupdate/clangtoolastreader.cpp:421) >>> lto.tmp:(LupdateVisitor::rawCommentsFromSourceLocation(clang::SourceLocation) const) ld: error: undefined symbol: clang::tooling::CommonOptionsParser::CommonOptionsParser(int&, char const**, llvm::cl::OptionCategory&, llvm::cl::NumOccurrencesFlag, char const*) >>> referenced by CommonOptionsParser.h:78 (/usr/include/clang/Tooling/CommonOptionsParser.h:78) >>> lto.tmp:(processSources(Translator&, QStringList const&, ConversionData&)) ld: error: undefined symbol: clang::Decl::castFromDeclContext(clang::DeclContext const*) >>> referenced by DeclBase.h:2473 (/usr/include/clang/AST/DeclBase.h:2473) >>> lto.tmp:(LupdatePrivate::contextForNoopMacro(clang::NamedDecl*)) ld: error: undefined symbol: clang::DeclarationName::getAsString[abi:cxx11]() const >>> referenced by clangtoolastreader.cpp:51 (../src/linguist/lupdate/clangtoolastreader.cpp:51) >>> lto.tmp:(LupdatePrivate::contextForNoopMacro(clang::NamedDecl*)) >>> referenced by clangtoolastreader.cpp:55 (../src/linguist/lupdate/clangtoolastreader.cpp:55) >>> lto.tmp:(LupdatePrivate::contextForNoopMacro(clang::NamedDecl*)) ld: error: undefined symbol: clang::TypeWithKeyword::getKeywordForTagTypeKind(clang::TagTypeKind) >>> referenced by Type.h:5270 (/usr/include/clang/AST/Type.h:5270) >>> lto.tmp:(LupdatePrivate::contextForNoopMacro(clang::NamedDecl*)) ld: error: undefined symbol: clang::TypeWithKeyword::getKeywordName(clang::ElaboratedTypeKeyword) >>> referenced by Type.h:5270 (/usr/include/clang/AST/Type.h:5270) >>> lto.tmp:(LupdatePrivate::contextForNoopMacro(clang::NamedDecl*)) ld: error: undefined symbol: vtable for llvm::raw_string_ostream >>> referenced by raw_ostream.h:527 (/usr/include/llvm/Support/raw_ostream.h:527) >>> lto.tmp:(LupdatePrivate::contextForFunctionDecl(clang::FunctionDecl*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)) >>> referenced by raw_ostream.h:527 (/usr/include/llvm/Support/raw_ostream.h:527) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction) ld: error: undefined symbol: clang::NamedDecl::printQualifiedName(llvm::raw_ostream&) const >>> referenced by clangtoolastreader.cpp:70 (../src/linguist/lupdate/clangtoolastreader.cpp:70) >>> lto.tmp:(LupdatePrivate::contextForFunctionDecl(clang::FunctionDecl*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)) ld: error: undefined symbol: llvm::raw_string_ostream::~raw_string_ostream() >>> referenced by clangtoolastreader.cpp:71 (../src/linguist/lupdate/clangtoolastreader.cpp:71) >>> lto.tmp:(LupdatePrivate::contextForFunctionDecl(clang::FunctionDecl*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)) >>> referenced by clangtoolastreader.cpp:227 (../src/linguist/lupdate/clangtoolastreader.cpp:227) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: clang::CallExpr::getBeginLoc() const >>> referenced by clangtoolastreader.cpp:154 (../src/linguist/lupdate/clangtoolastreader.cpp:154) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) >>> referenced by clangtoolastreader.cpp:179 (../src/linguist/lupdate/clangtoolastreader.cpp:179) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) >>> referenced by clangtoolastreader.cpp:323 (../src/linguist/lupdate/clangtoolastreader.cpp:323) >>> lto.tmp:(LupdateVisitor::rawCommentsForCallExpr(clang::CallExpr const*) const) ld: error: undefined symbol: clang::Expr::getReferencedDeclOfCallee() >>> referenced by Expr.h:2675 (/usr/include/clang/AST/Expr.h:2675) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: clang::DeclarationNameInfo::getAsString[abi:cxx11]() const >>> referenced by clangtoolastreader.cpp:169 (../src/linguist/lupdate/clangtoolastreader.cpp:169) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: clang::SourceManager::getFileLocSlowCase(clang::SourceLocation) const >>> referenced by SourceManager.h:1171 (/usr/include/clang/Basic/SourceManager.h:1171) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: clang::SourceManager::getPresumedLoc(clang::SourceLocation, bool) const >>> referenced by clangtoolastreader.cpp:182 (../src/linguist/lupdate/clangtoolastreader.cpp:182) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) >>> referenced by clangtoolastreader.cpp:309 (../src/linguist/lupdate/clangtoolastreader.cpp:309) >>> lto.tmp:(LupdateASTConsumer::HandleTranslationUnit(clang::ASTContext&)) ld: error: undefined symbol: clang::LangOptions::LangOptions() >>> referenced by clangtoolastreader.cpp:219 (../src/linguist/lupdate/clangtoolastreader.cpp:219) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: clang::Stmt::printPretty(llvm::raw_ostream&, clang::PrinterHelper*, clang::PrintingPolicy const&, unsigned int, llvm::StringRef, clang::ASTContext const*) const >>> referenced by clangtoolastreader.cpp:226 (../src/linguist/lupdate/clangtoolastreader.cpp:226) >>> lto.tmp:(LupdateVisitor::VisitCallExpr(clang::CallExpr*)) ld: error: undefined symbol: llvm::StringRef::find_first_not_of(llvm::StringRef, unsigned long) const >>> referenced by StringRef.h:819 (/usr/include/llvm/ADT/StringRef.h:819) >>> lto.tmp:(LupdatePrivate::cleanQuote(llvm::StringRef, LupdatePrivate::QuoteCompulsary)) >>> referenced by StringRef.h:819 (/usr/include/llvm/ADT/StringRef.h:819) >>> lto.tmp:(LupdatePPCallbacks::MacroExpands(clang::Token const&, clang::MacroDefinition const&, clang::SourceRange, clang::MacroArgs const*)) ld: error: undefined symbol: llvm::StringRef::find_last_not_of(llvm::StringRef, unsigned long) const >>> referenced by StringRef.h:833 (/usr/include/llvm/ADT/StringRef.h:833) >>> lto.tmp:(LupdatePrivate::cleanQuote(llvm::StringRef, LupdatePrivate::QuoteCompulsary)) >>> referenced by StringRef.h:833 (/usr/include/llvm/ADT/StringRef.h:833) >>> lto.tmp:(LupdatePPCallbacks::MacroExpands(clang::Token const&, clang::MacroDefinition const&, clang::SourceRange, clang::MacroArgs const*)) ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Attachments
Issue Links
- relates to
-
QTBUG-103796 QtTools fails with Ubuntu 22.04: .rodata._ZTVN12_GLOBAL__N_130FixedCompilationDatabasePluginE' can not be used when making a PIE object
- Closed
-
QTBUG-102127 Can't build qttools/6.2.3@qt/everywhere on ubuntu
- Closed
-
QTBUG-103727 Build issue with qt-6.3.0 from git on Slackware 15.0
- Closed