Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for correct Windows SDK version when building ANGLE and DAWN #63

Open
bvisness opened this issue Mar 30, 2024 · 2 comments
Open

Comments

@bvisness
Copy link
Collaborator

Running the new orcadev build-angle from the webgpu-canvas branch gives me the following error on Windows.

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
>orcadev build-angle
Building Angle...
  * checking depot tools
  * checking angle
HEAD is now at 8a8c8fc28 Roll chromium_revision ad19957265..e506ce09ba (1165395:1165897)
Updating depot_tools...
created .gclient
Updating depot_tools...
Syncing projects: 100% (53/53), done.
Running hooks: 100% (20/20), done.                 
  * preparing build
Traceback (most recent call last):
  File "C:\Users\bvisn\Developer\handmade\orca\build\angle\build\toolchain\win\setup_toolchain.py", line 316, in <module>
    main()
  File "C:\Users\bvisn\Developer\handmade\orca\build\angle\build\toolchain\win\setup_toolchain.py", line 274, in main
    env = _LoadToolchainEnv(cpu, toolchain_root, win_sdk_path, target_store)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bvisn\Developer\handmade\orca\build\angle\build\toolchain\win\setup_toolchain.py", line 190, in _LoadToolchainEnv
    return _ExtractImportantEnvironment(variables)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bvisn\Developer\handmade\orca\build\angle\build\toolchain\win\setup_toolchain.py", line 68, in _ExtractImportantEnvironment
    raise Exception(
Exception: Path "C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" from environment variable "include" does not exist. Make sure the necessary SDK is installed.
ERROR at //build/toolchain/win/win_toolchain_data.gni:9:7: Script returned non-zero exit code.
      exec_script("//build/toolchain/win/setup_toolchain.py",
      ^----------
Current dir: C:/Users/bvisn/Developer/handmade/orca/build/angle/out/Debug/
Command: C:/Users/bvisn/Developer/handmade/orca/build/depot_tools/bootstrap-2@3_11_6_chromium_30_bin/python3/bin/python3.exe C:/Users/bvisn/Developer/handmade/orca/build/angle/build/toolchain/win/setup_toolchain.py "C:\Program Files/Microsoft Visual Studio/2022/Community" "C:\Program Files (x86)\Windows Kits\10" "C:\Windows\System32;C:\Windows\SysWOW64;Arm64Unused" win x86 environment.x86
Returned 1.
See //build/toolchain/win/toolchain.gni:14:1: whence it was imported.
import("//build/toolchain/win/win_toolchain_data.gni")
^----------------------------------------------------
See //build/toolchain/win/BUILD.gn:6:1: whence it was imported.
import("//build/toolchain/win/toolchain.gni")
^-------------------------------------------
See //BUILD.gn:348:3: which caused the file to be included.
  copy("copy_compiler_dll") {
  ^--------------------------

Task failed with 1 error:
ERROR: The following command failed with code 1:
gn gen out/Debug --args=angle_build_all=false angle_build_tests=false is_debug=true is_component_build=false angle_enable_d3d9=false angle_enable_gl=false angle_enable_vulkan=false angle_enable_null=false angle_has_frame_capture=false        

@martinfouilleul
Copy link
Collaborator

Do you have the windows 10 sdk, and which version?
We should look at how they choose which SDK version to use, and detect here beforehand to display a better error if it doesn't exist.

@martinfouilleul
Copy link
Collaborator

the required Windows SDK version is located in vs_toolchain.py in the Angle repo.

@martinfouilleul martinfouilleul changed the title Issue building ANGLE on Windows Check for correct Windows SDK version when building ANGLE and DAWN Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants