Skip to content

Use portable half-float conversions on GNU/Linux - #1373

Draft
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:fix-linux-float16-libgcc
Draft

zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:fix-linux-float16-libgcc

Conversation

@zaniebot

Copy link
Copy Markdown
Contributor

The Python 3.16.0a1 GNU/Linux builds require GCC_12.0.0 symbols from libgcc_s on x86-64 and GCC_11.0 symbols on AArch64, preventing startup on systems whose runtimes lack them. CPython's native _Float16 conversions introduce these dependencies. Set ac_cv_float16_supported=no for GNU/Linux builds of Python 3.16 and newer to use CPython's portable half-float implementation.

@zaniebot
zaniebot force-pushed the fix-linux-float16-libgcc branch from a6165c2 to 885ef60 Compare October 21, 2026 18:59
@jjhelmus

Copy link
Copy Markdown
Contributor

A better solution to including these is to avoid the GCC installation that comes in the LLVM bundle and use the sysroot, adding --gcc-install-dir=/usr/x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/4.9 or similar to the build flags should take care of this.

Otherwise we need to watch for all new instances where newer symbols are used.

@jjhelmus

Copy link
Copy Markdown
Contributor

#1391 address this by statically linking the required symbols. Using the fall-back function comes with a performance cost.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants