fix(build): preserve runtime symbol versions in the Linux renderer check #267
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!267
Loading…
Reference in a new issue
No description provided.
Delete branch "monsterlag/Longshot:fix/elf-symbol-version-metadata"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A valid Linux renderer can be rejected as having missing host functions when
nmomits its runtime-symbol version annotations. The guard should distinguish those runtime imports from genuinely unresolved strong host symbols.What changed
nx2/build.py,check_vk_symbols(): prefer GNU/LLVMreadelf --dyn-syms --widemetadata, retaining versions and weak binding; preserve the existing optionalnmfallback when metadata is unavailable or unrecognized.tests/test_vk_symbols.py: 14 game-free cases cover both readers, versioned runtime imports, real missing strong imports, weak/defined symbols and tool failures.Flags and settings
None. Symbol-reader discovery is automatic; no player or build switch changes.
Measurements
main:
9c9d69ed09(2026-11-14)this PR: fix/elf-symbol-version-metadata @
fa257ba303Hardware: Ryzen7 9800X3D, 96GiB RAM, Windows11 build26300 / native Python3.14.7; Ubuntu24.04 under WSL, Python3.12.3, GCC13.3, GNU binutils2.42. No GPU used by these checks.
Scene: authored symbol metadata and tiny ELF libraries; no game scene.
Method: focused warm-up, then two sequential interleaved main/PR runs of the same14 native regression methods. Separately, two interleaved main/PR pairs run the exact AST-extracted production guard against real authored ELF files with actual GNU
nm --without-symbol-versions; a transparent PATH wrapper adds that flag, and recorded output matches direct GNU invocations. Report medians below; no speed improvement claimed.How to reproduce: run
python -I -B tests/test_vk_symbols.py; for main, use its production function with the same new test. Build an authored shared library referencing abort/access/acosf/calloc/free and an optional weak host symbol; a second library addsissue246_missing_host. Verify withRTLD_NOW, then run the guard with GNU version suppression. Main and this PR use the same files/tools.9c9d69edfa257ba3Four self-contained files under docs/tested record the native regression runs. The measured source tree was0c4277d5; the final head adds only these records, with the guard and test unchanged. The reporter now identifies
/usr/bin/nm, OpenSUSE GNU binutils2.47.0.20260921-3, and supplies versionless libm definitions. That supports the omission hypothesis, but is not the failing renderer's undefined-import output. This PR verifies an explicit version-suppression condition; it does not reproduce all288 names or claim issue246 resolved.Testing
Tested: native14-case regression and two fresh interleaved comparisons; real GNU tool/ELF comparisons and independent loader agreement; weak-host preservation and deliberate strong-import rejection; GNU/LLVM metadata-layout and optional-fallback fixtures. Full native Windows
python -I -B tests/run_all.py --jobs 8on0c4277d5: 534 passed, 3 failed, 34 skipped in262s. The same three groups fail on untouched main9c9d69ed in fresh focused checks:test_oot_state_tap.py(Windows bridge connection race, issue481),test_tested_configurations.py(authored stream newline assumption, issue482), andtest_walk_key.py(missing stand-in after the Skip-title merge, already claimed by mooki). No assertion was weakened and no skip was added.The final head
fa257ba3adds only run-record data after that suite; repository-fragment validation passes, production/test files are unchanged, andgit diff --checkpasses. Earlier GNU/LLVM-reader evidence remains historical, not an additional current-head run.Not tested: exact reporter OpenSUSE/AppImage renderer or nm selection, a complete Linux renderer/AppImage build, or gameplay (the guard is build-time only). Actual GNU suppression was tested on Ubuntu/WSL, not the reporter's distro. Where readelf is absent/unusable, nm retains its existing versionless-output limitation.
Needs other testers: the OpenSUSE/AppImage environment from issue246: compare the actual linked renderer on main and this guard, verify the reported failure clears and genuinely unresolved strong imports remain rejected (T-ZPWZ; awaiting a maintainer testing-wanted label before others can claim it). This remains validation of the reported issue; the general guard hardening is covered by the authored regression and real ELF checks above.
Screenshots
Nothing on screen.
Risk and rollback
The risk is interpreting a symbol-reader output format incorrectly. Both GNU and LLVM layouts and failure fallbacks are tested; unrecognized output falls back to nm. Revert this commit to restore the previous reader selection. Runtime version exemptions are unchanged.
Reviewer notes
This hardens a reproduced checker precondition. It does not claim the specific OpenSUSE report fixed; diagnostics were requested on the issue. The earlier published measurement branch is retained; this branch was created from newer main without rewriting that history.
Issues
See #246
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
docs/tested/for each new measured run (format indocs/tested-configurations.md; no appended row or assembled view).Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened. The added symbol-reader regression reads the production function; existing source-reader checks also pass.Opened test request T-ZPWZ for the OpenSUSE/AppImage environment. It is waiting for a maintainer testing-wanted label before testers can claim it. The PR remains WIP: the reporter-specific cause is unconfirmed, and the full-suite run and later focused refresh are separately recorded rather than presented as an all-green current-head run.
Merged main9c9d69ed without rewriting history. Fresh native14-case pairs are8failures on main versus0 here; real GNU --without-symbol-versions pairs reject5 false runtime names on main versus0 here while the missing-strong control remains rejected. Current full suite534pass/3main-baseline-fail/34skip is recorded; final commit only adds validated run files. This completes the general guard-hardening evidence; exact OpenSUSE/AppImage issue246 validation remains explicitly unverified in T-ZPWZ, so this is See246, not a fixed-issue claim.
WIP: fix(build): preserve runtime symbol versions in the Linux renderer checkto fix(build): preserve runtime symbol versions in the Linux renderer checkView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.