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

Prebuilt clang packages provided by Qt contains hardcoded library path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.0 RC2, 6.7.0
    • 6.x
    • Build System: CMake
    • None
    • VS2019
    • dec5e34f0 (master)

    Description

      https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_15.0.0-based-windows-vs2019_64.7z contains following hardcoded library path:

      $ grep -r 'diaguids.lib'
      lib/cmake/llvm/LLVMExports.cmake:  INTERFACE_LINK_LIBRARIES "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib;LLVMBinaryFormat;LLVMObject;LLVMSupport;LLVMDebugInfoCodeView;LLVMDebugInfoMSF"
      

      When compiling Qt, I got such error:

      ninja: error: 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib', needed by 'qtbase/bin/qdoc.exe', missing and no known rule to make it

      So I have to edit %LLVM_INSTALL_DIR%/lib/cmake/llvm/LLVMExports.cmake manually.

      diff --git a/lib/cmake/llvm/LLVMExports.cmake b/lib/cmake/llvm/LLVMExports.cmake
      index 99a59ce..7405fac 100644
      --- a/lib/cmake/llvm/LLVMExports.cmake
      +++ b/lib/cmake/llvm/LLVMExports.cmake
      @@ -403,7 +403,7 @@ set_target_properties(LLVMDebugInfoCodeView PROPERTIES
       add_library(LLVMDebugInfoPDB STATIC IMPORTED)
       set_target_properties(LLVMDebugInfoPDB PROPERTIES
      -  INTERFACE_LINK_LIBRARIES "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib;LLVMBinaryFormat;LLVMObject;LLVMSupport;LLVMDebugInfoCodeView;LLVMDebugInfoMSF"
      +  INTERFACE_LINK_LIBRARIES "D:/Microsoft Visual Studio/2019/Community/DIA SDK/lib/amd64/diaguids.lib;LLVMBinaryFormat;LLVMObject;LLVMSupport;LLVMDebugInfoCodeView;LLVMDebugInfoMSF"
       )
      
       # Create imported target LLVMSymbolize
      

      "D:/Microsoft Visual Studio/2019/Community" is the installation location of VS2019 on my host.

       

      Interestingly, https://download.qt.io/development_releases/prebuilt/libclang/qt/libclang-release_120-based-windows-vs2019_64.7z also contains the hardcoded path, but I don't get compilation error mentioned above.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              lixinwei Li Xinwei
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes