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

[REG] qmake on Windows generates incorrect Makefile by not including file paths

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.12.0
    • Build tools: qmake
    • None
    • Windows 10
      VS 2017 (v. 15.9.3)
    • Windows

    Description

      I am unable to build my (large) application on Windows using Qt 5.12.0. The same code builds correctly using Qt 5.11.3. I am using the official releases of both Qt versions (VS2017, 64-bit). I believe the problem is that qmake is generating incorrect commands in the makefile. I have tried deleting the build directory and that doesn't fix the problem, so I don't think the problem is due to cache files or something similar.

      The same project builds correctly on macOS using Xcode 10 with Qt 5.12.0.

      I'm using Qt Creator 4.7.2 to do the build (using jom.exe). I'm doing a shadow build in both cases.

      When using Creator with 5.12, here is the error message I get in the compile output pane:

       

      C:\Qt\qtcreator-4.7.2\bin\jom.exe -f Makefile.IgorPhoenix_subdir.Debug
      Error: dependent 'WMCmdGenDialog.h' does not exist.
      jom: C:\IgorDev\IgorGit\igor9\build-IgorPhoenix-Official_Qt_5_12_64_bit-Debug\Makefile.IgorPhoenix_subdir [debug] Error 2
      jom: C:\IgorDev\IgorGit\igor9\build-IgorPhoenix-Official_Qt_5_12_64_bit-Debug\Makefile [sub-IgorPhoenix_subdir-pro-make_first] Error 2
      09:08:44: The process "C:\Qt\qtcreator-4.7.2\bin\jom.exe" exited with code 2.
      Error while building/deploying project IgorPhoenix (kit: Official Qt 5.12 VS2017 (64-bit))
      When executing step "Make"

       

      I opened the two Makefile.IgorPhoenix_subdir.Debug files generated by qmake (the 5.11.3 and 5.12.0 versions), and I think I see what the problem is.

      In the Qt 5.11.3 generated version, I have lots of rules like this:

       

      Qt_ui_generated_files\ui_XLLoadWaveDialog.h: ..\igorsrc\src\BIOperations\XLLoadWave\src\dialogs\XLLoadWaveDialog.ui \
      	..\..\..\..\QtOfficialLibraries\5.11.3\msvc2017_64\bin\uic.exe
      	C:\QtOfficialLibraries\5.11.3\msvc2017_64\bin\uic.exe ..\igorsrc\src\BIOperations\XLLoadWave\src\dialogs\XLLoadWaveDialog.ui -o Qt_ui_generated_files\ui_XLLoadWaveDialog.h

      The equivalent rule generated by 5.12.0 qmake is this:

       

       

      Qt_ui_generated_files\ui_XLLoadWaveDialog.h: ..\igorsrc\src\BIOperations\XLLoadWave\src\dialogs\XLLoadWaveDialog.ui \
      		..\..\..\..\QtOfficialLibraries\5.12.0\msvc2017_64\bin\uic.exe \
      		WMCmdGenDialog.h \
      		WMGeneratedCommandDisplay.h \
      		WMPreciseLineEdit.h \
      		WMHoverPreciseLineEdit.h \
      		WMComboBox.h \
      		IgorPathsTableWidget.h
      	C:\QtOfficialLibraries\5.12.0\msvc2017_64\bin\uic.exe ..\igorsrc\src\BIOperations\XLLoadWave\src\dialogs\XLLoadWaveDialog.ui -o Qt_ui_generated_files\ui_XLLoadWaveDialog.h
      

      Note that in this rule, there are 6 header files (WMCmdGenDialog.h through IgorPathsTableWidget.h) that are referenced with just the file name, not including the relative path to the file. The first of those (WMCmdGenDialog.h) is the file referenced in the original error message. In the Qt 5.11.3 generated makefile, none of these files is referenced at all from the rule, so I'm not sure if the problem is including these in the first place or just including them without the relative path.

      I suspect that there must be some particular set of circumstances in my project that lead to this bug, since I can't find any similar bug reports. Any suggestions on how I can start debugging this problem with the goal of being able to provide an example that triggers the problem?

       

      Attachments

        1. QTBUG-72389.zip
          6 kB
          Adam Light

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              aclight Adam Light
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes