Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.11.0 RC 1
-
None
-
Ubuntu 17.10
Description
When building qttools, qdoc fails to link. It reports errors like below:
/usr/bin/ld.gold: error: cannot find -lclangCrossTU
/usr/bin/ld.gold: error: cannot find -lclangDaemon
/usr/bin/ld.gold: error: cannot find -lclangHandleCXX
/usr/bin/ld.gold: error: cannot find -lclang_static
/usr/bin/ld.gold: error: cannot find -lclangTidyAndroidModule
/usr/bin/ld.gold: error: cannot find -lclangTidyBugproneModule
/usr/bin/ld.gold: error: cannot find -lclangTidyFuchsiaModule
/usr/bin/ld.gold: error: cannot find -lclangTidyHICPPModule
/usr/bin/ld.gold: error: cannot find -lclangTidyObjCModule
/usr/bin/ld.gold: error: cannot find -lclangToolingASTDiff
/usr/bin/ld.gold: error: cannot find -lclangToolingRefactor
/usr/bin/ld.gold: error: cannot find -lLLVMARMUtils
/usr/bin/ld.gold: error: cannot find -lLLVMBinaryFormat
/usr/bin/ld.gold: error: cannot find -lLLVMBPFAsmParser
/usr/bin/ld.gold: error: cannot find -lLLVMDlltoolDriver
/usr/bin/ld.gold: error: cannot find -lLLVMFuzzMutate
/usr/bin/ld.gold: error: cannot find -lLLVMLanaiAsmPrinter
/usr/bin/ld.gold: error: cannot find -lLLVMWindowsManifest
.obj/clangcodeparser.o:clangcodeparser.cpp:function fromCXString(CXString&&): error: undefined reference to 'clang_getCString'
.obj/clangcodeparser.o:clangcodeparser.cpp:function fromCXString(CXString&&): error: undefined reference to 'clang_disposeString'
.obj/clangcodeparser.o:clangcodeparser.cpp:function fromCXSourceLocation(CXSourceLocation): error: undefined reference to 'clang_getPresumedLocation'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&): error: undefined reference to 'clang_getCursorKind'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&): error: undefined reference to 'clang_getCursorSpelling'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#3}&&): error: undefined reference to 'clang_visitChildren'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&): error: undefined reference to 'clang_getCursorKind'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&): error: undefined reference to 'clang_visitChildren'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&): error: undefined reference to 'clang_getEnumConstantDeclValue'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&): error: undefined reference to 'clang_getCursorSpelling'
.obj/clangcodeparser.o:clangcodeparser.cpp:function bool visitChildrenLambda<ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}>(CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&)::{lambda(CXCursor, CXCursor, void*)#1}::_FUN(CXCursor, CXCursor, ClangVisitor::visitHeader(CXCursor, CXSourceLocation)::{lambda(CXCursor)#2}&&): error: undefined reference to 'clang_getEnumConstantDeclValue'
.obj/clangcodeparser.o:clangcodeparser.cpp:function functionName(CXCursor): error: undefined reference to 'clang_getCursorKind'
The clang libraries it tried to link to are not correct. This seems to have been caused by a recent commit to the file qttools/mkspecs/features/qt_find_clang.prf:
If I revert this change, it builds okay for me.
Attachments
Issue Links
- duplicates
-
QTBUG-68178 undefined reference to 'clang_*'
- Closed