Title: PEP-739 build-details generation is incorrect when cross-building · Issue #136267 · python/cpython · GitHub
Open Graph Title: PEP-739 build-details generation is incorrect when cross-building · Issue #136267 · python/cpython
X Title: PEP-739 build-details generation is incorrect when cross-building · Issue #136267 · python/cpython
Description: Bug report Bug description: When doing cross-builds, the PEP-739 build-details.json gets generated using inconsistent data, some of which based on the build python, and some from the target platform python. See for example the following ...
Open Graph Description: Bug report Bug description: When doing cross-builds, the PEP-739 build-details.json gets generated using inconsistent data, some of which based on the build python, and some from the target platfor...
X Description: Bug report Bug description: When doing cross-builds, the PEP-739 build-details.json gets generated using inconsistent data, some of which based on the build python, and some from the target platfor...
Opengraph URL: https://github.com/python/cpython/issues/136267
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PEP-739 build-details generation is incorrect when cross-building","articleBody":"# Bug report\n\n### Bug description:\n\nWhen doing cross-builds, the PEP-739 `build-details.json` gets generated using inconsistent data, some of which based on the build python, and some from the target platform python.\n\nSee for example the following gist:\nhttps://gist.github.com/itamaro/8f23ebec2e142fd7480241b76c16c4e0\n\nThe gist contains the `build-details.json` generated for a 3.15 GIL-disabled build, using a 3.15 GIL-enabled build as the build-python.\n\n## Concretely:\n\n```sh\ncd ~/pybuild/python/main-default\n./configure --with-pydebug\nmake -j\n\ncd ~/pybuild/python/main-nogil\n./configure --with-pydebug --disable-gil\nmake -j\n\n# now use the GIL-enabled python to regenerate build-details.json for the nogil build\n_PYTHON_PROJECT_BASE=. _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_td_darwin_darwin _PYTHON_SYSCONFIGDATA_PATH=build/lib.macosx-14.5-arm64-3.15 ~/pybuild/python/main-default/python.exe -E Tools/build/generate-build-details.py /tmp/build-details.json\n```\n\n## Some examples from the gist:\n\nIncorrect - `abi.flags` is `[\"d\"]` instead of `[\"t\", \"d\"]`:\n\n```json\n \"abi\": {\n \"flags\": [\n \"d\"\n ]\n },\n```\n\nCorrect - `libpython.static` has the correct SOABI, including `t`:\n\n```json\n \"libpython\": {\n \"static\": \"/usr/local/lib/libpython3.15td.a\"\n },\n```\n\nIncorrect - `suffixes.extensions` includes extensions for the GIL-enabled ABI:\n\n```json\n \"extensions\": [\n \".cpython-315d-darwin.so\",\n \".cpython-315-darwin.so\",\n \".abi3.so\",\n \".so\"\n ]\n```\n\n## Notes\n\nI used a \"cross-build\" on the same MacOS host here, with GIL enabled vs GIL disabled, because it was the easiest for a full end-to-end repro on a single machine.\nThe issue is more general though, as I originally observed it when generating `build-info.json` files for a MacOS-target runtime (both GIL enabled and disabled) using a Linux-GIL-enabled build-python. That setup is more involved, but the mixing is also more apparent, with some fields using \"darwin\" and other fields using \"linux-gnu-x86_64\" as the multiarch string.\n\n### CPython versions tested on:\n\nCPython main branch, 3.15, 3.14\n\n### Operating systems tested on:\n\nmacOS, Linux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-161529\n* gh-161532\n* gh-162239\n* gh-162240\n* gh-162301\n* gh-162302\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/itamaro","@type":"Person","name":"itamaro"},"datePublished":"2025-07-04T04:09:45Z","url":"https://github.com/python/cpython/issues/136267"}
| 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:94294d83-b4fe-bdf5-1f15-8c244aff7bf0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEE4:399E4B:3421263:4532007:6B01EED9 |
| html-safe-nonce | 5ef13b630dc657be471b0059bb79fafe8f5621595d67e03e76da9591f4df4cb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUU0OjM5OUU0QjozNDIxMjYzOjQ1MzIwMDc6NkIwMUVFRDkiLCJ2aXNpdG9yX2lkIjoiNjE5MTI5NzA5ODE2NDU5NjQ0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 38cbed343f08cdd46faf256d5b21424660ad33bc43ff0eda9bea4ea894767e05 |
| hovercard-subject-tag | issue:3201245669 |
| 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/136267/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6493060e6ccfcce5249cf242de8c5365d752e91a6d31b87126b69d19c0be149d/python/cpython/issues/136267 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6493060e6ccfcce5249cf242de8c5365d752e91a6d31b87126b69d19c0be149d/python/cpython/issues/136267 |
| og:image:alt | Bug report Bug description: When doing cross-builds, the PEP-739 build-details.json gets generated using inconsistent data, some of which based on the build python, and some from the target platfor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | itamaro |
| 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