Title: Building a C extension on Big Sur and SDK v10.15 fails
Type: behavior Stage:
Components: Distutils, macOS Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: dstufft, eric.araujo, ned.deily, philthompson10, ronaldoussoren
Priority: normal Keywords:

Created on 2021-06-23 00:52 by philthompson10, last changed 2021-09-09 20:19 by ned.deily.

Messages (3)
msg396377 - (view) Author: Phil Thompson (philthompson10) Date: 2021-06-23 00:52
I am running macOS v11 (Big Sur) and using Xcode v12.1 (because this is the latest that includes SDK v10.15 rather than v11) to build a C extension. I'm using the older SDK because of 3rd party libraries that are not tested against the newer SDK.

This version of Xcode/SDK does not support universal2 binaries. However because _supports_arm64_builds() in _osx_support only tests the macOS version and not the SDK version it returns True which means that distutils does not call compiler_fixup() to remove the '-arch arm64'. The compilation then fails.

Should this work, or does Python v3.10 require SDK v11?
msg396388 - (view) Author: Phil Thompson (philthompson10) Date: 2021-06-23 08:46
Another aspect of this is when building a Python v3.10 C extension on macOS v10.15 (Catalina) with SDK 10.15, the wheel has the 'universal2' platform tag when it actually only contains an x86_64 implementation.
msg401473 - (view) Author: Phil Thompson (philthompson10) Date: 2021-09-09 13:19
Is this likely to be fixed for v3.10? At the very least a wheel should have the correct platform tag.
Date User Action Args
2021-09-09 20:19:46ned.deilysetassignee: ned.deily
2021-09-09 13:19:27philthompson10setmessages: + msg401473
2021-06-29 04:25:58ned.deilysetnosy: + ronaldoussoren, ned.deily
components: + macOS
2021-06-23 08:46:44philthompson10setmessages: + msg396388
2021-06-23 00:52:48philthompson10create