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. error: ninja: build stopped: subcommand failed.
QtWS25 Last Chance

error: ninja: build stopped: subcommand failed.

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 6 Posters 16.1k Views
  • 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.
  • H Offline
    H Offline
    Hyn Ning
    wrote on 29 Jun 2023, 09:10 last edited by
    #1

    I have a problem when I build a Qt6 project. Thanks advance

    The process "/home/ning/Qt/Tools/CMake/bin/cmake" exited with code 1.
    Error while building/deploying project WindowType (kit: Desktop Qt 6.5.1 GCC 64bit)
    When executing step "Build".

    J J 2 Replies Last reply 29 Jun 2023, 09:11
    0
    • H Hyn Ning
      29 Jun 2023, 09:10

      I have a problem when I build a Qt6 project. Thanks advance

      The process "/home/ning/Qt/Tools/CMake/bin/cmake" exited with code 1.
      Error while building/deploying project WindowType (kit: Desktop Qt 6.5.1 GCC 64bit)
      When executing step "Build".

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 29 Jun 2023, 09:11 last edited by
      #2

      @Hyn-Ning Please post the real error message which is somewhere above of what you posted...

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

      1 Reply Last reply
      1
      • H Hyn Ning
        29 Jun 2023, 09:10

        I have a problem when I build a Qt6 project. Thanks advance

        The process "/home/ning/Qt/Tools/CMake/bin/cmake" exited with code 1.
        Error while building/deploying project WindowType (kit: Desktop Qt 6.5.1 GCC 64bit)
        When executing step "Build".

        J Offline
        J Offline
        JonB
        wrote on 29 Jun 2023, 10:39 last edited by
        #3

        @Hyn-Ning
        If you have an error then fix it.
        If you want help with it then use common sense to supply the necessary extra information for anyone else.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Calvin H-C
          wrote on 1 Sept 2023, 17:26 last edited by
          #4

          I am getting the same error:
          ninja: build stopped: subcommand failed

          Last night, build worked perfectly fine. This morning when I went back into QtCreator, I get this when I try to build. NO CODE HAS CHANGED.

          I tried forcing a change that would cause an error, by adding a line with "x=1;" knowing that x is not declared. The above error shows right away, so the compiler is not even being invoked to get to the error I created.

          If this error provided a little more information, I might have a chance at fixing it.

          C 1 Reply Last reply 2 Sept 2023, 05:01
          0
          • C Calvin H-C
            1 Sept 2023, 17:26

            I am getting the same error:
            ninja: build stopped: subcommand failed

            Last night, build worked perfectly fine. This morning when I went back into QtCreator, I get this when I try to build. NO CODE HAS CHANGED.

            I tried forcing a change that would cause an error, by adding a line with "x=1;" knowing that x is not declared. The above error shows right away, so the compiler is not even being invoked to get to the error I created.

            If this error provided a little more information, I might have a chance at fixing it.

            C Offline
            C Offline
            Calvin H-C
            wrote on 2 Sept 2023, 05:01 last edited by
            #5

            Follow-up: I had to rebuild my project file, as it was using cmake and I had wanted to use qmake. With the new project file, this problem disappeared, though there is no explanation as to why it worked fine until it didn't with the old project file.

            1 Reply Last reply
            1
            • S SGaist moved this topic from Qt in Education on 3 Sept 2023, 17:06
            • Q Offline
              Q Offline
              Qt_lover_with_OS_license
              wrote on 26 Jul 2024, 16:00 last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • J Offline
                J Offline
                James Martin
                wrote on 11 Sept 2024, 13:02 last edited by
                #7

                I have the same problem when I tried to build my project I get two errors.

                I am using QT Creator 14.0.1 (Based on QT 6.7.2) on my iMac M1 (Apple silicon) Running Sonoma 14.6.1). And I think I am using CMAKE????? The errors are:-

                1. 'renderarea.h' file not found - This is a file that QT Creator created when I set up a class to define a widget. So how can it be "not found"?
                  2:error: ninja: build stopped: subcommand failed. I have uninstalled and re-installed ninja (using homebrew). I even deleted the "build. ninja" file which made it worse so I had to put it back. But nothing has worked. Can anyone help me, please?
                J J 2 Replies Last reply 11 Sept 2024, 13:19
                0
                • J James Martin
                  11 Sept 2024, 13:02

                  I have the same problem when I tried to build my project I get two errors.

                  I am using QT Creator 14.0.1 (Based on QT 6.7.2) on my iMac M1 (Apple silicon) Running Sonoma 14.6.1). And I think I am using CMAKE????? The errors are:-

                  1. 'renderarea.h' file not found - This is a file that QT Creator created when I set up a class to define a widget. So how can it be "not found"?
                    2:error: ninja: build stopped: subcommand failed. I have uninstalled and re-installed ninja (using homebrew). I even deleted the "build. ninja" file which made it worse so I had to put it back. But nothing has worked. Can anyone help me, please?
                  J Offline
                  J Offline
                  JonB
                  wrote on 11 Sept 2024, 13:19 last edited by
                  #8

                  @James-Martin

                  1. You have to start by checking the CMakeLists.txt file for cmake or whatever to find where renderarea.h is supposed to be. And you have to look in your filing system to see where it is, or if it is missing.
                  2. The message from ninja tells you that a subcommand has failed. Like cmake or whatever erroring for the missing file. Which would be reported just above it in the output. That does not mean there is any problem with ninja, and you should not be reinstalling that.

                  You might like to create your own topic for your problem and give more details, especially the exact error output you get.

                  1 Reply Last reply
                  1
                  • J James Martin
                    11 Sept 2024, 13:02

                    I have the same problem when I tried to build my project I get two errors.

                    I am using QT Creator 14.0.1 (Based on QT 6.7.2) on my iMac M1 (Apple silicon) Running Sonoma 14.6.1). And I think I am using CMAKE????? The errors are:-

                    1. 'renderarea.h' file not found - This is a file that QT Creator created when I set up a class to define a widget. So how can it be "not found"?
                      2:error: ninja: build stopped: subcommand failed. I have uninstalled and re-installed ninja (using homebrew). I even deleted the "build. ninja" file which made it worse so I had to put it back. But nothing has worked. Can anyone help me, please?
                    J Offline
                    J Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on 12 Sept 2024, 06:34 last edited by
                    #9

                    @James-Martin Make sure renderarea.h was added in CMakeLists.txt

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

                    1 Reply Last reply
                    0

                    • Login

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