Open heretic13 opened 3 years ago
Computing installation plan...
The following packages will be built and installed:
v8[core]:x86-windows -> 8.6.395.17
Detecting compiler hash for triplet x86-windows...
Could not locate cached archive: C:\Users\sunhe\AppData\Local\vcpkg\archives\a7\a76d1a3509a51a4e6a3c730677d6bd88e2dac91e.zip
Starting package 1/1: v8:x86-windows
Building package v8[core]:x86-windows...
-- Using msys root at D:/Projects/VS2019/vcpkg/downloads/tools/msys2/b1b4e6089ab84adb
-- Using cached D:/Projects/VS2019/vcpkg/downloads/v8-7565e93eb72cea4268028fc20186d415c22b1cff.tar.gz
-- Cleaning sources at D:/Projects/VS2019/vcpkg/buildtrees/v8/src/15c22b1cff-c34597ce8b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/Projects/VS2019/vcpkg/downloads/v8-7565e93eb72cea4268028fc20186d415c22b1cff.tar.gz
-- Applying patch D:/Projects/VS2019/vcpkg/ports/v8/v8.patch
-- Using source at D:/Projects/VS2019/vcpkg/buildtrees/v8/src/15c22b1cff-c34597ce8b.clean
-- Fetching submodules
-- Generating v8 build files. Please wait...
-- Generating build (x86-windows-dbg)...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:108 (message):
Command failed: D:/Projects/VS2019/vcpkg/downloads/tools/gn/qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC/gn.exe gen D:/Projects/VS2019/vcpkg/buildtrees/v8/x86-windows-dbg "--args=is_component_build=true target_cpu="x86" v8_monolithic=false v8_use_external_startup_data=true use_sysroot=false is_clang=false use_custom_libcxx=false v8_enable_verify_heap=false icu_use_data_file=false is_debug=true enable_iterator_debugging=true pkg_config_libdir="/cygdrive/d/Projects/VS2019/vcpkg/installed/x86-windows/debug/lib/pkgconfig""
Working Directory: D:/Projects/VS2019/vcpkg/buildtrees/v8/src/15c22b1cff-c34597ce8b.clean
Error code: 1
See logs for more information:
D:\Projects\VS2019\vcpkg\buildtrees\v8\generate-x86-windows-dbg-out.log
D:\Projects\VS2019\vcpkg\buildtrees\v8\generate-x86-windows-dbg-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_gn.cmake:47 (vcpkg_execute_required_process)
scripts/cmake/vcpkg_configure_gn.cmake:55 (generate)
ports/v8/portfile.cmake:145 (vcpkg_configure_gn)
scripts/ports.cmake:136 (include)
Error: Building package v8:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: v8:x86-windows
Vcpkg version: 2020.11.12-nohash
Additionally, attach any relevant sections from the log files above.
generate-x86-windows-dbg-err.log generate-x86-windows-dbg-out.log
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\dbghelp.dll" You must install Windows 10 SDK version 10.0.19041.0 including the "Debugging Tools for Windows" feature.
Did follow the instructions within the generate-<triplet>-dbg-err.log
?
It is telling you to install the Windows SDK version 10.0.19041.0 with the "Debugging Tools for Windows" feature.
@Kwizatz Can you please take a look?
Thanks.
Until recently you had to install the SDK from its standalone installer:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
though that page seems to imply that you can install it from the VS2019 installer.
Try installing it from the standalone SDK installer (winsdksetup.exe), otherwise, make sure you have installed the x86 version of the SDK and not just the x64 SDK.
It is working for me with the standalone installer, it may be a problem related to the installation path, GN may be looking at the standalone location and not into the VS location of the files at all, I'll keep that in mind for the next update.
@Kwizatz I think this error message should be reported in portfile.cmake instead of failure logs.
By default, installing VS 2019 with SDK does not provide an SDK with support for "Debugging Tools for Windows". Manual install / reinstall SDK only. Poorly. I don't know the problem is vcpkg or Visual Studio installer.
@heretic13 Ahh I see. There is a known issue about Windows SDK: When there is no administrator authority, the path of the Windows SDK cannot be written to the registry. And there is no prompt message during installation. So the compiler cannot find it through the registry.
Please download the Windows SDK separately and install it with administrator permission.
If you make Modify SDK, then the SDK installation does not work Windows_Software_Development_Kit___Windows_10.0.19041.1_20201229113731.log
@heretic13 Have you uninstalled all the Windows SDKs installed using the Visual Studio installer?
No. It was version 10.0.19041.1 installed via VS Installer. I deleted it.
I still have SDK 10.0.17763.0 installed via VS Installer. There I checked the "Debugging tools for Windows" checkbox.
I cleaned the "buildtrees" folder and removed the previously installed dependency components - icu, zlib.
I ran the build and it failed again.
generate-x86-windows-static-dbg-err.log generate-x86-windows-static-dbg-out.log
Do I have to do something extra to switch vcpkg and VS2019 to use SDK 10.0.17763.0? Or does v8 for Windows build successfully only on the latest SDK?
@heretic13, could you reinstall sdk 10.0.17763.0, and see if the issue persist? Please open x64 Native tools command tool and execute the command: 'set include', could you attach the output here?
Could you also check if C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86 still exist in your local machine?
The situation is as follows. The installation script tries to copy the file "C:\Program Files (x86)\ Windows Kits\10\Debuggers\x86\api-ms-win-downlevel-kernel32-l2-1-0.dll" which is not in sdk 10.0.17763.0 with support for "Debugging tools for Windows".
This file "api-ms-win-downlevel-kernel32-l2-1-0.dll" appeared only after I downloaded and manually installed SDK 10.0.19041.1 with support for "Debugging tools for Windows".
Now v8 is in the process of building (a few minutes already). Previously, the process has already terminated at this point with an error.
Brief conclusions:
Compilation successful!
@Kwizatz I think this error message should be reported in portfile.cmake instead of failure logs.
Agreed, current report comes from upstream GN, so not sure how to trap it from the portfile other that running the same check independently from cmake.
@JackBoosY Thanks, that helps.
Hi guys, is this issue resolved?
msvc v142(vs2019)
windows sdk 10.0.19041.0
v8:x86-windows-static(9.0.257.17#1)
not found v8 in find_package
find_package(V8 CONFIG REQUIRED)
target_link_libraries(main PRIVATE V8::V8)
1> 已为配置“x86-Release”启动 CMake 生成。
1> 发现和使用 vcpkg 工具链文件(D:/vcpkg/scripts/buildsystems/vcpkg.cmake)。
1> 命令行: "cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\vsq_k\source\repos\V8Core_cmake\out\install\x86-Release" -DCMAKE_TOOLCHAIN_FILE="D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\vsq_k\source\repos\V8Core_cmake" 2>&1"
1> 工作目录: C:\Users\vsq_k\source\repos\V8Core_cmake\out\build\x86-Release
1> [CMake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
1> [CMake] -- The C compiler identification is MSVC 19.28.29915.0
1> [CMake] -- The CXX compiler identification is MSVC 19.28.29915.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x86/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x86/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] CMake Error at D:/vcpkg/scripts/buildsystems/vcpkg.cmake:861 (_find_package):
1> [CMake] Could not find a package configuration file provided by "V8" with any of
1> [CMake] the following names:
1> [CMake]
1> [CMake] V8Config.cmake
1> [CMake] v8-config.cmake
1> [CMake]
1> [CMake] Add the installation prefix of "V8" to CMAKE_PREFIX_PATH or set "V8_DIR" to
1> [CMake] a directory containing one of the above files. If "V8" provides a separate
1> [CMake] development package or SDK, be sure it has been installed.
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:14 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "C:/Users/vsq_k/source/repos/V8Core_cmake/out/build/x86-Release/CMakeFiles/CMakeOutput.log".
1> “cmd.exe”“/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\vsq_k\source\repos\V8Core_cmake\out\install\x86-Release" -DCMAKE_TOOLCHAIN_FILE="D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\vsq_k\source\repos\V8Core_cmake" 2>&1"”执行失败,出现错误:““cmd.exe”“/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\vsq_k\source\repos\V8Core_cmake\out\install\x86-Release" -DCMAKE_TOOLCHAIN_FILE="D:/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\Users\vsq_k\source\repos\V8Core_cmake" 2>&1"”已返回,并带有退出代码: 1”。
env
msvc v142(vs2019) windows sdk 10.0.19041.0 v8:x86-windows-static(9.0.257.17#1)
not found v8 in find_package
This is a different issue than the one described here, were you able to build v8 for the 86-windows-static triplet? how are you trying to configure your project?
env
msvc v142(vs2019) windows sdk 10.0.19041.0 v8:x86-windows-static(9.0.257.17#1)
not found v8 in find_package
This is a different issue than the one described here, were you able to build v8 for the 86-windows-static triplet? how are you trying to configure your project?
Build v8 normally, but cmake in the project cannot find v8
Build v8 normally, but cmake in the project cannot find v8
Well, are you properly setting CMAKE_TOOLCHAIN_FILE? are you setting cmake compiler architecture properly? are you disabling shared libraries?
it seems to be the case that your project is not finding v8 installed in vcpkg\installed\x86-windows-static as it should be the case. V8Config.cmake should be at vcpkg\installed\x86-windows-static\share\v8
Build v8 normally, but cmake in the project cannot find v8
Well, are you properly setting CMAKE_TOOLCHAIN_FILE? are you setting cmake compiler architecture properly? are you disabling shared libraries?
it seems to be the case that your project is not finding v8 installed in vcpkg\installed\x86-windows-static as it should be the case. V8Config.cmake should be at vcpkg\installed\x86-windows-static\share\v8
The problem of vs. Variables and caches do not take effect. You need to set the command line parameter -DVCPKG_TARGET_TRIPLET=x86-windows-static, but there are new problems, Could NOT find V8 (missing: V8_LIBRARY) (found version "9.0.257.17")
D:\vcpkg\installed\x86-windows-static\lib There are only icu.lib and zlib.lib in the directory of D:\vcpkg\installed\x86-windows-static\lib, but not v8.lib
D:\vcpkg\installed\x86-windows-static\lib There are only icu.lib and zlib.lib in the directory of D:\vcpkg\installed\x86-windows-static\lib, but not v8.lib
That means v8 was not successfully built, if so then build it:
vcpkg --triplet x86-windows-static install v8
if there's errors... well that's a community triplet not officially supported, but it should work AFAIK.
Also having vcpkg on D instead of C might be an issue... or maybe it is not as long as VC itself is not installed on D.
Hi guys, is this issue resolved?
Hi @JackBoosY yes, you can close this issue, I removed all installed versions of the SDK, did a repair install of VC, changed the installed SDK on console panel to add debug tools, ran a build and it worked.
Sorry about the delay, the build taking hours to complete is usually my deterrent 😁.
D:\vcpkg\installed\x86-windows-static\lib There are only icu.lib and zlib.lib in the directory of D:\vcpkg\installed\x86-windows-static\lib, but not v8.lib
That means v8 was not successfully built, if so then build it:
vcpkg --triplet x86-windows-static install v8
if there's errors... well that's a community triplet not officially supported, but it should work AFAIK.
Also having vcpkg on D instead of C might be an issue... or maybe it is not as long as VC itself is not installed on D.
PS C:\Users\vsq_k> vcpkg --triplet x86-windows-static install v8
Computing installation plan...
The following packages are already installed:
v8[core]:x86-windows-static -> 9.0.257.17#1
Package v8:x86-windows-static is already installed
Total elapsed time: 589.5 us
The package v8:x86-windows-static provides CMake targets:
find_package(V8 CONFIG REQUIRED)
target_link_libraries(main PRIVATE V8::V8)
But there are already successfully built libs in this directory D:\vcpkg\buildtrees\v8\x86-windows-static-rel\obj
Why are you running vcpkg at C:\Users\vsq_k instead of D:\vcpkg? Is VCPKG_ROOT set to anything other than D:\vcpkg?
I am sorry, but these issues have more to do with your environment than any problems with the build script itself, I cannot guess at what your full environment is, and without any build error logs I am really running out of ideas here.
The path environment variable is set, and vcpkg integrate install has been executed. There are no other settings. I will recompile and see.
D:\vcpkg\ports\v8\vcpkg.json
{
"name": "v8",
"version-string": "9.0.257.17",
"port-version": 1,
"description": "Google Chrome's JavaScript engine",
"homepage": "https://v8.dev",
"supports": "!(arm | arm64 | uwp | osx)",
"dependencies": [
{
"name": "glib",
"platform": "linux"
},
"icu",
{
"name": "pthread",
"platform": "linux"
},
"zlib"
]
}
Why only linux, not windows
Why only linux, not windows
The Windows port does not require pthread or glib. There is no functionality lost AFAIK.
The cmake project cannot be compiled normally at all, and it still prompts that v8_library is missing
The cmake project cannot be compiled normally at all, and it still prompts that v8_library is missing
I found the problem, vcpkg_install_gn is NOT installing the targets, this seems to be true for any triplet.
Hi @JackBoosY , do you know if this is a known issue at the moment?
I've created an issue to track the problem reported by @36k-wild-monkey .
It's unknown issue.
@heretic13 Is still work for this issue? Does the problem still exist?
For FrankXie05.
Host Environment
OS: Windows 11 21H2 (22000.469), Compiler: VS2022 17.0.5 Fresh install Visual Studio and SDK, installed via Visual Studio Installer.
v8 doesn't compile!
But I did not make the corrections as advised "StarGate One".
@heretic13 Thank you for your reply. I found that you have compiled successfully in your discussion. Can you try it with the previous suggestion? :)
@FrankXie05, Maybe I'll do it later.
Host Environment
To Reproduce Steps to reproduce the behavior: vcpkg.exe install v8:x86-windows-static or vcpkg.exe install v8
Failure logs
Additional context none