Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68210

qdoc fails to link on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.11.0 RC 1
    • Build tools: qdoc
    • 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:

      http://code.qt.io/cgit/qt/qttools.git/commit/mkspecs/features/qt_find_clang.prf?id=fddf7ee536e4fd0061d0ee933707881cebe54223

      If I revert this change, it builds okay for me.

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              gbk Martin Smith (Qt)
              tranter Jeff Tranter
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes