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

fix(cross-compile): Fix download of arm64 CMake binaries #372

Merged

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Jun 7, 2023

No description provided.

@jcfr
Copy link
Contributor Author

jcfr commented Jun 7, 2023

The logic for selecting the relevant CMake binary to download is the following:

if(WIN32)
set(binary_archive "win32_binary")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ARM64" OR "$ENV{SETUPTOOLS_EXT_SUFFIX}" MATCHES arm64)
set(binary_achive "winarm64_binary")
else()
set(binary_archive "win64_binary")
endif()
endif()
endif()
check_archive_var("${binary_archive}")

After instrumenting it to display the associated value in the context of windows-2022 / ARM64 build, here are the values

    ---------------------------------------
    CMAKE_SIZEOF_VOID_P [8]
    CMAKE_SYSTEM_PROCESSOR [AMD64]
    ENV{SETUPTOOLS_EXT_SUFFIX} [.cp39-win_arm64.pyd]
    ---------------------------------------

@jcfr
Copy link
Contributor Author

jcfr commented Jun 7, 2023

Issue is a typo in the variable name !

-       set(binary_achive "winarm64_binary")
+       set(binary_archive "winarm64_binary")

@jcfr
Copy link
Contributor Author

jcfr commented Jun 7, 2023

Expected wheel is now downloaded:

image

@jcfr jcfr force-pushed the fix-windows-arm64-cmake-binary-download branch from 2101884 to 7851025 Compare June 7, 2023 19:33
This commit fixes a regression introduced in 6674721 (feat: cross-compile
to Windows ARM (scikit-build#326)).

It ensures the arm64 CMake binary package is downloaded when building
the corresponding CMake Windows arm64 wheels.

Co-authored-by: Henry Schreiner <[email protected]>
@jcfr jcfr force-pushed the fix-windows-arm64-cmake-binary-download branch from 7851025 to 8cf5807 Compare June 7, 2023 19:34
@jcfr jcfr changed the title wip: Debug issue related to arm64 windows wheel fix(cross-compile): Fix download of arm64 CMake binaries Jun 7, 2023
@jcfr jcfr linked an issue Jun 7, 2023 that may be closed by this pull request
@jcfr jcfr enabled auto-merge (squash) June 7, 2023 19:36
@jcfr jcfr disabled auto-merge June 7, 2023 19:36
@jcfr jcfr enabled auto-merge (rebase) June 7, 2023 19:37
@jcfr jcfr merged commit ee82fde into scikit-build:master Jun 7, 2023
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.

CMake version 3.26.4 is unavailable in pip
1 participant