Windows release build hangs during linking
-
wrote on 16 Jun 2023, 09:55 last edited by
My application uses C++ and QML, on Windows the Debug build works properly, but the release build hangs during the link phase. Using Qt 5.15.14
-
wrote on 19 Jun 2023, 06:53 last edited by
That's not much information to go on. Do you have link time optimization on for the release build?
-
That's not much information to go on. Do you have link time optimization on for the release build?
wrote on 24 Jun 2023, 08:37 last edited by@SimonSchroeder I actually don't know, where do I check that?
-
@SimonSchroeder I actually don't know, where do I check that?
wrote on 24 Jun 2023, 08:46 last edited by@franzhelmut
It would be "unusual" for a linker to "hang". It would suggest a bug in the linker, which is used by "millions" of people, nothing to do with Qt.I don't know anything about QML, but can't you show the complete linker command line being executed (so that we can see what it is) and any responses/hanging? In Creator there is a "Build [or Compiler] Output" pane, I kind of assume QML still goes through this route?
-
@franzhelmut
It would be "unusual" for a linker to "hang". It would suggest a bug in the linker, which is used by "millions" of people, nothing to do with Qt.I don't know anything about QML, but can't you show the complete linker command line being executed (so that we can see what it is) and any responses/hanging? In Creator there is a "Build [or Compiler] Output" pane, I kind of assume QML still goes through this route?
wrote on 24 Jun 2023, 09:10 last edited by@JonB I just tried it again with link optimization on and now I get the message that the compiler ran out of heap space. Is there anything I can do about that?
-
@JonB I just tried it again with link optimization on and now I get the message that the compiler ran out of heap space. Is there anything I can do about that?
wrote on 24 Jun 2023, 09:59 last edited by JonB@franzhelmut Probably depends on whatever compiler/linker you are using...
-
@JonB I just tried it again with link optimization on and now I get the message that the compiler ran out of heap space. Is there anything I can do about that?
@franzhelmut said in Windows release build hangs during linking:
I can do about that?
Reduce the number of parallel compiler jobs (processes).
If you're using make to build you can use -j NUMBER_OF_BUILD_JOBS parameter. -
@JonB I just tried it again with link optimization on and now I get the message that the compiler ran out of heap space. Is there anything I can do about that?
wrote on 26 Jun 2023, 07:14 last edited by@franzhelmut said in Windows release build hangs during linking:
I just tried it again with link optimization on and now I get the message that the compiler ran out of heap space.
I was asking if you have link time optimization on because it could either use up a lot of RAM or it could just take an insane amount of time to link, i.e. it "hangs". That would've been an explanation and was not meant as a suggestion to turn it on. Since you now turned it on means you didn't have it before. So, this does not seem to have been your problem.
As @JonB suggested you should share the complete linker command so we can have a look at it.
-
@franzhelmut said in Windows release build hangs during linking:
I can do about that?
Reduce the number of parallel compiler jobs (processes).
If you're using make to build you can use -j NUMBER_OF_BUILD_JOBS parameter.wrote on 10 Jul 2023, 06:20 last edited by@jsulm I am using qmake
-
@jsulm I am using qmake
@franzhelmut qmake either generates make files or (on Windows) files for Ninja. So, do you use make or Ninja? If you do not know then look into the build folder and see whether you find Makefile inside or something like Ninja.build.
-
@franzhelmut qmake either generates make files or (on Windows) files for Ninja. So, do you use make or Ninja? If you do not know then look into the build folder and see whether you find Makefile inside or something like Ninja.build.
wrote on 13 Jul 2023, 12:15 last edited by@jsulm I do see the MakeFile
-
@jsulm I do see the MakeFile
@franzhelmut Then try to reduce the amount of parallel builds using -j parameter like I suggested before.
-
@franzhelmut Then try to reduce the amount of parallel builds using -j parameter like I suggested before.
Also make sure you're using the 64bit cl.exe and not the 32bit one.
-
@jsulm I do see the MakeFile
wrote on 13 Jul 2023, 14:58 last edited by@franzhelmut this process works on my Windows10 PC, with the 2015 compiler. On Windows11 I cannot install the 2015 compiler. The 2019 compiler seems to need more resources like heap space.