Title: Resolve newer Linux os functions at runtime instead of compiling them out against old glibc · Issue #153400 · python/cpython · GitHub
Open Graph Title: Resolve newer Linux os functions at runtime instead of compiling them out against old glibc · Issue #153400 · python/cpython
X Title: Resolve newer Linux os functions at runtime instead of compiling them out against old glibc · Issue #153400 · python/cpython
Description: os gates functions like copy_file_range on an AC_CHECK_FUNCS probe at configure time and drops them entirely when the build libc lacks the symbol. Redistributable builds pay for this: python-build-standalone targets glibc 2.17 for portab...
Open Graph Description: os gates functions like copy_file_range on an AC_CHECK_FUNCS probe at configure time and drops them entirely when the build libc lacks the symbol. Redistributable builds pay for this: python-build-...
X Description: os gates functions like copy_file_range on an AC_CHECK_FUNCS probe at configure time and drops them entirely when the build libc lacks the symbol. Redistributable builds pay for this: python-build-...
Opengraph URL: https://github.com/python/cpython/issues/153400
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resolve newer Linux os functions at runtime instead of compiling them out against old glibc","articleBody":"`os` gates functions like `copy_file_range` on an `AC_CHECK_FUNCS` probe at configure time and drops them entirely when the build libc lacks the symbol. Redistributable builds pay for this: python-build-standalone targets glibc 2.17 for portability, so every `os` function whose glibc wrapper is newer than 2.17 is gone for good, even when the interpreter later runs on a newer glibc or a kernel that implements the syscall.\n\nAffected functions, with the glibc version that added the wrapper:\n\n- `os.copy_file_range`, `os.memfd_create` (2.27)\n- `os.pidfd_open`, `os.pidfd_getfd` (2.36)\n\n`pidfd_open` and `pidfd_getfd` already sidestep it by calling the raw syscall directly.\n\nOn Linux we could resolve these at load time instead: `dlsym` the symbol once from a constructor, fall back to the raw syscall when the running libc doesn't have it, and keep the existing `HAVE_*` path everywhere else. Only functions above the 2.17 baseline need it. Same idea as #125022, but for libc symbols instead of SIMD.\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-153398\n* gh-154816\n* gh-155518\n* gh-155520\n* gh-155762\n* gh-159043\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/daandemeyer","@type":"Person","name":"daandemeyer"},"datePublished":"2026-07-09T08:18:11Z","url":"https://github.com/python/cpython/issues/153400"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7163507-0387-d580-1f19-5cd754fb97be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE1E:ADA9D:3CEC1EB:4E17175:6B020374 |
| html-safe-nonce | dbbb9e43791abec38b6013727af1ad9199a2c7058228d58edf667b26ef5e8b9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTFFOkFEQTlEOjNDRUMxRUI6NEUxNzE3NTo2QjAyMDM3NCIsInZpc2l0b3JfaWQiOiIyNzYyMjA1ODUxOTY3MTYxMjA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ed3e6ce3c143e8e001df537ee7d613f78bb27ac99c0f2a4856b3a8a6e6156a81 |
| hovercard-subject-tag | issue:4844523514 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/153400/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7345e72dc42776b681333f80e6812f7343a67e67c914b80cb460f6db5ab62441/python/cpython/issues/153400 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7345e72dc42776b681333f80e6812f7343a67e67c914b80cb460f6db5ab62441/python/cpython/issues/153400 |
| og:image:alt | os gates functions like copy_file_range on an AC_CHECK_FUNCS probe at configure time and drops them entirely when the build libc lacks the symbol. Redistributable builds pay for this: python-build-... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daandemeyer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width