Open
Description
Describe the bug
In #20765, we discovered that the old psutil==5.9.0
dependency was being built to a wheel incorrectly on Apple Silicon: the native code was ending up as x86-64, rather than arm64. There's two layers to this bug:
- the CI steps attempt to set
ARCHFLAGS='-arch arm64'
but these seemed to stop working in release_2.17.0.dev5...release_2.17.0a0 (seeImportError: ... incompatible architecture
on arm64 macOS for Pants 2.19.2, 2.20.0rc3, 2.21.0.dev5 #20765 (comment) for analysis) - the runner is defaulting to i386/x86-64 shell (etc.) by default, rather than arm64 (a freshly installed self-hosted runner on my M1 laptop runs in arm64 shells by default: see
ImportError: ... incompatible architecture
on arm64 macOS for Pants 2.19.2, 2.20.0rc3, 2.21.0.dev5 #20765 (comment) for analysis)
Fixing 2 is arguably the better fix, as then the runner will be doing the right thing by default. If we fix this via 1, we need to make sure all uses of this runner apply the flags when they build things (this includes in scie-pants).
This can be confirmed by running commands like:
arch
=> outputsi386
, should outputarm64
echo 'int main() { return 0; }' > test.c && clang test.c -o test && file test
(compile some C code) => outputstest: Mach-O 64-bit executable x86_64
, should output... arm64
Pants version
2.17.0a0
OS
arm64 macOS in Ci
Additional info
N/A
Activity