Building QT6.5 with NMake error
-
Hello all,
I am getting an error when building Qt6. It is getting stuck on qt6qml_debug_metatypes.json
Below is the output of the error:
Error 5 while parsing C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json: illegal value NMAKE : fatal error U1077: 'call ..\..\..\.qt\bin\qt_setup_tool_path.bat C:/Users/Phillip/source/qt6-build/qtbase/bin/qmltyperegistrar.exe --generate-qmltypes=C:/Users/Phillip/source/qt6-build/qtbase/qml/QtQml/Base/plugins.qmltypes --import-name=QtQml.Base --major-version=6 --minor-version=5 --follow-foreign-versioning @C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/qmltypes/Qml_foreign_types.txt --private-includes -o C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/qml_qmltyperegistrations.cpp C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\nmake.exe" -s -f qtdeclarative\src\qml\CMakeFiles\Qml.dir\build.make /nologo -SL qtdeclarative\src\qml\CMakeFiles\Qml.dir\depend' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -S all' : return code '0x2' Stop.When I go to the file qt6qml_debug_metatypes and open it, it is just a blank json file. There is nothing in it so I think that this is the issue as it is suppose to have contents in it.
Has anyone else ran into this issue before?
-
Hello all,
I am getting an error when building Qt6. It is getting stuck on qt6qml_debug_metatypes.json
Below is the output of the error:
Error 5 while parsing C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json: illegal value NMAKE : fatal error U1077: 'call ..\..\..\.qt\bin\qt_setup_tool_path.bat C:/Users/Phillip/source/qt6-build/qtbase/bin/qmltyperegistrar.exe --generate-qmltypes=C:/Users/Phillip/source/qt6-build/qtbase/qml/QtQml/Base/plugins.qmltypes --import-name=QtQml.Base --major-version=6 --minor-version=5 --follow-foreign-versioning @C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/qmltypes/Qml_foreign_types.txt --private-includes -o C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/qml_qmltyperegistrations.cpp C:/Users/Phillip/source/qt6-build/qtdeclarative/src/qml/meta_types/qt6qml_debug_metatypes.json' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\nmake.exe" -s -f qtdeclarative\src\qml\CMakeFiles\Qml.dir\build.make /nologo -SL qtdeclarative\src\qml\CMakeFiles\Qml.dir\depend' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -S all' : return code '0x2' Stop.When I go to the file qt6qml_debug_metatypes and open it, it is just a blank json file. There is nothing in it so I think that this is the issue as it is suppose to have contents in it.
Has anyone else ran into this issue before?
@Omni_Philm said in Building QT6.5 with NMake error:
qt6qml_debug_metatypes
Looks at lot like QTBUG-94942 from a few dot releases ago. Some changes were made to fix this in 2021.
-
@Omni_Philm said in Building QT6.5 with NMake error:
qt6qml_debug_metatypes
Looks at lot like QTBUG-94942 from a few dot releases ago. Some changes were made to fix this in 2021.
Interesting. This error was generated when compiling 6.5.2 I guess the bug fix didn't get to this version?
-
I guess I will need to merge the changes for the specific files from the dev branch into the installation of 6.5.2 source to fix the issue?
-
I guess I will need to merge the changes for the specific files from the dev branch into the installation of 6.5.2 source to fix the issue?
@Omni_Philm According to the bug report it was fixed in 6.1.3
-
@Omni_Philm According to the bug report it was fixed in 6.1.3
@jsulm So if it is fixed, why do I still have an issue? should I open a bug report?
-
@jsulm So if it is fixed, why do I still have an issue? should I open a bug report?
@Omni_Philm Maybe it is not the same issue as the one @ChrisW67 posted.
-
I just ran into this (on Windows) with 6.5.3. It does seem like the bug has reemerged (some kind of regression). The original bugfix was in
Qt6CoreMacros.cmake(https://codereview.qt-project.org/c/qt/qtbase/+/360385), and that file has changed a lot since then, so I think the issue crept back in.I will try to create a minimum reproduction and post to Qt bugtracker.
-
I just ran into this (on Windows) with 6.5.3. It does seem like the bug has reemerged (some kind of regression). The original bugfix was in
Qt6CoreMacros.cmake(https://codereview.qt-project.org/c/qt/qtbase/+/360385), and that file has changed a lot since then, so I think the issue crept back in.I will try to create a minimum reproduction and post to Qt bugtracker.
@KH-219Design said in Building QT6.5 with NMake error:
I will try to create a minimum reproduction and post to Qt bugtracker.
Try it with a recent Qt version before. I don't think this will be fixed when it's only in Qt6.5 esp. since the official way to build Qt is ninja and not nmake.
-
Try it with a recent Qt version before.
Yes. I will also try the most recent.
I don't think this will be fixed when it's only in Qt6.5 esp. since the official way to build Qt is ninja and not nmake.
Ah. You have called my attention to my accidental "thread hi-jacking" (minor?). I am not building the Qt framework. I am using CMake and the Qt-provided CMake functions to build a Qt/QML project. (There will be a reproduction from me in a few days. I'm swamped right now but have confidence I can reproduce this.)
Once I reproduce it, either a bug can be opened or I can at least document (if so) that a more recent Qt fixes it.
-
As expected, it was easy to make a very small CMake project to reproduce the error (building "with" Qt, as opposed to "building Qt" the whole framework).
The small project reproduces the qt6qml_debug_metatypes.json nmake
"illegal value"error (invalid empty json file).There is good news, just as @Christian-Ehrlicher alluded to.
It reproduces easily in 6.5.3, but the problem is gone when I use 6.7.3.
So if anyone arrives here (as I did) due to a 6.5.3-based Qt project and is looking for a simple fix, the simple fix appears to be: upgrade to at least 6.7.3.
The repro: https://github.com/219-design/qt-qml-project-template-with-ci/pull/120
The fix: https://github.com/219-design/qt-qml-project-template-with-ci/pull/121