Repository navigation
Conversation
zaniebot
force-pushed
the
zb/relocatable-flag-ii-runpath
branch
from
October 22, 2026 19:30
c1bb264 to
0d5e0a2
Compare
zaniebot
force-pushed
the
zb/relocatable-flag-ii
branch
from
October 22, 2026 22:52
2a74c69 to
c0c48c5
Compare
zaniebot
force-pushed
the
zb/relocatable-flag-ii-runpath
branch
from
October 22, 2026 22:52
0d5e0a2 to
3705bf5
Compare
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 relative paths during linking under
--enable-relocatable, for interpreters,libpython, and standard-library extensions on Linux and non-framework macOS. Keep installed-layout flags out ofLDSHARED, since third-party extensions can be installed elsewhere. Importing build-tree extensions may require additional loader search paths for non-system dependencies.This alternative to #48 uses
DT_RUNPATHon Linux. On glibc,LD_LIBRARY_PATHcan override those paths, so the build tree can select its ownlibpythonwhile sharing binaries with the installation. The ordinary BOLT rules optimize the binaries that will be installed, so this design does not need the additional profile application in #56.DT_RUNPATHis not inherited for indirect dependencies: distributors bundling those dependencies outside the system search paths need suitable paths on the libraries that require them. This trades PBS's inheritedDT_RPATHlookup for environment overrides and fewer link outputs. 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. 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. Related relocation proposal: python#119696; downstream backport draft: astral-sh/python-build-standalone#861.