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. Why does the size of the file grow so much with each release without changing the code?
Forum Updated to NodeBB v4.3 + New Features

Why does the size of the file grow so much with each release without changing the code?

Scheduled Pinned Locked Moved Unsolved General and Desktop
54 Posts 9 Posters 8.7k Views 4 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.
  • D duncan98

    @ChrisW67
    I just want to know how to solve the oversized problem

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

    @duncan98 Stop producing a debug build is my best guess.

    D 1 Reply Last reply
    1
    • C ChrisW67

      @duncan98 Stop producing a debug build is my best guess.

      D Offline
      D Offline
      duncan98
      wrote on last edited by
      #36

      @ChrisW67
      This is true for debugging and publishing

      JonBJ 1 Reply Last reply
      0
      • D duncan98

        @ChrisW67
        This is true for debugging and publishing

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #37

        @duncan98
        @ChrisW67 has replied to you at length stating that it looks like the -g option is being passed to g++ even when building for Release instead of Debug, at least some of the time from what you say. You need to find out why that is and stop it doing so. That is the answer to your question, even if you ask it repeatedly.

        D 2 Replies Last reply
        0
        • JonBJ JonB

          @duncan98
          @ChrisW67 has replied to you at length stating that it looks like the -g option is being passed to g++ even when building for Release instead of Debug, at least some of the time from what you say. You need to find out why that is and stop it doing so. That is the answer to your question, even if you ask it repeatedly.

          D Offline
          D Offline
          duncan98
          wrote on last edited by
          #38
          This post is deleted!
          1 Reply Last reply
          0
          • D Offline
            D Offline
            duncan98
            wrote on last edited by
            #39

            This problem often occurs, sometimes good and sometimes bad. Isn't it a bug?20210811211406.png

            M 1 Reply Last reply
            0
            • D duncan98

              This problem often occurs, sometimes good and sometimes bad. Isn't it a bug?20210811211406.png

              M Offline
              M Offline
              mchinand
              wrote on last edited by
              #40

              Can you copy and paste (not a screenshot) the output from the 'Compile Output' window when you get this error? You are showing very little info about your problem that would allow someone to help you.

              1 Reply Last reply
              0
              • C ChrisW67

                @duncan98
                Here is the very first call to a C++ compiler in your output:

                g++ -c -fno-keep-inline-dllexport -O2 -g -std=gnu++11 ...
                

                The option -g tells, "GCC to emit extra information for use by a debugger"
                https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options

                So, while you think you are generating a release build, g++ is embedding debugging information.

                I am not sure if the bundled MingW ships a strip.exe, but if it does, run it against a copy of mysoft.exe and look at the resulting size.

                Now the question is, how did that '-g' option get there. This is consistent with a normal debug build.
                This could be a deliberate action in your project, a stale Makefile, broken Project configuration in Qt Creator.

                You need to check:

                • The project configuration in Qt Creator to ensure you have a sane setup. You could delete the Qt Creator *.user file and import the project fresh.
                • Your PRO file or CMakeLists.txt for manipulations of the CFLAGS/CXXFLAGS.
                • Absolutely rerun qmake/cmake to regenerate your Makefile (delete it first to ensure it is generating the file you think).

                You could build the project from clean source outside QtCreator to eliminate that as any cause.

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #41

                @ChrisW67 said in Why does the size of the file grow so much with each release without changing the code?:

                @duncan98
                Here is the very first call to a C++ compiler in your output:

                g++ -c -fno-keep-inline-dllexport -O2 -g -std=gnu++11 ...
                

                The option -g tells, "GCC to emit extra information for use by a debugger"
                https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options

                So, while you think you are generating a release build, g++ is embedding debugging information.

                I am not sure if the bundled MingW ships a strip.exe, but if it does, run it against a copy of mysoft.exe and look at the resulting size.

                Now the question is, how did that '-g' option get there. This is consistent with a normal debug build.
                This could be a deliberate action in your project, a stale Makefile, broken Project configuration in Qt Creator.

                You need to check:

                • The project configuration in Qt Creator to ensure you have a sane setup. You could delete the Qt Creator *.user file and import the project fresh.
                • Your PRO file or CMakeLists.txt for manipulations of the CFLAGS/CXXFLAGS.
                • Absolutely rerun qmake/cmake to regenerate your Makefile (delete it first to ensure it is generating the file you think).

                You could build the project from clean source outside QtCreator to eliminate that as any cause.

                -O2 -g could be a mixed build option for both release and debug. For publishing only release(-O2) is needed. On Qt creator there is option for Release only on Build settings tab.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  duncan98
                  wrote on last edited by duncan98
                  #42

                  I've rebuilt the pro. User file many times with a new project, but it will go wrong in a while

                  1 Reply Last reply
                  0
                  • JonBJ JonB

                    @duncan98
                    @ChrisW67 has replied to you at length stating that it looks like the -g option is being passed to g++ even when building for Release instead of Debug, at least some of the time from what you say. You need to find out why that is and stop it doing so. That is the answer to your question, even if you ask it repeatedly.

                    D Offline
                    D Offline
                    duncan98
                    wrote on last edited by
                    #43

                    @JonB
                    Are you sure this is the way to solve the problem?

                    JonBJ 1 Reply Last reply
                    0
                    • D duncan98

                      @JonB
                      Are you sure this is the way to solve the problem?

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #44

                      @duncan98
                      Which problem? You have reported about 3 problems, and jump from one to another.

                      Compile your executable without the -g and look at the executable size. Is it the 2MB you reported earlier? Compile with the -g and look at the executable size. Is it the 100MB you reported earlier? Assuming this is the case, you know it is the -g.

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        ChrisW67
                        wrote on last edited by
                        #45

                        @duncan98 said in Why does the size of the file grow so much with each release without changing the code?:

                        Are you sure this is the way to solve the problem?

                        Looking at the evidence, applying logic to working out what is actually happening, and then why it is happening is absolutely the way to sort the problem. Are you interested in this process?

                        Here are the different problems you have described (no particular order):

                        1. You are claiming that building the same source, with the same tool chain, gives a small executable the first time, a larger executable the second, even larger the third etc. (First post)

                        Almost certainly not happening, and we've seen no evidence. We have seen a debug sized build come out of something like a release build

                        1. "I uninstall qt5.15.2 and install qt5.15.1. It just works." You are not clear what "it" is. I am assuming what you mean is that building the same source against Qt 5.15.1 and Qt 5.15.2 libraries gives a reasonably sized executable and a large (debug) executable respectively.

                        If true, indicates that a potential problem exists in the Qt 5.15.2 library distribution (which is not Qt Creator) or something undefined/undocumented your project file does that breaks under the later version.

                        1. Qt Creator doesn't start

                        If it doesn't start then surely it cannot be the cause of this problem. Seriously. Build your project outside Qt Creator and record the results. If a release build fails to generate a stable, smallish executable then the problem is absolutely not Qt Creator.

                        1. Error in a debug build makefile while complaining about size of a claimed release build.

                        Someone is confused. You should be looking at the first error message, not the last (your one line screen grab).

                        1 Reply Last reply
                        1
                        • D Offline
                          D Offline
                          duncan98
                          wrote on last edited by duncan98
                          #46

                          Upstairs two do not know what to say, please master to pay attention to this problem

                          1 Reply Last reply
                          0
                          • D duncan98

                            Why does the size of the EXE file grow so much with each release without changing the code? The first time it was 3M, the second time it was 7M, the third time it was 10M, and the fourth time it was 100M. This is true even after a delete is rebuilt

                            Thank YouT Offline
                            Thank YouT Offline
                            Thank You
                            wrote on last edited by Thank You
                            #47

                            @duncan98
                            I got something similar (Memory usage was increasing so immensely) along with this problem
                            I tried reinstalling (fully remove all things and reinstall) and it worked. it is not the answer but it can solve

                            EDIT:
                            Sorry You have tried this , But

                            I uninstall qt5.15.2 and install qt5.15.1. It just works

                            I guess qt5.15.2 should have worked after re installation,
                            If your problem is solved,
                            Don't forget to mark it as solved

                            Let's make QT free or It will go forever

                            TRUE AND FALSE <3

                            D 1 Reply Last reply
                            0
                            • Thank YouT Thank You

                              @duncan98
                              I got something similar (Memory usage was increasing so immensely) along with this problem
                              I tried reinstalling (fully remove all things and reinstall) and it worked. it is not the answer but it can solve

                              EDIT:
                              Sorry You have tried this , But

                              I uninstall qt5.15.2 and install qt5.15.1. It just works

                              I guess qt5.15.2 should have worked after re installation,
                              If your problem is solved,
                              Don't forget to mark it as solved

                              D Offline
                              D Offline
                              duncan98
                              wrote on last edited by
                              #48

                              @Thank-You
                              Hello, does what you said have anything to do with the problem?

                              Thank YouT 1 Reply Last reply
                              0
                              • D duncan98

                                @Thank-You
                                Hello, does what you said have anything to do with the problem?

                                Thank YouT Offline
                                Thank YouT Offline
                                Thank You
                                wrote on last edited by
                                #49

                                @duncan98
                                Huh Of course, I said I faced that same problem along with more memory consumption.
                                And Yes It makes sense

                                Why does the size of the file grow so much with each release without changing the code?

                                You asked this question , So I said to reinstall it correctly. What's wrong with that?
                                And secondly
                                Bro If your question is solved then you should mark it as solved so that others can later see the correct answer or other peoples replying here can think it as solved

                                Let's make QT free or It will go forever

                                TRUE AND FALSE <3

                                jsulmJ D 2 Replies Last reply
                                0
                                • Thank YouT Thank You

                                  @duncan98
                                  Huh Of course, I said I faced that same problem along with more memory consumption.
                                  And Yes It makes sense

                                  Why does the size of the file grow so much with each release without changing the code?

                                  You asked this question , So I said to reinstall it correctly. What's wrong with that?
                                  And secondly
                                  Bro If your question is solved then you should mark it as solved so that others can later see the correct answer or other peoples replying here can think it as solved

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

                                  @Thank-You The problem in this thread is not memory consumption, but growing size of the executable file after each build.

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

                                  1 Reply Last reply
                                  1
                                  • Thank YouT Thank You

                                    @duncan98
                                    Huh Of course, I said I faced that same problem along with more memory consumption.
                                    And Yes It makes sense

                                    Why does the size of the file grow so much with each release without changing the code?

                                    You asked this question , So I said to reinstall it correctly. What's wrong with that?
                                    And secondly
                                    Bro If your question is solved then you should mark it as solved so that others can later see the correct answer or other peoples replying here can think it as solved

                                    D Offline
                                    D Offline
                                    duncan98
                                    wrote on last edited by
                                    #51

                                    @Thank-You
                                    Where did you find the problem solved?

                                    Thank YouT 2 Replies Last reply
                                    0
                                    • D duncan98

                                      @Thank-You
                                      Where did you find the problem solved?

                                      Thank YouT Offline
                                      Thank YouT Offline
                                      Thank You
                                      wrote on last edited by
                                      #52

                                      @jsulm Yes Sir I mean I faced the same problem, The executable file was growing large as well as memory consumption was increasing. So atleast the problem was same so I said what I did. And that worked for me. It reduced executable file size

                                      Let's make QT free or It will go forever

                                      TRUE AND FALSE <3

                                      1 Reply Last reply
                                      0
                                      • D duncan98

                                        @Thank-You
                                        Where did you find the problem solved?

                                        Thank YouT Offline
                                        Thank YouT Offline
                                        Thank You
                                        wrote on last edited by
                                        #53

                                        @duncan98

                                        I uninstall qt5.15.2 and install qt5.15.1. It just works

                                        Sir , What do you mean ?? Am I wrong or I am not understanding english

                                        Let's make QT free or It will go forever

                                        TRUE AND FALSE <3

                                        D 1 Reply Last reply
                                        0
                                        • Thank YouT Thank You

                                          @duncan98

                                          I uninstall qt5.15.2 and install qt5.15.1. It just works

                                          Sir , What do you mean ?? Am I wrong or I am not understanding english

                                          D Offline
                                          D Offline
                                          duncan98
                                          wrote on last edited by
                                          #54

                                          @Thank-You
                                          Normal work may be temporary. I have good and bad times here

                                          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