Repository navigation
Conversation
This was referenced Oct 22, 2026
zaniebot
force-pushed
the
zb/relocatable-flag-ii-linker
branch
2 times, most recently
from
October 22, 2026 19:30
58e203b to
94be16f
Compare
zaniebot
force-pushed
the
zb/relocatable-flag-ii-linker
branch
from
October 22, 2026 22:19
94be16f to
72a4350
Compare
zaniebot
changed the base branch from
zb/relocatable-flag-ii
to
zb/relocatable-flag-ii-deleted-libpython
October 22, 2026 22:20
zaniebot
force-pushed
the
zb/relocatable-flag-ii-linker
branch
from
October 22, 2026 22:52
72a4350 to
b444cd7
Compare
zanieb
added this pull request to stack #57
October 22, 2026 22:53
zaniebot
removed this pull request from stack #57
October 22, 2026 22:59
zaniebot
changed the base branch from
zb/relocatable-flag-ii-deleted-libpython
to
zb/relocatable-flag-ii
October 22, 2026 22:59
zaniebot
added this pull request to stack #58
October 22, 2026 22:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PBS rewrites installed binaries to give them relative library paths. Supply those paths during linking under
--enable-relocatable, for installed interpreters,libpython, and standard-library extensions on Linux and non-framework macOS. This moves part of PBS's relocation handling into CPython's build system, as proposed in python#119696 and backported in the downstream draft astral-sh/python-build-standalone#861.On glibc, an installed-layout
DT_RPATHin the build-tree interpreter can select an unrelated siblinglibpythonbeforeRUNSHARED'sLD_LIBRARY_PATH. Link separate installation binaries from the same objects so build-tree programs use their build-time library lookup. Build-tree extensions keep their ordinary link flags. On Linux shared builds,RUNSHAREDincludes the build directory followed by anyLD_LIBRARY_PATHsupplied when runningconfigure, allowing non-system dependency directories to be supplied independently of the installation prefix. Keep installed-layout flags out ofLDSHARED, since third-party extensions can be installed elsewhere.On glibc,
DT_RPATHsupplies paths for indirect dependencies and takes precedence overLD_LIBRARY_PATHwhen the requesting object has noDT_RUNPATH. This supports distributions that prefer their bundled libraries, at the cost of less flexible environment overrides and additional linking. It does not prevent preloading or reuse of libraries already loaded by an embedding application. macOS uses an@rpathinstall name with relative search paths.The experimental mode requires default
binandlibdirectories under a common prefix and rejects framework builds until framework relocation is implemented. Combining it with--enable-boltis an error. The standard library may use a different directory through--with-platlibdir, so extension paths traverse back to the prefix before enteringlib. The added search paths point tolib; dependencies in subdirectories such aslib/tcltkmay need additional search paths. Tcl/Tk script discovery is separate from shared-library lookup. Dependency bundling and rewriting shebangs orsysconfigpaths remain separate concerns.The base branch contains the flag proposed in python#160377 and the independent deleted-library fixture fix proposed in python#160396 for python#160388. Separate installation binaries also require BOLT optimization; #56 adds that support. Alternative: #49 uses
DT_RUNPATHand shares build and installation binaries.