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

WIN64: 'cannot find -llibclang' error for static builds using mingw-w64

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.12
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      * Windows 10 x64,
      * mingw-w64 x86_64 posix seh 8.1.0,
      * ICC 2018 Update 3,
      * MSVC 2017 15.7.3,
      * Windows SDK 10.0.17134.12,
      * Qt5-dev-d16c0d26752968c4621778be62cd91489c9065bc.
    • Platform/s:
      Windows

      Description

      Hello, everyone,

      For builds using mingw-w64 got error:

      mingw32-make[2]: Entering directory 'c:/libQT-5.12-dev/build/qttools/src/qdoc'
      mingw32-make -f Makefile.Release
      mingw32-make[3]: Entering directory 'c:/libQT-5.12-dev/build/qttools/src/qdoc'
      g++ -Wl,-s -Wl,-subsystem,console -static -Wl,--gc-sections -o ..\..\bin\qdoc.exe object_script.qdoc.Release  -LC:\ProgramData\LLVM64_GCC\lib -llibclang -LC:\libQT-5.12-dev\build\qtdeclarative\lib C:\libQT-5.12-dev\build\qtdeclarative\lib\libQt5QmlDevTools.a -LC:\libQT-5.12-dev\build\qtbase\lib -LC:\libICU-63.1-dev\GCC64RT\lib C:\libQT-5.12-dev\build\qtbase\lib\libQt5Core.a -lmpr -lnetapi32 -luserenv -lversion -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lwinmm -lz -lsicuin -lsicuuc -lsicudt C:\libQT-5.12-dev\build\qtbase\lib\libqtpcre2.a .obj\release\qdoc_resource_res.o
      C:/ProgramData/Mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llibclang
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[3]: *** [Makefile.Release:194: ../../bin/qdoc.exe] Error 1
      mingw32-make[3]: Leaving directory 'c:/libQT-5.12-dev/build/qttools/src/qdoc'
      mingw32-make[2]: *** [Makefile:36: release] Error 2
      mingw32-make[2]: Leaving directory 'c:/libQT-5.12-dev/build/qttools/src/qdoc'
      mingw32-make[1]: *** [Makefile:201: sub-qdoc-make_first] Error 2
      mingw32-make[1]: Leaving directory 'c:/libQT-5.12-dev/build/qttools/src'
      mingw32-make: *** [Makefile:43: sub-src-make_first] Error 2

      which relate to 'dll.a' extension of 'libclang' file in libclang-release_*-windows-mingw_64-clazy.7z distributives.

       

      Reproduced for:

      • builds using mingw-w64 with static layout,

      not reproduced for:

      • builds using mingw-w64 with shared layout,
      • builds using Windows ICC and MSVC.

       

      A workaround is to copy file '<path_to_LLVM>/lib/libclang.dll.a' to '<path_to_LLVM>/lib/libclang.a'.

       

      Best,

      Alexander

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              gbk Martin Smith (Qt)
              Reporter:
              sav sav
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes