SIP Wheel Builds on AAarch64 Broken
Thomas Watson
twatson52 at icloud.com
Sun Aug 14 20:37:03 BST 2022
> On Aug 7, 2022, at 4:39 PM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>
> On 07/08/2022 16:34, Thomas Watson wrote:
>> On Aug 7, 2022, at 4:36 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
>>> The minimum_glibc_version should determine what tag is used. PyQt-builder sets this to v2.17 for PyQt5. 'manylinux1' suggests that the version is set to something less than v2.5 or not set at all.
>>> What is the version set to?
>> I verified on my aarch64 machine that the minimum_glibc_version ends
>> up set to v2.5. I see on line 116 of "pyqtbuild/builder.py" in the
>> PyQt-builder-1.13.0 sdist the clause that I believe intends to set the
>> default minimum_glibc_version for PyQt5 to v2.17 like you say it
>> should be. However, by this time, project.minimum_glibc_version is
>> already set to v2.5.
>> I did some digging and found that line 468 of "sipbuild/project.py" in
>> the sip-6.6.2 sdist sets the minimum_glibc_version to v2.5, so perhaps
>> that is where PyQt-builder is getting it? The official release wheels
>> ( https://pypi.org/project/PyQt5/#files ) are uploaded with the
>> manylinux1 tag as well, so this is not a problem unique to my setup.
>> It looks like there might be two bugs:
>> 1. PyQt5's minimum glibc version is not set correctly
>> 2. For projects whose minimum glibc version is 2.5 or lower, which
>> PyQt5 currently is declared as, the wheel name is not generated
>> correctly on non-x86 platforms
>
> Just 1. Hopefully fixed in the next snapshot.
>
> Phil
Hi again,
It turns out there is a very similar issue for macOS AArch64 machines as well. PyQt-builder determines the minimum macOS SDK version to be 10.13 when building PyQt5.15. SIP then glues together the CPU architecture from the platform tag 'macosx-11.0-arm64' with the specified minimum macOS version to arrive at a wheel name of 'PyQt5-5.15.7-cp37-abi3-macosx_10_13_arm64.whl'. But pip rejects this; the Apple AArch64 CPUs are not supported before macOS 11 so the tag makes no sense. The only valid CPU architecture is 'universal2'. 'cp37-abi3-macosx_11_0_arm64' is the appropriate tag and once SIP is patched to generate that, everything builds and works fine.
It is possible to query pip for a list of tags a particular system is compatible with by running `pip debug --verbose`. On my macOS 12.5 system with the AArch64 processor and Python 3.10.5 and pip 22.1.2, this produces the following list: https://pastebin.com/AL5TxNJd <https://pastebin.com/AL5TxNJd>
Could SIP more intelligently determine the wheel name using this list? The ad-hoc logic currently present seems a bit brittle. I wonder if there is a third instance of this problem remaining with the Windows ARM machines too. I don't have access to one of those to check unfortunately.
Thanks for your time,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220814/5d6c5252/attachment.htm>
More information about the PyQt
mailing list