Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Project allways recompiles all sources(QtCreator + CMake)
Forum Updated to NodeBB v4.3 + New Features

Project allways recompiles all sources(QtCreator + CMake)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
12 Posts 5 Posters 1.4k 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.
  • G Offline
    G Offline
    GuilhermeF
    wrote on last edited by
    #1

    Hello, this is my first question, so I apologize upfront for the mistakes I will certainly make.

    The issue I'm having is that, starting from Qt 6.8.1, the slightest change in any file will ellicit an entire recompilation of my project. There are no errors issued. General Messages shows no warnings nor errors. I've tried erasing the build directory to no avail. Removing CMakeLists.txt.user also makes no difference. The cmake I'm using is the latest available at the Qt Maintenance Tool(but a previous version yielded the same result).

    What's worse: Qt 6.9.0 triggers total recompilation just by hitting Run or Debug, without any change to the sources.

    Tested with QtCreator 13,14,15, and 16.

    Any version prior or equal to 6.8.0 works as its intented.

    I don't know what I could include in the attachments to help.

    Please, if someone have any insights as to what the problem might be, I would be very extremely grateful.

    Thank you.

    1 Reply Last reply
    0
    • cristian-adamC Offline
      cristian-adamC Offline
      cristian-adam
      wrote on last edited by
      #2

      The build tool is the one that does all the work.

      You can ninja to explain itself by going to Project Settings > Build Steps > Tool arguments and add -d explain there.

      I have seen weird things when the Windows system time would be a bit out of sync and ninja would be confused. Rebooting Windows helped fix the issue.

      1 Reply Last reply
      3
      • G Offline
        G Offline
        GuilhermeF
        wrote on last edited by
        #3

        @cristian-adam Thank you for your reply.

        I did some tests with your suggestions. Rebooting changes nothing(also, I am using Linux by the way).
        Having ninja explain itself yielded interesting results.

        When building against 6.8.0, it only reports: (TrainingPlanner is the name of the project)
        ninja explain: recorded mtime of .qt/rcc/qrc_TrainingPlanner.cpp older than most recent input {path_to_last_modified_file}
        ninja explain: TrainingPlanner is dirty

        Now, when I use 6.8.1 and beyond it starts with

        ninja explain: stored deps info out of date for 'CMakeFiles/TrainingPlanner.dir/TrainingPlanner_autogen/mocs_compilation.cpp.o' (1743783247875479231 vs 1743783585478830808)
        ninja explain: recorded mtime of .qt/rcc/qrc_TrainingPlanner.cpp older than most recent input {path_to_last_modified_file}
        ninja explain: TrainingPlanner is dirty

        and then spews hundreds of lines in the form:

        ninja explain: /include/c++/12/type_traits has no in-edge and is missing
        ninja explain: /include/c++/12/type_traits is dirty
        ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h has no in-edge and is missing
        ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h is dirty

        For the the whole of c++ include paths.

        Upon hitting Run without any modification to any of the source files, it doesn't say anything about the files in my project, writes the same things about the c++ includes and proceeds to recompile everything all over again.

        So, there is certainly something that ninja does not agree with starting from Qt 6.8.1.

        1 Reply Last reply
        1
        • E Offline
          E Offline
          elendilm
          wrote on last edited by elendilm
          #4

          I am facing the same issue. I am using Linux. Was using 6.6.3 and now switched to 6.9. Simply hitting run without any change in the code in QtCreator recompiles most of the files. Did you find any solution to this?

          1 Reply Last reply
          0
          • JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            can you try to replace Ninja with UnixMakefiles
            kits->kits tab->CMake generator: Ninja on the right side click change button for replacement

            G 1 Reply Last reply
            1
            • aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @GuilhermeF Can you please check the timestamps of the system include files ninja is complaining about?

              ninja explain: /include/c++/12/type_traits has no in-edge and is missing
              ninja explain: /include/c++/12/type_traits is dirty
              ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h has no in-edge and is missing
              ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h is dirty
              

              Is you system clock running correctly?

              @elendilm you may perform the same checks on your system.

              Qt has to stay free or it will die.

              G 1 Reply Last reply
              0
              • cristian-adamC Offline
                cristian-adamC Offline
                cristian-adam
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  elendilm
                  wrote on last edited by
                  #8

                  Hi, I was using KDE Neon with Ubuntu 20.04. Somehow my Qt Desktop 6.9 Kit was auto configured with clang which was clang10 in my system.
                  I updated to KDE Neon with Ubuntu 24.04. Now my Qt Desktop 6.9 Kit was auto configured with gcc (v13.3.0)
                  The problem was resolved after this.

                  I haven't tested with clang to know if issue still persists. For now updated OS and gcc works.

                  1 Reply Last reply
                  1
                  • JoeCFDJ JoeCFD

                    can you try to replace Ninja with UnixMakefiles
                    kits->kits tab->CMake generator: Ninja on the right side click change button for replacement

                    G Offline
                    G Offline
                    GuilhermeF
                    wrote on last edited by GuilhermeF
                    #9

                    @JoeCFD Thank you for your reply.

                    Switching to UnixMakefiles or to Ninja Multi-Config resolves the problem at hand. Although both failed to compile the project due to a missing linker symbol.

                    1 Reply Last reply
                    0
                    • aha_1980A aha_1980

                      @GuilhermeF Can you please check the timestamps of the system include files ninja is complaining about?

                      ninja explain: /include/c++/12/type_traits has no in-edge and is missing
                      ninja explain: /include/c++/12/type_traits is dirty
                      ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h has no in-edge and is missing
                      ninja explain: /include/x86_64-linux-gnu/c++/12/bits/c++config.h is dirty
                      

                      Is you system clock running correctly?

                      @elendilm you may perform the same checks on your system.

                      G Offline
                      G Offline
                      GuilhermeF
                      wrote on last edited by
                      #10

                      @aha_1980 Thank you for your reply

                      The system clock is ok, The time stamps for all the files ninja complains are all older than the oldest file in my project tree. As I said in the original post, only with Qt versions 6.8.1 and newer I am having these issues.

                      cristian-adamC 1 Reply Last reply
                      0
                      • G GuilhermeF

                        @aha_1980 Thank you for your reply

                        The system clock is ok, The time stamps for all the files ninja complains are all older than the oldest file in my project tree. As I said in the original post, only with Qt versions 6.8.1 and newer I am having these issues.

                        cristian-adamC Offline
                        cristian-adamC Offline
                        cristian-adam
                        wrote on last edited by
                        #11

                        @GuilhermeF said in Project allways recompiles all sources(QtCreator + CMake):

                        @aha_1980 Thank you for your reply

                        The system clock is ok, The time stamps for all the files ninja complains are all older than the oldest file in my project tree. As I said in the original post, only with Qt versions 6.8.1 and newer I am having these issues.

                        Sounds like a regression. Please do create a bug report for Qt.

                        G 1 Reply Last reply
                        0
                        • cristian-adamC cristian-adam

                          @GuilhermeF said in Project allways recompiles all sources(QtCreator + CMake):

                          @aha_1980 Thank you for your reply

                          The system clock is ok, The time stamps for all the files ninja complains are all older than the oldest file in my project tree. As I said in the original post, only with Qt versions 6.8.1 and newer I am having these issues.

                          Sounds like a regression. Please do create a bug report for Qt.

                          G Offline
                          G Offline
                          GuilhermeF
                          wrote on last edited by
                          #12

                          @cristian-adam Thank you, I will.

                          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