Skip to content

Add native win-arm64 support - #93

Open
baszalmstra wants to merge 4 commits into
conda-forge:mainfrom
baszalmstra:claude/add-win-arm64-support-kyUqx
Open

Add native win-arm64 support#93
baszalmstra wants to merge 4 commits into
conda-forge:mainfrom
baszalmstra:claude/add-win-arm64-support-kyUqx

Conversation

@baszalmstra

@baszalmstra baszalmstra commented Jun 2, 2026

Copy link
Copy Markdown
Member

Builds py-rattler natively on GitHub's windows-11-arm runners. The only recipe change beyond the CI setup is one environment variable that aws-lc-sys needs on that platform.

aws-lc-sys

aws-lc-sys does not build on win-arm64. cl.exe cannot assemble the generated win-aarch64 perlasm, so it skips the files and the link then fails on objects that were never produced:

cl : Command line warning D9024 : unrecognized source file type '...\generated-src/win-aarch64/crypto/.../chacha-armv8.S'
cl : Command line warning D9027 : source file '...' will be ignored
LINK : fatal error LNK1181: cannot open input file '...\out\8243065ad0646c1d-chacha-armv8.o'

aws-lc-sys knows about this and since 0.40.0 (aws/aws-lc-rs#1060) locates clang-cl in the Visual Studio installation by itself. That only happens when CC is unset:

if target_os() == "windows" && target_arch() == "aarch64" && target_env() == "msvc"
    && get_crate_cc().is_none()
{
    if let Some(clang_cl) = find_clang_cl() { set_env_for_target("CC", clang_cl); }

The conda-forge activation sets CC=cl.exe, so the discovery is skipped and we land back on the one compiler that cannot build this target. Setting AWS_LC_SYS_CC_aarch64_pc_windows_msvc=clang-cl.exe takes priority over CC and gets us to the same compiler upstream would have picked. The variable is target-scoped, so it is inert everywhere else. The guard is unchanged in 0.44.0, so bumping the crate does not help.

conda-forge/uv-feedstock#369 and conda-forge/pixi-build-python-feedstock#27 hit the same problem and route around it with AWS_LC_SYS_CMAKE_BUILDER=1, whose cmake builder picks the ClangCL toolset. That works too, but needs a cmake for win-arm64 (conda-forge/cmake-feedstock#267) and there is nothing else in this recipe that wants cmake.

Blocked on

Merged and no longer blocking: conda-forge/conda-smithy#2622, conda-forge/cargo-bundle-licenses-feedstock#29, conda-forge/cargo-auditable-feedstock#11, conda-forge/maturin-feedstock#180, conda-forge/python-abi3-feedstock#11.

Validation

  • conda-smithy lint --conda-forge ., and a second rerender produces no changes.
  • An experimental native job passed with this same clang-cl override, after temporarily provisioning the unavailable tooling from win-64 under emulation. It confirmed that py-rattler compiles, packages, imports and passes its ABI audit natively on win-arm64. Those bootstrap workarounds are intentionally not part of this PR.

@baszalmstra
baszalmstra requested a review from pavelzw as a code owner June 2, 2026 15:44
@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

@pavelzw

pavelzw commented Jun 2, 2026

Copy link
Copy Markdown
Member

won't this have the same issues as conda-forge/rattler-build-feedstock#158 ?

@baszalmstra

Copy link
Copy Markdown
Member Author

We are now using reqwest 0.13 so I hope that will solve the issue

@baszalmstra

Copy link
Copy Markdown
Member Author

Blocked on conda-forge/cross-python-feedstock#95

…a-forge-pinning 2026.07.15.16.57.46

Other tools:
- conda-build 26.5.0
- rattler-build 0.65.1
- rattler-build-conda-compat 1.4.14
@baszalmstra
baszalmstra force-pushed the claude/add-win-arm64-support-kyUqx branch from 2afeaba to eb16872 Compare July 16, 2026 12:31
@baszalmstra baszalmstra changed the title Add win-arm64 support Add native win-arm64 support Jul 16, 2026
@conda-forge-admin

conda-forge-admin commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/recipe.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/recipe.yaml:

  • ℹ️ This recipe builds a Python version-independent (abi3) package but does not run abi3audit in its tests. abi3 extension modules are built once and installed on every later Python, so accidental use of non-abi3 CPython API is only caught at runtime. Consider auditing the built extension modules, as in the abi3 example recipe:
tests:
  - requirements:
      run:
        - abi3audit
    script:
      - if: unix
        then: abi3audit $SP_DIR/mypackage.abi3.so -s -v --assume-minimum-abi3 ${{ python_min }}
        else: abi3audit %SP_DIR%/mypackage.pyd -s -v --assume-minimum-abi3 ${{ python_min }}
  • ℹ️ This recipe handles the site-packages directory manually, either by defining SP_DIR itself or by hardcoding a path such as %PREFIX%\Lib\site-packages. rattler-build now defines $SP_DIR (%SP_DIR% on Windows), so the manual definition can be removed and hardcoded paths replaced with $SP_DIR / %SP_DIR%.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/31332937382. Examine the logs at this URL for more detail.

@jaimergp

jaimergp commented Aug 6, 2026

Copy link
Copy Markdown
Member

cargo failing with:

 │ │   LINK : fatal error LNK1181: cannot open input file '%SRC_DIR%\py-rattler\target\aarch64-pc-windows-msvc\release\build\aws-lc-sys-117afccec554a780\out\8243065ad0646c1d-chacha-armv8.o'
 │ │   --- stderr
 │ │   error occurred in cc-rs: command did not execute successfully (status code exit code: 1181): "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostARM64\\ARM64\\lib.exe" "-out:C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\libaws_lc_0_41_0_crypto.a" "-nologo" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\libaws_lc_0_41_0_crypto.a" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_attrib.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_crl.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_exten.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_name.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_pubkey.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_req.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_sig.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_spki.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_val.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_x509.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\282bd74e55216496-x_x509a.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e6a0bdd2c14b502f-err_data.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\8243065ad0646c1d-chacha-armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\0da7edcab2c95e21-chacha20_poly1305_armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-aesv8-armx.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-aesv8-gcm-armv8-unroll8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-aesv8-gcm-armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-armv8-mont.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-bn-armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-ghash-neon-armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-ghashv8-armx.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-keccak1600-armv8.o" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\target\\aarch64-pc-windows-msvc\\release\\build\\aws-lc-sys-117afccec554a780\\out\\e4e62a10169d0f57-md5-armv8.o"
 │ │ 💥 maturin failed
 │ │   Caused by: Failed to build a native library through cargo
 │ │   Caused by: Cargo build finished with "exit code: 101": `"cargo-auditable-wrapper.bat" "rustc" "--jobs" "1" "--profile" "release" "--features" "native-tls" "--no-default-features" "--target" "aarch64-pc-windows-msvc" "--message-format" "json-render-diagnostics" "-v" "--manifest-path" "C:\\bld\\bld\\rattler-build_py-rattler_1786011991\\work\\py-rattler\\Cargo.toml" "--lib" "--" "-C" "strip=symbols"`

@pavelzw

pavelzw commented Aug 9, 2026

Copy link
Copy Markdown
Member

depends on conda-forge/cmake-feedstock#267

@pavelzw

pavelzw commented Aug 13, 2026

Copy link
Copy Markdown
Member

╰─▶ Cannot solve the request because of: No candidates were found for make

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

Successfully merging this pull request may close these issues.

4 participants