Compiling QtWebEngine fails because out of memory
-
Hello, I try to compile the QtWebEngine module of Qt 6.4.2 from sources but I fail because I do not have enough memory. I have a Intel i5-10505 processor with 12 threads and 24 Go of RAM. It seems that I have not enough RAM compare to the number of threads.
I have read this post but I cannot use this solution because I do not have sudo rights to use
chcpu
.So I am looking for solution that works with only user right. Basically, I think limiting the number of ninja jobs is enough but I do not find how to do it.
Thanks in advance for your help.
-
According to this, here is what I tried so far:
tar -xvf qt-everywhere-src-6.4.2.tar.xz cd qt-everywhere-src-6.4.2/ ./configure -prefix /home/odelaune/Qt/6.4.2src -DQT_FEATURE_webengine_jumbo_build=OFF -DINPUT_webengine_jumbo_file_merge_limit=0
Note that
-DQT_FEATURE_webengine_jumbo_build
and-DINPUT_webengine_jumbo_file_merge_limit=0
seems to be ignored because here is the ouput of configureWebEngine Repository Build Options:
Build Ninja ............................ no
Build Gn ............................... yes
Jumbo Build ............................ yes
Developer build ........................ no
Build QtWebEngine Modules:
Build QtWebEngineCore ................ yes
Build QtWebEngineWidgets ............. yes
Build QtWebEngineQuick ............... yes -
-
@odelaune The way you are providing the arguments is incorrect. Qt's configure script has two arguments of interest when dealing with jumbo-build. One is -webengine-jumbo-build, which toggles jumbo-build (prepend -no to the argument to disable jumbo-build). Two is --webengine-jumbo-build=<number>, which determines how many source files comprise each jumbo source file.
-
I ran into a similar issue while building Qt 6.2.4. g++ would terminate unexpectedly. I assume it ran out of memory. Just to be sure it was not Qt-relates, I opened an issue https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-115083.
-
@CompSciDude
I tried-no-webengine-jumbo-build
when building Qt6.7.2
, still cannot build cause by out of memory (12 G RAM). Neither--webengine-jumbo-build=<number>
-
@CompSciDude works for me! (yocto with Qt6.7.3)
Added this to a qtwebengine_git.bbappend:
- export NINJAFLAGS="-j<proper value for your setup>"
Thanks!