Does not install on Aarch64 (arm64) macOS
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
```
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.14.6-arm64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:5854:2: error: Apple Arm64 ABI requires ffi_prep_cif_var
#error Apple Arm64 ABI requires ffi_prep_cif_var
^
c/_cffi_backend.c:6304:9: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (ffi_prep_closure(closure, &cif_descr->cif,
^
2 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-9she3k6p/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-imoj5bub/install-record.txt --single-version-externally-managed --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --compile --install-headers /private/tmp/pip-build-env-3rzi11hg/overlay/include/python3.8/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Python/3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-3rzi11hg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.0' Check the logs for full command output.
Python 3.8, MacBook Air 2020, M1 processor
```
Contributor guide
Research direction
Start by reproducing the Python 3.8 installation on an Aarch64 macOS system using the pip command and clang output in the issue. Read c/_cffi_backend.c around the ffi_prep_cif_var and ffi_prep_closure errors, then verify that the installation completes successfully on the reported M1 environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100