You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cothread builds but fails at runtime on MacOS Arm64 platforms #68
Cothread claims to have support for arm64 architecture, denoted by the switch-arm64.c file. However, as noted in the last commit made, it does not actually work at runtime. During testing of p4p on the new GitHub OsX runners, which are all now arm64, we see a Bus Error:
/Users/runner/work/_temp/28281c48-3576-478b-b140-78e8b699ad51.sh: line 9: 3925 Bus error: 10 python -m nose2 -v p4p
In an ideal world we should fix the ARM64 code to allow use on modern MacOS systems. An alternative is to explicitly fail a compilation on a MacOS ARM platform (but leave it working for e.g. Rasberry Pi, which is the platform this code was originally written for).
Testing either of these fixes should be straightforward by using GitHub's macos-latest runner.
changed the title [-]Cothread builds but fails on MacOS Arm64 platforms[/-][+]Cothread builds but fails at runtime on MacOS Arm64 platforms[/+]on Aug 8, 2024
However, following this, the import fails (runtime failure). If instead:
pip3.11 install --force cothread -> the following:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cothread
Failed to build cothread
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cothread)
It seems to complain as following on some (ld) illegal text-relocation in 'action_entry'+0x14 (../cothread_9b3efff422134250bc70b91cfdda0b17/build/temp.macosx-14.0-arm64-cpython-311/context/switch.o) to 'action_entry'
Illegal text-relocations: text-relocation in 'action_entry'+0x14 (/private/var/folders/h9/35fh42mx3j77_2wsj653qw9r0000gn/T/pip-install-1gmsm1jy/cothread_6d5b85dca67f4251b33315afafec68d7/build/temp.macosx-15.0-arm64-cpython-313/context/switch.o) to 'action_entry' ld: Found illegal text-relocations clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command '/usr/bin/clang' failed with exit code 1 [end of output]
Activity
[-]Cothread builds but fails on MacOS Arm64 platforms[/-][+]Cothread builds but fails at runtime on MacOS Arm64 platforms[/+]benjaminbolling commentedon Jan 7, 2025
cothread does not build on my MacOS Arm64.
However, following this, the import fails (runtime failure). If instead:
It seems to complain as following on some (ld) illegal text-relocation in 'action_entry'+0x14 (../cothread_9b3efff422134250bc70b91cfdda0b17/build/temp.macosx-14.0-arm64-cpython-311/context/switch.o) to 'action_entry'
graeme-winter commentedon Sep 14, 2025
+1 does not build on macOS / arm64
performing
pip3 install cothreadon Python 3.13.7graeme-winter commentedon Sep 14, 2025
Potentially resolved in #76
Change ARM code to use position independent code
Change ARM code to use position independent code