Repository navigation
feat(launcher): build Going Commando on Linux (SteamOS) with a carried compiler - #2
Closed
DrLegitamate wants to merge 2 commits into
Closed
DrLegitamate wants to merge 2 commits into
DrLegitamate wants to merge 2 commits into
Conversation
SteamOS has no Ninja, and its system is read-only: tools/build_port.py stopped with "Ninja was not found". On Linux, when PATH has no Ninja, the build downloads Ninja 1.13.2's official release into ~/.cache/openrac/toolchains/ninja (XDG_CACHE_HOME first), checks the archive and the program against their SHA-256, and puts it first on PATH for CMake and every build it starts. A whole cached copy is used again without the network; a corrupted or half-written one is replaced. Nothing is written beside the program: an AppImage's mount is read-only. A build folder configured from an earlier AppImage mount names a Python, and could name a Ninja, that is gone: it is configured again with the current ones. Windows and macOS are unchanged. Verified on Linux (not SteamOS): unit tests with the network mocked, and a real download, configure and build with no Ninja on PATH, then a second run that reused it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8Mhbo9Ew2tbcLKXC66
SteamOS has no compiler, CMake, Ninja or make, strips its system headers and is read-only, so the Linux installers' build from source (tools/build_game.py) could not work there. The Linux installers now do as the Windows one does: they carry the game built without the disc, a kit, and Zig's Linux program (Clang and lld), and tools/asm_part.py builds the functions still in assembly into a .so on the player's computer. The Linux kit (asm_part.py kit --linux-zig) carries the glibc and Linux headers from Zig's release, compiled for glibc 2.35, so the system's own headers are never read. The part links nothing: the program exports its names (ENABLE_EXPORTS), each one asm_part_exports.def lists is linked in (-u, cmake/Games.cmake), and they are bound when the game loads the part. macOS keeps the build from source. Verified on Linux (Ubuntu, not SteamOS), without a disc: Going Commando built without the disc (headless preset, enhanced rendering off) exports all 2201 names; a Linux kit made with Zig 0.14.1 reads no header outside itself; a part built through asm_part.py's Linux path that refers to every name loads in the game, and one naming a missing function stops with that name; a copy made by bundle_standalone.py builds the kit's check with its own Zig. Not verified: a part from a real disc, play, CI's new steps, the standalone preset, ARM64, SteamOS itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017f7s8Mhbo9Ew2tbcLKXC66
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.
On SteamOS, building Going Commando from the launcher stopped with "Ninja was not found". Ninja was only the first missing tool. A stock Steam Deck has git and none of the build tools (
pacman -Qshows no cmake, clang, gcc, ninja or make). Its system headers are stripped and its root filesystem is read-only. So the Linux installers' build from source (tools/build_game.py) can't work there.Linux part build (the SteamOS fix)
The Linux installers (AppImage, .deb, .rpm) now do what the Windows one has done since OpenRAC#326. They carry three things:
tools/asm_part.pythen builds the functions still in assembly into a.soon the player's computer. Nothing is installed or downloaded and no root is needed.asm_part.py:kit --linux-zigputs the glibc and Linux headers from Zig's release in the kit, compiled for glibc 2.35, so the system's own headers are never read. The part links nothing.cmake/Games.cmake: on Linux the program already exports its names (ENABLE_EXPORTS). Each name inasm_part_exports.defis now also passed to the linker with-u, so its object is always linked in. The names are bound when the game loads the part.bundle_standalone.py: the Windows-only carried-part path now also covers Linux, taking the kit's target fromkit.json. A Linux copy offers the part build instead ofbuild_game.py.launcher.yml: the linux, linux-arm64 and fedora rows buildrac2-ntscwithout the disc, fetch the pinned Zig and check its SHA-256, make and check the kit, and check it again from the assembled copy.Ninja fix (separate commit)
When PATH has no Ninja on Linux,
tools/build_port.pynow downloads Ninja 1.13.2's official release into~/.cache/openrac/toolchains/ninja. Both the archive and the program are checked against pinned SHA-256 values, the download is moved into place atomically, and a valid cached copy is reused. Nothing is written into the AppImage. A build folder configured from an earlier AppImage mount, whose Python or Ninja path has gone, is configured again with the current ones. Windows and macOS are unchanged.Linux installers no longer take this route for Going Commando. It still helps Linux checkouts.
Verified (Ubuntu container, not SteamOS; no disc)
asm_part.py's Linux path that refers to every name loads in the real game. A part naming a missing function stops withundefined symbol: <name>.bundle_standalone.pybuilds the kit's check with its own Zig.Not verified
Generated by Claude Code