Repository navigation
Port libs - #355
Merged
Merged
Port libs#355
Conversation
PortMaster/libs.aarch64, libs.armhf and libs.x86_64 hold libraries ports often need that some CFWs don't ship (libtheora, which the love runtime is built against). funcs.txt, which every control.txt sources, exports PM_LIBRARY_PATH and adds it to the end of LD_LIBRARY_PATH: it only fills in what the system lacks, and a port that wants it first can put "$PM_LIBRARY_PATH:" in front itself. aarch64 devices get the armhf folder too, for 32-bit ports. The loader skips libraries of the other architecture, so it works although ports set PORT_32BIT after sourcing control.txt; when it's set before, armhf comes first. An empty LD_LIBRARY_PATH gets no empty entry (which would search the current folder). libs/ stays the runtimes' .squashfs folder. PM_FUNCS_VERSION 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
COPYING (BSD-style) and LICENSE (On2's VP3 patent statement), as they are in xiph/theora at v1.1.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
libtheora 1.1.1, built from Xiph's release tarball with --disable-telemetry: distro builds need libcairo.so.2 for it, which most CFWs lack, so they don't load at all. This one needs only libc.so.6 (GLIBC_2.17), and exports the same symbols as Debian's. The recipe is in BUILDING_STUFF.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
`LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib32` with it empty made it
":/usr/lib32", and an empty entry makes the loader search the current folder
(the port's, for most ports). Both appends use ${LD_LIBRARY_PATH:+...:} now.
test_funcs.py: no shipped shell file appends to LD_LIBRARY_PATH the bare way,
and the guarded form gives no empty entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NxABmR1rUUgi4iicVLZchY
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.
Some ports need common libraries that some CFWs don't ship. The love runtime, for example, is built against libtheoradec. This gives PortMaster one place to keep them, available to every port.
How it works
PortMaster/libs.aarch64,libs.armhfandlibs.x86_64hold the libraries.libs/stays the runtimes'.squashfsfolder.funcs.txt, which everycontrol.txtsources, exportsPM_LIBRARY_PATHand adds it to the end ofLD_LIBRARY_PATH. So it only fills in what the system is missing. A port that wants these libraries first can put"$PM_LIBRARY_PATH:"in front itself.PORT_32BITafter sourcingcontrol.txt. When it's set before, armhf comes first.LD_LIBRARY_PATHdoesn't get an empty entry, which would make the loader search the current folder.PM_FUNCS_VERSIONis now 5.libtheoradec.so.1 (aarch64)
--disable-telemetry. Distro builds, such as Debian'slibtheora0, have telemetry turned on, which needslibcairo.so.2. Most CFWs don't have cairo, so those builds don't load at all.libc.so.6(GLIBC 2.17), and exports the same symbols as Debian's. It's 76 KB stripped.BUILDING_STUFF.md, and the license is inPortMaster/licenses/LICENSE-libtheora.txt(Xiph'sCOPYING, plus On2's VP3 patent statement).Testing
tests/test_funcs.pycoversPM_LIBRARY_PATHand theLD_LIBRARY_PATHordering. The full suite passes merged into currentmain(1,606 tests).2026-10-21_0069on AmberELEC (RG351MP): after sourcingcontrol.txt,PM_LIBRARY_PATHis set, andlibtheoradec.so.1loads by name and reports "Xiph.Org libtheora 1.1 20090822 (Thusnelda)".Also fixed: on JELOS, UnofficialOS and AmberELEC,
control.txtadded:/usr/lib32to an emptyLD_LIBRARY_PATH. The empty entry made the loader search the current folder, which is the port's folder for most ports. Both appends are guarded now, andtest_funcs.pychecks that no shipped shell file appends the unguarded way.