Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Compiling QtWebEngine fails because out of memory
Forum Updated to NodeBB v4.3 + New Features

Compiling QtWebEngine fails because out of memory

Scheduled Pinned Locked Moved Unsolved QtWebEngine
14 Posts 5 Posters 3.1k Views
  • 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.
  • O Offline
    O Offline
    odelaune
    wrote on 14 Feb 2023, 09:02 last edited by
    #1

    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.

    J 1 Reply Last reply 14 Feb 2023, 09:10
    0
    • O odelaune
      14 Feb 2023, 09:02

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 14 Feb 2023, 09:10 last edited by
      #2

      @odelaune Reduce amount of parallel build processes

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

      O 1 Reply Last reply 14 Feb 2023, 09:17
      0
      • J jsulm
        14 Feb 2023, 09:10

        @odelaune Reduce amount of parallel build processes

        O Offline
        O Offline
        odelaune
        wrote on 14 Feb 2023, 09:17 last edited by
        #3

        @jsulm Indeed, but the question is how?

        J 1 Reply Last reply 14 Feb 2023, 09:26
        0
        • O odelaune
          14 Feb 2023, 09:17

          @jsulm Indeed, but the question is how?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 14 Feb 2023, 09:26 last edited by
          #4

          @odelaune How do you build? Using make? Using ninja? ...?

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

          O 1 Reply Last reply 14 Feb 2023, 09:57
          0
          • J jsulm
            14 Feb 2023, 09:26

            @odelaune How do you build? Using make? Using ninja? ...?

            O Offline
            O Offline
            odelaune
            wrote on 14 Feb 2023, 09:57 last edited by
            #5

            @jsulm

            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 configure

            WebEngine 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

            J C 2 Replies Last reply 14 Feb 2023, 09:59
            0
            • O odelaune
              14 Feb 2023, 09:57

              @jsulm

              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 configure

              WebEngine 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

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 14 Feb 2023, 09:59 last edited by
              #6

              @odelaune I mean how do you start the actual build?

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

              O 1 Reply Last reply 14 Feb 2023, 10:12
              0
              • J jsulm
                14 Feb 2023, 09:59

                @odelaune I mean how do you start the actual build?

                O Offline
                O Offline
                odelaune
                wrote on 14 Feb 2023, 10:12 last edited by
                #7

                @jsulm

                cmake --build . -- -j4

                But the problem is ninja that is used to compile QtWebEngine does not care about "-j4" and uses all cpus that are available.

                J C 2 Replies Last reply 14 Feb 2023, 10:52
                0
                • O odelaune
                  14 Feb 2023, 10:12

                  @jsulm

                  cmake --build . -- -j4

                  But the problem is ninja that is used to compile QtWebEngine does not care about "-j4" and uses all cpus that are available.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 14 Feb 2023, 10:52 last edited by
                  #8

                  @odelaune Did you check whether you can tell configure to not to use ninja?

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

                  O 1 Reply Last reply 14 Feb 2023, 10:56
                  0
                  • J jsulm
                    14 Feb 2023, 10:52

                    @odelaune Did you check whether you can tell configure to not to use ninja?

                    O Offline
                    O Offline
                    odelaune
                    wrote on 14 Feb 2023, 10:56 last edited by
                    #9

                    @jsulm I had a look but I could not find how to do.

                    1 Reply Last reply
                    0
                    • O odelaune referenced this topic on 27 Feb 2023, 10:26
                    • O odelaune
                      14 Feb 2023, 09:57

                      @jsulm

                      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 configure

                      WebEngine 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

                      C Offline
                      C Offline
                      CompSciDude
                      wrote on 12 Jul 2023, 04:05 last edited by
                      #10

                      @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.

                      ytexasY 1 Reply Last reply 19 Jul 2024, 05:04
                      0
                      • O odelaune
                        14 Feb 2023, 10:12

                        @jsulm

                        cmake --build . -- -j4

                        But the problem is ninja that is used to compile QtWebEngine does not care about "-j4" and uses all cpus that are available.

                        C Offline
                        C Offline
                        CompSciDude
                        wrote on 12 Jul 2023, 04:37 last edited by
                        #11

                        @odelaune The way to specify the number of processors to Ninja is to set the NINJAFLAGS environment variable with -j<number>. For example, if I want Ninja to use 8 processes, i do export NINJAFLAGS=-j8.

                        MarckyM 1 Reply Last reply 19 Nov 2024, 17:26
                        1
                        • C Offline
                          C Offline
                          CompSciDude
                          wrote on 12 Jul 2023, 05:15 last edited by CompSciDude 7 Dec 2023, 05:26
                          #12

                          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.

                          1 Reply Last reply
                          0
                          • C CompSciDude
                            12 Jul 2023, 04:05

                            @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.

                            ytexasY Offline
                            ytexasY Offline
                            ytexas
                            wrote on 19 Jul 2024, 05:04 last edited by
                            #13

                            @CompSciDude
                            I tried -no-webengine-jumbo-build when building Qt 6.7.2, still cannot build cause by out of memory (12 G RAM). Neither --webengine-jumbo-build=<number>

                            1 Reply Last reply
                            0
                            • C CompSciDude
                              12 Jul 2023, 04:37

                              @odelaune The way to specify the number of processors to Ninja is to set the NINJAFLAGS environment variable with -j<number>. For example, if I want Ninja to use 8 processes, i do export NINJAFLAGS=-j8.

                              MarckyM Offline
                              MarckyM Offline
                              Marcky
                              wrote on 19 Nov 2024, 17:26 last edited by Marcky
                              #14
                              This post is deleted!
                              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