mesonbuild / mesonbuild/meson-python

Windows x86_64 Python on an ARM host: Builds fail with architecture mismatch

Open
#776 19 comments 0 reactions 0 assignees View on GitHub
blocked enhancement help wanted
Dominant language
Python
Stars
180
Forks
93
Avg merge
2d 7h
Merged PRs (30d)
18

Description

Windows on ARM provides a transparent emulation layer that allows users to use unmodified x86_64 programs.

When using an installation of a Windows x86_64 Python on a Windows arm64 machine, building packages that use meson-python fails:

```
C:\Users\xuluze>pip install passagemath-cmr[test]==10.6.1rc6
Collecting passagemath-cmr==10.6.1rc6 (from passagemath-cmr[test]==10.6.1rc6)
Using cached passagemath_cmr-10.6.1rc6-cp313-cp313-win_amd64.whl.metadata (7.1 kB)
Collecting cysignals!=1.12.0,>=1.11.2 (from passagemath-cmr==10.6.1rc6->passagemath-cmr[test]==10.6.1rc6)
Using cached cysignals-1.12.3.tar.gz (65 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
+ meson setup C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015 C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015\.mesonpy-amed7qwl -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015\.mesonpy-amed7qwl\meson-python-native-file.ini
The Meson build system
Version: 1.8.2
Source dir: C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015
Build dir: C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015\.mesonpy-amed7qwl
Build type: native build
Project name: cysignals
Project version: undefined
C compiler for the host machine: cl (msvc 19.44.35211 "Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35211 for x64")
C linker for the host machine: link link 14.44.35211.0
C++ compiler for the host machine: cl (msvc 19.44.35211 "Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35211 for x64")
C++ linker for the host machine: link link 14.44.35211.0
Cython compiler for the host machine: cython (cython 3.1.2)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (C:\Users\xuluze\AppData\Local\Programs\Python\Python313\python.exe)
Need python for aarch64, but found x86_64
Run-time dependency python found: NO (tried sysconfig)

..\meson.build:8:12: ERROR: Python dependency not found

A full log can be found at C:\Users\xuluze\AppData\Local\Temp\pip-install-8y8hwiku\cysignals_ee1fee89382c49e69995d7ea4b014015\.mesonpy-amed7qwl\meson-logs\meson-log.txt
```

Reported originally by @xuluze in https://github.com/passagemath/passagemath/issues/1242

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the provided pip install on an x86_64 Python running under Windows ARM64 and inspect the generated meson-python-native-file.ini alongside the meson.build:8:12 dependency check. Trace how host architecture and the Python dependency are detected; done means the package configuration no longer rejects the x86_64 Python because it reports the ARM64 host architecture.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.