microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.92k stars 6.33k forks source link

[qtwebengine] Build error on x64-windows #35843

Open a980374208 opened 9 months ago

a980374208 commented 9 months ago

PS C:\Users\Jiangbinbin\Desktop> vcpkg install qtwebengine[proprietary-codecs,geolocation,spellchecker,webchannel] --triplet x64-windows --x-buildtrees-root=d:/web Computing installation plan... The following packages will be built and installed: qtwebengine[core,default-features,geolocation,proprietary-codecs,spellchecker,webchannel]:x64-windows@6.6.1#3 Detecting compiler hash for triplet x64-windows... Restored 0 package(s) from C:\Users\Jiangbinbin\AppData\Local\vcpkg\archives in 87.5 us. Use --debug to see more details. Installing 1/1 qtwebengine[core,default-features,geolocation,proprietary-codecs,spellchecker,webchannel]:x64-windows@6.6.1#3... Building qtwebengine[core,default-features,geolocation,proprietary-codecs,spellchecker,webchannel]:x64-windows@6.6.1#3... -- Setting up python virtual environmnent... -- Installing python packages: html5lib -- Setting up python virtual environmnent...finished. -- Using cached qtwebengine-everywhere-src-6.6.1.tar.xz. -- Cleaning sources at D:/web/qtwebengine/src/here-src-6-4f617c9365.clean. Use --editable to skip cleaning for the packages you specify. -- Extracting source D:/vcpkg/downloads/qtwebengine-everywhere-src-6.6.1.tar.xz -- Applying patch clang-cl.patch -- Applying patch msvc-template.patch -- Using source at D:/web/qtwebengine/src/here-src-6-4f617c9365.clean -- Found external ninja('1.11.0'). -- Configuring x64-windows-rel -- Building x64-windows-rel CMake Warning at scripts/cmake/vcpkg_execute_build_process.cmake:65 (message): Please ensure your system has sufficient memory. Call Stack (most recent call first): installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process) installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build) ports/qtwebengine/portfile.cmake:115 (vcpkg_cmake_install) scripts/ports.cmake:170 (include)

-- Restarting build without parallelism CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message): Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Release --target install -- -v -j29 Working Directory: D:/web/qtwebengine/x64-windows-rel See logs for more information: D:\web\qtwebengine\install-x64-windows-rel-out.log D:\web\qtwebengine\install-x64-windows-rel-out-1.log

Call Stack (most recent call first): installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process) installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build) ports/qtwebengine/portfile.cmake:115 (vcpkg_cmake_install) scripts/ports.cmake:170 (include)

error: building qtwebengine:x64-windows failed with: BUILD_FAILED Elapsed time to handle qtwebengine:x64-windows: 36 min Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+qtwebengine You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?title=[qtwebengine]+Build+error+on+x64-windows&body=Copy+issue+body+from+D%3A%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Copy issue body from D:/vcpkg/installed/vcpkg/issue_body.md : issue_body.md

the error log:

install-x64-windows-rel-out.log install-x64-windows-rel-out-1.log

StarGate-One commented 9 months ago

From the console log:

CMake Warning at scripts/cmake/vcpkg_execute_build_process.cmake:65 (message): Please ensure your system has sufficient memory. Call Stack (most recent call first):

From install-x64-windows-rel-out.log

/Zc:sizedDealloc- /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /MD /wd4344 /wd4577 /std:c++20 /TP /GR- >/Fd"obj/third_party/blink/public/mojom/mojom_platform_blink_cc.pdb" C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\limits(366): fatal error >C1060: compiler is out of heap space [25828/39347] CXX >obj/third_party/blink/public/mojom/mojom_platform_blink/file_system_access_data_transfer_token.mojom-blink.obj FAILED: obj/third_party/blink/public/mojom/mojom_platform_blink/file_system_access_data_transfer_token.mojom-blink.obj

From install-x64-windows-rel-out-1.log:

/MD /wd4305 /wd4324 /wd4714 /wd4800 /wd4101 /wd4805 /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi /wd4344 ->DLIBXML_STATIC= /wd4577 /std:c++20 /TP /GR- /Fd"obj/third_party/blink/renderer/bindings/modules/v8/v8_cc.pdb" C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\exception(71): fatal error >C1060: compiler is out of heap space [5468/13517] CXX obj/third_party/blink/renderer/bindings/modules/v8/v8/v8_presentation_connection_state.obj FAILED: obj/third_party/blink/renderer/bindings/modules/v8/v8/v8_presentation_connection_state.obj

Ran out of memory.

a980374208 commented 9 months ago

@StarGate-One Thanks, currently my RAM is 32g, if I want to compile successfully, please ask how many gigabytes I want to upgrade to

StarGate-One commented 9 months ago

32g should be sufficient - this is heap space the computer has allocated to the compiler. You could try a few things:

  1. Reboot the PC - if the PC has not been rebooted the memory could be fragmented
  2. Reduce the number of programs running
  3. Close the number of open tabs in browsers such a firefox, chrome and edge
  4. You could set VCPKG_MAX_CONCURRENCY=<1/2 the number of processor threads on the system>. So if the PC supports 16 threads, then set VCPKG_MAX_CONCURRENCY=8 before issuing the command .\vcpkg.exe nstall qtwebengine[proprietary-codecs,geolocation,spellchecker,webchannel] --triplet x64-windows --x-buildtrees-root=d:/web. This will cause vcpkg to run longer than when using all threads but there will be fewer concurrently running compiles - thus hopefully giving the compiler more heap space.
dg0yt commented 9 months ago

Thanks, currently my RAM is 32g

And you have 28 cores competing for memory.

"...ninja.exe" -v -v -j29 install
a980374208 commented 9 months ago

Thanks, currently my RAM is 32g

And you have 28 cores competing for memory.

"...ninja.exe" -v -v -j29 install

Yes, but the second time "...ninja.exe" -v -v -j1 install command still fails

a980374208 commented 9 months ago

32g should be sufficient - this is heap space the computer has allocated to the compiler. You could try a few things:

  1. Reboot the PC - if the PC has not been rebooted the memory could be fragmented
  2. Reduce the number of programs running
  3. Close the number of open tabs in browsers such a firefox, chrome and edge
  4. You could . So if the PC supports 16 threads, then before issuing the command . This will cause vcpkg to run longer than when using all threads but there will be fewer concurrently running compiles - thus hopefully giving the compiler more heap space.set VCPKG_MAX_CONCURRENCY=<1/2 the number of processor threads on the system>``set VCPKG_MAX_CONCURRENCY=8``.\vcpkg.exe nstall qtwebengine[proprietary-codecs,geolocation,spellchecker,webchannel] --triplet x64-windows --x-buildtrees-root=d:/web

Ok thanks, I'll give it a try

github-actions[bot] commented 8 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

savahmel commented 6 months ago

Have the same issue, on 64 GB of ram machine vcpkg configuration fails. Debug build of qtwebengine succeeded, release build failed. Debug build linker process required over 40 GB of RAM Release compilation of a single file evaluate_prg_hwy.cc required over 40 GB of RAM

MonicaLiu0311 commented 2 months ago

This is a issue that cannot be reproduced. Do you still have the problem?