Repository navigation
Conversation
compile_recovery() printed cargo:rustc-link-lib for curl, archive, crypto and udev before link_native() added the static t1_platform_native archive. rustc keeps that order on the linker command line, so with a linker that defaults to --as-needed (Debian and Ubuntu toolchains) the shared libraries are dropped before anything references them and the t1-platform lib test fails to link with undefined archive_*/curl_* references. The release binaries link fine without this change. Emit the four libraries from link_native(), after the archive, under the same CARGO_FEATURE_ONLINE_RECOVERY condition. Tested on Ubuntu 26.04 (rustc 1.93.1, GNU ld 2.46): with this change cargo test --workspace --all-targets --all-features links everywhere; in a clean offline Debian package build (t1-release excluded) all 1046 tests pass. target/release/t1bridge still NEEDs libcurl, libarchive, libcrypto, liblzma and libudev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
compile_recovery()printscargo:rustc-link-libfor curl, archive, cryptoand udev before
link_native()adds the statict1_platform_nativearchive.rustc keeps that order on the linker command line. With a linker that defaults
to
--as-needed(Debian and Ubuntu toolchains), the shared libraries aredropped before anything references them, and the
t1-platformlib test thenfails to link with undefined
archive_*/curl_*references. (The releasebinaries link fine without this change; only the test target failed.)
This change emits the four libraries from
link_native(), after the archive,under the same
CARGO_FEATURE_ONLINE_RECOVERYcondition. Nothing changes ontoolchains without
--as-needed.Testing
cargo test --locked --workspace --all-targets --all-features --no-fail-fastnow links everywhere.t1-releaseexcluded), all1046 tests pass.
t1-releasetests need the Arch repository tools;readelf -d target/release/t1bridgestill lists libcurl, libarchive,libcrypto, liblzma and libudev.
make quality(no rustfmt or clippy on that machine). Thechange is a move of four lines inside
build.rs.🤖 Generated with Claude Code