A project build on Raspbian.
-
If you are building with all cores, try keeping one idle (
make -j 3instead ofmake -j 4). This should lower the amount of RAM consumed by the compiler. -
If you are building with all cores, try keeping one idle (
make -j 3instead ofmake -j 4). This should lower the amount of RAM consumed by the compiler. -
@sierdzio
I see. It is - 1.5 GHz 64-bit quad core ARM Cortex-A72 processor. Where I configure it "make -j 3"? Do I have access to a make file directly?I see. PARALLEL JOBS: 3.
thank you. so far so good.
@jenya7 said in A project build on Raspbian.:
Where I configure it "make -j 3"
When you call make
make -j 4Do you compile in a terminal or in QtCreator?
If in QtCreator then go to "Projects/Build/Build Steps" and set the number of parallel jobs. -
@jenya7 said in A project build on Raspbian.:
Where I configure it "make -j 3"
When you call make
make -j 4Do you compile in a terminal or in QtCreator?
If in QtCreator then go to "Projects/Build/Build Steps" and set the number of parallel jobs. -
It could be a Qt bug. Mine on Ubuntu freezes sometimes as well. It could also be the case that too many other apps are running. Try to build it from command line which looks even faster. Get into the build folder which you can find it from Qt creator and run the command: make -j3.
I use qt creator only for editing and debugging. But compile from command line.
-
Why should it be a Qt bug when the OS freezes because it has to swap out the memory / has memory pressure? A single gcc process will easily use 1GB when compiling Qt so don't execute that much gcc processes at the same time when you're low on memory.
-
Why should it be a Qt bug when the OS freezes because it has to swap out the memory / has memory pressure? A single gcc process will easily use 1GB when compiling Qt so don't execute that much gcc processes at the same time when you're low on memory.
@Christian-Ehrlicher No other app causes this. So it must be a qt bug. Even when it swaps memory, it should keep going. It simply freezes.
-
@Christian-Ehrlicher No other app causes this. So it must be a qt bug. Even when it swaps memory, it should keep going. It simply freezes.
@JoeCFD said in A project build on Raspbian.:
So it must be a qt bug.
Did you really read my answer about the memory usage of a compiler instance? I guess not... there is nothing Qt (or in this case QtCreator...) can do about low memory or the memory usage of a compiler. When you spawn 4 processes which takes more than 1GB at least then you will have a hard time with only 4GB of RAM.
-
@JoeCFD said in A project build on Raspbian.:
So it must be a qt bug.
Did you really read my answer about the memory usage of a compiler instance? I guess not... there is nothing Qt (or in this case QtCreator...) can do about low memory or the memory usage of a compiler. When you spawn 4 processes which takes more than 1GB at least then you will have a hard time with only 4GB of RAM.
@Christian-Ehrlicher BTW, how could build cause memory problem?
-
Hi,
Building code can be very memory hungry depending on a lot independent things such as your actual code base, the number of libraries you use, the number of headers your include, the content of the headers you include, etc. Building is not just translating your text file to machine code.
-
Hi,
Building code can be very memory hungry depending on a lot independent things such as your actual code base, the number of libraries you use, the number of headers your include, the content of the headers you include, etc. Building is not just translating your text file to machine code.
-
@SGaist Could be true. I just tested my app. With 4 threads, make uses about 10% of total memory. But my app needs more than that.
-
@JoeCFD we don't know what the OP is trying to build so it could be completely at odds with regard to your own reference.
-
@SGaist True. I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
@JoeCFD said in A project build on Raspbian.:
@SGaist True. I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
How do I build from a command line?
-
@JoeCFD said in A project build on Raspbian.:
@SGaist True. I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
How do I build from a command line?
-
@SGaist True. I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
@JoeCFD said in A project build on Raspbian.:
I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
This is nonsense - there is no difference if you call
makeor whatever from the command line or from QtCreator.With 4 threads, make uses about 10% of total memory. But my app needs more than that.
And how do you know the RAM size of the OP? How do you know what headers and libraries are used?
Stop spreading fud!
-
- Open a terminal
- Create a build folder
- Change into build folder
- Call: qmake PATH_TO_PROJECT_FOLDER
- Call: make
mkdir build cd build qmake PATH_TO_YOUR_PROJECT_FOLDER make -
@JoeCFD said in A project build on Raspbian.:
I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
This is nonsense - there is no difference if you call
makeor whatever from the command line or from QtCreator.With 4 threads, make uses about 10% of total memory. But my app needs more than that.
And how do you know the RAM size of the OP? How do you know what headers and libraries are used?
Stop spreading fud!
@Christian-Ehrlicher said in A project build on Raspbian.:
@JoeCFD said in A project build on Raspbian.:
I suspect Qt Creator may have some sort of deadlock issue in update. Often I feel like it is slow with Qt Creator to build. Therefore, I run make from command line almost all the time.
This is nonsense - there is no difference if you call
makeor whatever from the command line or from QtCreator.May be the GUI itself loads some extra?