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. Can't build QtWebEngine. Compiler out of heap space error!
Forum Updated to NodeBB v4.3 + New Features

Can't build QtWebEngine. Compiler out of heap space error!

Scheduled Pinned Locked Moved Solved QtWebEngine
20 Posts 8 Posters 2.1k Views 2 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.
  • N Offline
    N Offline
    new-user
    wrote on 28 Mar 2024, 17:48 last edited by new-user
    #1

    output.png Operating System: Windows 10 (64 bit) 22H2 Home Edition

    Error: C1002: compiler is out of heap space in pass 2

    Configure Command: "C:\Qt\Src\configure.bat" -prefix "C:\Qt\Binary" -release -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgraphs -skip qtgrpc -skip qthttpserver -skip qtimageformats -skip qtinsighttracker -skip qtlanguageserver -skip qtlocation -skip qtlottie -skip qtmqtt -skip qtmultimedia -skip qtnetworkauth -skip qtopcua -skip qtpositioning -skip qtquick3d -skip qtquick3dphysics -skip qtquickeffectmaker -skip qtquicktimeline -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -webengine-proprietary-codecs -no-webengine-jumbo-build

    Build Command: cmake --build "C:\Qt\Build"

    Every time I try to build qtwebengine it fails with this error: "C:\Qt\Src\qtwebengine\src\3rdparty\chromium\third_party\highway\src\hwy\ops\emu128-inl.h" (69) : fatal error C1002: compiler is out of heap space in pass 2.

    I looked in the task manager and cl.exe is using a lot of memory almost 100Gb of ram is used. Why is this happening? Why does building qtwebengine needs over 100GB of ram just to build? Help Please! I am building qtwebengine from source because I need to enable proprietary codecs to play certain video formats. I am using a 64 bit version of windows and the x64 native tools from visual studio 2022 so the compiler is also 64 bit.

    C 1 Reply Last reply 28 Mar 2024, 18:14
    0
    • N new-user
      28 Mar 2024, 17:48

      output.png Operating System: Windows 10 (64 bit) 22H2 Home Edition

      Error: C1002: compiler is out of heap space in pass 2

      Configure Command: "C:\Qt\Src\configure.bat" -prefix "C:\Qt\Binary" -release -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgraphs -skip qtgrpc -skip qthttpserver -skip qtimageformats -skip qtinsighttracker -skip qtlanguageserver -skip qtlocation -skip qtlottie -skip qtmqtt -skip qtmultimedia -skip qtnetworkauth -skip qtopcua -skip qtpositioning -skip qtquick3d -skip qtquick3dphysics -skip qtquickeffectmaker -skip qtquicktimeline -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebsockets -skip qtwebview -webengine-proprietary-codecs -no-webengine-jumbo-build

      Build Command: cmake --build "C:\Qt\Build"

      Every time I try to build qtwebengine it fails with this error: "C:\Qt\Src\qtwebengine\src\3rdparty\chromium\third_party\highway\src\hwy\ops\emu128-inl.h" (69) : fatal error C1002: compiler is out of heap space in pass 2.

      I looked in the task manager and cl.exe is using a lot of memory almost 100Gb of ram is used. Why is this happening? Why does building qtwebengine needs over 100GB of ram just to build? Help Please! I am building qtwebengine from source because I need to enable proprietary codecs to play certain video formats. I am using a 64 bit version of windows and the x64 native tools from visual studio 2022 so the compiler is also 64 bit.

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 28 Mar 2024, 18:14 last edited by
      #2

      @new-user Make sure to use the 64bit compiler (64bit x64 command prompt). It will not compile with a 32bit compiler as 2GB of usable Ram is not enough as you noticed.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      N 1 Reply Last reply 28 Mar 2024, 18:23
      0
      • C Christian Ehrlicher
        28 Mar 2024, 18:14

        @new-user Make sure to use the 64bit compiler (64bit x64 command prompt). It will not compile with a 32bit compiler as 2GB of usable Ram is not enough as you noticed.

        N Offline
        N Offline
        new-user
        wrote on 28 Mar 2024, 18:23 last edited by
        #3

        @Christian-Ehrlicher The OS and the msvc compiler used for building qtwebengine are both x64 bit

        C 1 Reply Last reply 28 Mar 2024, 18:25
        0
        • N new-user
          28 Mar 2024, 18:23

          @Christian-Ehrlicher The OS and the msvc compiler used for building qtwebengine are both x64 bit

          C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 28 Mar 2024, 18:25 last edited by
          #4

          @new-user I doubt so. Please post the output of 'where CL. exe'

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          N 1 Reply Last reply 28 Mar 2024, 18:33
          0
          • C Christian Ehrlicher
            28 Mar 2024, 18:25

            @new-user I doubt so. Please post the output of 'where CL. exe'

            N Offline
            N Offline
            new-user
            wrote on 28 Mar 2024, 18:33 last edited by
            #5

            @Christian-Ehrlicherwhere cl output.png

            C 1 Reply Last reply 28 Mar 2024, 21:20
            0
            • N new-user
              28 Mar 2024, 18:33

              @Christian-Ehrlicherwhere cl output.png

              C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 28 Mar 2024, 21:20 last edited by
              #6

              @new-user OK, then you really need more Ram or don't build webengine. Why do you want to build Qt by yourself in the first place?

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              N 1 Reply Last reply 28 Mar 2024, 22:40
              0
              • C Christian Ehrlicher
                28 Mar 2024, 21:20

                @new-user OK, then you really need more Ram or don't build webengine. Why do you want to build Qt by yourself in the first place?

                N Offline
                N Offline
                new-user
                wrote on 28 Mar 2024, 22:40 last edited by new-user
                #7

                @Christian-Ehrlicher

                I need to build qtwebengine because I need to enable proprietary codecs to be able to play mp4 videos. Qtwebengine by default disables proprietary codecs due to licensing. But if I need to use proprietary codecs I have to build it from source with the "-webengine-proprietary-codecs" option. But qtwebengine fails to build. How much memory does QT really need to be built, 100GB of memory seems to be excessive.

                https://doc.qt.io/qt-5/qtwebengine-features.html#audio-and-video-codecs

                C 1 Reply Last reply 29 Mar 2024, 00:29
                0
                • N new-user
                  28 Mar 2024, 22:40

                  @Christian-Ehrlicher

                  I need to build qtwebengine because I need to enable proprietary codecs to be able to play mp4 videos. Qtwebengine by default disables proprietary codecs due to licensing. But if I need to use proprietary codecs I have to build it from source with the "-webengine-proprietary-codecs" option. But qtwebengine fails to build. How much memory does QT really need to be built, 100GB of memory seems to be excessive.

                  https://doc.qt.io/qt-5/qtwebengine-features.html#audio-and-video-codecs

                  C Offline
                  C Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on 29 Mar 2024, 00:29 last edited by Christian Ehrlicher
                  #8

                  @new-user said in Can't build QtWebEngine. Compiler out of heap space error!:

                  100GB of memory seems to be excessive.

                  You for sure don't have 100GB of Ram. This is what is to few, not the harddisk size.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  N 1 Reply Last reply 29 Mar 2024, 01:04
                  0
                  • C Christian Ehrlicher
                    29 Mar 2024, 00:29

                    @new-user said in Can't build QtWebEngine. Compiler out of heap space error!:

                    100GB of memory seems to be excessive.

                    You for sure don't have 100GB of Ram. This is what is to few, not the harddisk size.

                    N Offline
                    N Offline
                    new-user
                    wrote on 29 Mar 2024, 01:04 last edited by
                    #9

                    @Christian-Ehrlicher

                    Do you not know how to solve the problem. Maybe I should report this as a bug in Qt because no software should be using 100GB of ram just to compile.

                    Axel SpoerlA 1 Reply Last reply 29 Mar 2024, 05:20
                    0
                    • N new-user
                      29 Mar 2024, 01:04

                      @Christian-Ehrlicher

                      Do you not know how to solve the problem. Maybe I should report this as a bug in Qt because no software should be using 100GB of ram just to compile.

                      Axel SpoerlA Offline
                      Axel SpoerlA Offline
                      Axel Spoerl
                      Moderators
                      wrote on 29 Mar 2024, 05:20 last edited by
                      #10

                      @new-user
                      Before reporting a bug, could to cd into the qtwebengine source tree and run

                      git submodule update —recursive
                      

                      (two minuses, as on my computer this here is displayed as one long minus)
                      Webengine uses a lot of 3rd party sources. When they are just slightly out of date, you sometimes face strange compiling errors.

                      How much ram do you have? I can build Webengine with 64GB of ram.

                      Software Engineer
                      The Qt Company, Oslo

                      N 1 Reply Last reply 29 Mar 2024, 17:15
                      0
                      • Axel SpoerlA Axel Spoerl
                        29 Mar 2024, 05:20

                        @new-user
                        Before reporting a bug, could to cd into the qtwebengine source tree and run

                        git submodule update —recursive
                        

                        (two minuses, as on my computer this here is displayed as one long minus)
                        Webengine uses a lot of 3rd party sources. When they are just slightly out of date, you sometimes face strange compiling errors.

                        How much ram do you have? I can build Webengine with 64GB of ram.

                        N Offline
                        N Offline
                        new-user
                        wrote on 29 Mar 2024, 17:15 last edited by
                        #11

                        @Axel-Spoerl

                        It doesn't matter how much memory I have. No matter how much more memory I add to the system it is still for some weird reason not enough. How did you even build it with 64GB of memory? What version of Qt did you use? What are your compiler flags? What is the size of your page file? What is your build environment?

                        Axel SpoerlA 1 Reply Last reply 30 Mar 2024, 10:09
                        0
                        • N new-user
                          29 Mar 2024, 17:15

                          @Axel-Spoerl

                          It doesn't matter how much memory I have. No matter how much more memory I add to the system it is still for some weird reason not enough. How did you even build it with 64GB of memory? What version of Qt did you use? What are your compiler flags? What is the size of your page file? What is your build environment?

                          Axel SpoerlA Offline
                          Axel SpoerlA Offline
                          Axel Spoerl
                          Moderators
                          wrote on 30 Mar 2024, 10:09 last edited by
                          #12

                          @new-user
                          I build 6.7 and 6.8 on Linux with 64MB Ram and ample disk space.

                          configure -developer-build -xcb -submodules qtdeclarative, qtwebengine
                          

                          Have you tried the submodule update?

                          Software Engineer
                          The Qt Company, Oslo

                          N 1 Reply Last reply 30 Mar 2024, 15:25
                          0
                          • Axel SpoerlA Axel Spoerl
                            30 Mar 2024, 10:09

                            @new-user
                            I build 6.7 and 6.8 on Linux with 64MB Ram and ample disk space.

                            configure -developer-build -xcb -submodules qtdeclarative, qtwebengine
                            

                            Have you tried the submodule update?

                            N Offline
                            N Offline
                            new-user
                            wrote on 30 Mar 2024, 15:25 last edited by
                            #13

                            @Axel-Spoerl

                            I built qtwebengine successfully but unfortunately it needs a lot of memory to be built it used as mush as 112GB of memory for a few hours of building then memory consumption normalized afterwards. Just by increasing window's page file size it worked. GraciasđŸ˜€

                            Axel SpoerlA 1 Reply Last reply 31 Mar 2024, 09:12
                            0
                            • N new-user has marked this topic as solved on 30 Mar 2024, 15:25
                            • N new-user
                              30 Mar 2024, 15:25

                              @Axel-Spoerl

                              I built qtwebengine successfully but unfortunately it needs a lot of memory to be built it used as mush as 112GB of memory for a few hours of building then memory consumption normalized afterwards. Just by increasing window's page file size it worked. GraciasđŸ˜€

                              Axel SpoerlA Offline
                              Axel SpoerlA Offline
                              Axel Spoerl
                              Moderators
                              wrote on 31 Mar 2024, 09:12 last edited by
                              #14

                              @new-user
                              It’s a bit sad, that you completely ignore my question about the submodule update.

                              Software Engineer
                              The Qt Company, Oslo

                              N 1 Reply Last reply 2 Apr 2024, 16:06
                              0
                              • S Offline
                                S Offline
                                SimonSchroeder
                                wrote on 2 Apr 2024, 06:35 last edited by
                                #15

                                If you are using parallel compilation on an AMD ThreadRipper with up to 96 cores, each compilation processes only gets about 1GB of memory if you have ~100GB available. If your PC has many cores, try restricting the number of cores and compilation will become faster (using the pagefile is not a real solution). More cores is not always better.

                                JonBJ 1 Reply Last reply 2 Apr 2024, 08:18
                                2
                                • S SimonSchroeder
                                  2 Apr 2024, 06:35

                                  If you are using parallel compilation on an AMD ThreadRipper with up to 96 cores, each compilation processes only gets about 1GB of memory if you have ~100GB available. If your PC has many cores, try restricting the number of cores and compilation will become faster (using the pagefile is not a real solution). More cores is not always better.

                                  JonBJ Offline
                                  JonBJ Offline
                                  JonB
                                  wrote on 2 Apr 2024, 08:18 last edited by
                                  #16

                                  @SimonSchroeder
                                  Wow that is interesting! I assume this applies to any multi-core/processor. So each time I offer use of a core to a process it will divide available memory across cores used and each one (or the new one at least) will only get a limited amount. Having more available cores than available memory sounds like a bad idea!

                                  1 Reply Last reply
                                  0
                                  • Axel SpoerlA Axel Spoerl
                                    31 Mar 2024, 09:12

                                    @new-user
                                    It’s a bit sad, that you completely ignore my question about the submodule update.

                                    N Offline
                                    N Offline
                                    new-user
                                    wrote on 2 Apr 2024, 16:06 last edited by
                                    #17

                                    @Axel-Spoerl

                                    Q: Can you please confirm if you have done a submodule update in qtwebengine, as I already asked in the forum?

                                    A: Yes I did run the command "git submodule update --recursive" but no output was shown.

                                    1 Reply Last reply
                                    0
                                    • 7 Offline
                                      7 Offline
                                      7erg
                                      wrote on 19 Sept 2024, 08:49 last edited by
                                      #18

                                      Same here.
                                      It needs at least 112 GB memory to build qtwebengine 6.6.1 on windows 10 with MSVC 2022. I was able to finally build it with 50 GB ram + 70 GB pagefile in virtual environment.
                                      Building linux version on ubuntu with gcc was successfull with 8 GB ram+30 GB swap.
                                      It would be better to list memory requirements in prerequisites section of building instructions

                                      JonBJ jsulmJ 2 Replies Last reply 19 Sept 2024, 09:07
                                      0
                                      • 7 7erg
                                        19 Sept 2024, 08:49

                                        Same here.
                                        It needs at least 112 GB memory to build qtwebengine 6.6.1 on windows 10 with MSVC 2022. I was able to finally build it with 50 GB ram + 70 GB pagefile in virtual environment.
                                        Building linux version on ubuntu with gcc was successfull with 8 GB ram+30 GB swap.
                                        It would be better to list memory requirements in prerequisites section of building instructions

                                        JonBJ Offline
                                        JonBJ Offline
                                        JonB
                                        wrote on 19 Sept 2024, 09:07 last edited by
                                        #19

                                        @7erg said in Can't build QtWebEngine. Compiler out of heap space error!:

                                        It needs at least 112 GB memory to build qtwebengine 6.6.1 on windows 10 with MSVC 2022. I was able to finally build it with 50 GB ram + 70 GB pagefile in virtual environment.

                                        OMG!

                                        1 Reply Last reply
                                        0
                                        • 7 7erg
                                          19 Sept 2024, 08:49

                                          Same here.
                                          It needs at least 112 GB memory to build qtwebengine 6.6.1 on windows 10 with MSVC 2022. I was able to finally build it with 50 GB ram + 70 GB pagefile in virtual environment.
                                          Building linux version on ubuntu with gcc was successfull with 8 GB ram+30 GB swap.
                                          It would be better to list memory requirements in prerequisites section of building instructions

                                          jsulmJ Online
                                          jsulmJ Online
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 19 Sept 2024, 09:26 last edited by
                                          #20

                                          @7erg Does it help to reduce the number of parallel build processes?

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

                                          1 Reply Last reply
                                          1

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved