Skip to content

Update Ninja to 1.12.1.#39260

Closed
BillyONeal wants to merge 2 commits intomicrosoft:masterfrom
BillyONeal:ninja-1-12
Closed

Update Ninja to 1.12.1.#39260
BillyONeal wants to merge 2 commits intomicrosoft:masterfrom
BillyONeal:ninja-1-12

Conversation

@BillyONeal
Copy link
Copy Markdown
Member

Fixes #38494

Resurrects #38538

Fixes microsoft#38494

Resurrects microsoft#38538

Co-authored-by: xb284524239 <40262910+xb284524239@users.noreply.github.com>
@BillyONeal BillyONeal added info:internal category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Jun 13, 2024
Also fix vcpkgTools.xml
@BillyONeal BillyONeal changed the title Update Ninja to 1.12. Update Ninja to 1.12.1. Jun 13, 2024
@LilyWangLL LilyWangLL self-assigned this Jun 13, 2024
Copy link
Copy Markdown
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build_arch thing may come from vcpkg_configure_meson. But meson uses a different terminology.
Cf. git grep 'ARM|arm'.

else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if((build_arch MATCHES "^(ARM|arm)64$") OR (build_arch MATCHES "^(ARM|arm)$"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use arm64 binaries on ^(ARM|arm)$?
(This regex is used a few times with VCPKG_TARGET_ARCHITECTURE but never for the host.)

Comment on lines +5 to +10
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(build_arch $ENV{PROCESSOR_ARCHITEW6432})
else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if((build_arch MATCHES "^(ARM|arm)64$") OR (build_arch MATCHES "^(ARM|arm)$"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(build_arch $ENV{PROCESSOR_ARCHITEW6432})
else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if((build_arch MATCHES "^(ARM|arm)64$") OR (build_arch MATCHES "^(ARM|arm)$"))
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432})
else()
set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE})
endif()
if(HOST_ARCH MATCHES "^(ARM|arm)64$")

"host" is the term used in vcpkg. HOST_ARCH is the variable used for the other platforms here. Non-64 arm is not a relevant host arch for windows

@dg0yt
Copy link
Copy Markdown
Contributor

dg0yt commented Jun 13, 2024

I was surprised to see new android errors. Now I checked the fine print. The errors are related to module support in CMake since 3.28. Module support is enabled under some conditions. For Ninja generators, it needs at least Ninja 1.11. This is what is changed by this PR.

The immediate mitigation might be adding -DCMAKE_CXX_SCAN_FOR_MODULES=OFF to the affected modules.

https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html

@BillyONeal BillyONeal marked this pull request as draft June 17, 2024 19:20
@RayKoopa
Copy link
Copy Markdown

What's the status on this? Currently having issues with Ninja 1.10 hitting the 260 character path length limit on Windows when trying to build the gRPC port, and Ninja 1.12 would fix this.

@bowenxuuu
Copy link
Copy Markdown
Contributor

What's the status on this? Currently having issues with Ninja 1.10 hitting the 260 character path length limit on Windows when trying to build the gRPC port, and Ninja 1.12 would fix this.

@RayKoopa

Hello, first you can manually download ninja-1.12.1 from https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip, then copy the ninja.exe to the %VCPKG_ROOT%/downloads/tools/ninja/1.10.2-windows/ folder. Finally, add this folder to the system environment variable PATH.

With this, you should be able to use ninja version 1.12.1 in vcpkg.

@dg0yt dg0yt mentioned this pull request Jan 9, 2025
@BillyONeal BillyONeal closed this Jan 17, 2025
@BillyONeal BillyONeal deleted the ninja-1-12 branch January 17, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vcpkg-tool-<ninja>] update to <1.12.0>

5 participants