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

WinExtras fails to build using 64-bit MinGW 7.3.0 -- undefined reference to DwmInvalidateIconicBitmaps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.0 Alpha
    • Extras: Win
    • None
    • x86_64-w64-mingw32 7.3.0

    Description

      When cross-compiling Qt 5.12.0 Alpha usingĀ x86_64-w64-mingw32 7.3.0 as provided by Ubuntu 18.04 (as well as Debian Testing & Unstable), the cross-compilation fails due to x86_64-w64-mingw32/lib/libdwmapi.a not having DwmInvalidateIconicBitmaps symbol exported. Only 64-bit MinGW is affected, the 32-bit one – i686-w64-mingw32 – does export DwmInvalidateIconicBitmaps symbol in its i686-w64-mingw32/lib/libdwmapi.a.

      There is a similar bug report but of using MinGW on Windows instead of Linux, and the reporter in their last comment claims that the issue was fixed in MinGW 7.3.0, which is clearly wasn't fixed in 7.3.0, at least from my experience. https://bugreports.qt.io/browse/QTBUG-63627

      The build error:

      Project ERROR: Unknown module(s) in QT: quick-private
      Makefile:124: recipe for target 'sub-distancefieldgenerator-make_first' failed
      make[2]: *** [sub-distancefieldgenerator-make_first] Error 3
      make[2]: *** Waiting for unfinished jobs....
      [...]
      x86_64-w64-mingw32-g++ -Wl,-s -shared -Wl,-subsystem,windows -Wl,--out-implib,/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtwinextras/lib/libQt5WinExtras.a -o ../../lib/Qt5WinExtras.dll .obj/release/qwinfunctions.o .obj/release/qwintaskbarbutton.o .obj/release/qwintaskbarprogress.o .obj/release/windowsguidsdefs.o .obj/release/qwinjumplist.o .obj/release/qwinjumplistcategory.o .obj/release/qwinjumplistitem.o .obj/release/qwineventfilter.o .obj/release/qwinthumbnailtoolbar.o .obj/release/qwinthumbnailtoolbutton.o .obj/release/qwinevent.o .obj/release/qwinmime.o .obj/release/moc_qwintaskbarprogress.o .obj/release/moc_qwinthumbnailtoolbutton.o  -lglu32 -lopengl32 -lgdi32 -luser32 -L/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtbase/lib /build/x86_64/qt-everywhere-src-5.12.0-alpha/qtbase/lib/libQt5Gui.a /build/x86_64/qt-everywhere-src-5.12.0-alpha/qtbase/lib/libQt5Core.a .obj/release/Qt5WinExtras_resource_res.o -lole32 -lshlwapi -lshell32 -ldwmapi
      .obj/release/qwinthumbnailtoolbar.o:qwinthumbnailtoolbar.cpp:(.text+0x8f4): undefined reference to `DwmInvalidateIconicBitmaps'
      .obj/release/qwinthumbnailtoolbar.o:qwinthumbnailtoolbar.cpp:(.text+0x1b4d): undefined reference to `DwmSetIconicThumbnail'
      .obj/release/qwinthumbnailtoolbar.o:qwinthumbnailtoolbar.cpp:(.text+0x1c5f): undefined reference to `DwmSetIconicLivePreviewBitmap'
      collect2: error: ld returned 1 exit status
      Makefile.Release:120: recipe for target '../../lib/Qt5WinExtras.dll' failed
      make[4]: *** [../../lib/Qt5WinExtras.dll] Error 1
      make[4]: Leaving directory '/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtwinextras/src/winextras'
      Makefile:36: recipe for target 'release' failed
      make[3]: Leaving directory '/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtwinextras/src/winextras'
      make[3]: *** [release] Error 2
      Makefile:40: recipe for target 'sub-winextras-make_first-ordered' failed
      make[2]: *** [sub-winextras-make_first-ordered] Error 2
      make[2]: Leaving directory '/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtwinextras/src'
      make[1]: *** [sub-src-make_first] Error 2
      Makefile:42: recipe for target 'sub-src-make_first' failed
      make[1]: Leaving directory '/build/x86_64/qt-everywhere-src-5.12.0-alpha/qtwinextras'
      Makefile:93: recipe for target 'module-qtwinextras-make_first' failed
      make: *** [module-qtwinextras-make_first] Error 2
      make: *** Waiting for unfinished jobs....
      

      ("Unknown module(s) in QT: quick-private" is reported in a separate bug report: https://bugreports.qt.io/browse/QTBUG-70489)

      To reproduce, run the attached build_qt.sh script on Ubuntu 18.04 with x86_64 as the argument:

      ./build_qt.sh x86_64
      

      If you prefer using Docker:

      mkdir build
      mv build_qt.sh build
      sudo docker run --rm -v "$PWD/build":/build ubuntu:18.04 /bin/bash /build/build_qt.sh x86_64
      

      Attachments

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              nurupo nurupo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: