Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building QT6.5 with NMake error

Building QT6.5 with NMake error

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omni_Philm
    wrote on last edited by
    #1

    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?

    C 1 Reply Last reply
    0
    • O Omni_Philm

      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?

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @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.

      O 1 Reply Last reply
      0
      • C ChrisW67

        @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.

        O Offline
        O Offline
        Omni_Philm
        wrote on last edited by
        #3

        @ChrisW67

        Interesting. This error was generated when compiling 6.5.2 I guess the bug fix didn't get to this version?

        1 Reply Last reply
        0
        • O Offline
          O Offline
          Omni_Philm
          wrote on last edited by
          #4

          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?

          jsulmJ 1 Reply Last reply
          0
          • O Omni_Philm

            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?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Omni_Philm According to the bug report it was fixed in 6.1.3

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            O 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Omni_Philm According to the bug report it was fixed in 6.1.3

              O Offline
              O Offline
              Omni_Philm
              wrote on last edited by
              #6

              @jsulm So if it is fixed, why do I still have an issue? should I open a bug report?

              jsulmJ 1 Reply Last reply
              0
              • O Omni_Philm

                @jsulm So if it is fixed, why do I still have an issue? should I open a bug report?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Omni_Philm Maybe it is not the same issue as the one @ChrisW67 posted.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • KH-219DesignK Offline
                  KH-219DesignK Offline
                  KH-219Design
                  wrote on last edited by
                  #8

                  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.

                  www.219design.com
                  Software | Electrical | Mechanical | Product Design

                  Christian EhrlicherC 1 Reply Last reply
                  0
                  • KH-219DesignK KH-219Design

                    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.

                    Christian EhrlicherC Online
                    Christian EhrlicherC Online
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @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.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    0
                    • KH-219DesignK Offline
                      KH-219DesignK Offline
                      KH-219Design
                      wrote on last edited by
                      #10

                      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.

                      www.219design.com
                      Software | Electrical | Mechanical | Product Design

                      1 Reply Last reply
                      0
                      • KH-219DesignK Offline
                        KH-219DesignK Offline
                        KH-219Design
                        wrote on last edited by
                        #11

                        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

                        www.219design.com
                        Software | Electrical | Mechanical | Product Design

                        1 Reply Last reply
                        1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved