cool-easter-32542
04/14/2024, 11:50 PMpsutil==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:
1. 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 (see #20765 (comment) for analysis)
2. 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 #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 => outputs i386, should output arm64
• echo 'int main() { return 0; }' > test.c && clang test.c -o test && file test (compile some C code) => outputs test: Mach-O 64-bit executable x86_64, should output ... arm64
Pants version
2.17.0a0
OS
arm64 macOS in Ci
Additional info
N/A
pantsbuild/pants