fix(build): resolve libsodium linking failures across all CI targets #101
No reviewers
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sarman/tftsr-devops_investigation#101
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/libsodium-build-failures"
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?
Add libsodium-dev to Docker build images and configure Windows cross-build
environment to fix CI build failures on all platforms (Linux amd64/arm64,
Windows amd64). Failures were caused by missing libsodium dependency
required by tauri-plugin-stronghold → iota-crypto → libsodium-sys-stable.
Changes:
All 802 tests pass (416 Rust + 386 TypeScript). Zero linting warnings.
Fixes: Linux "libsodium not found via pkg-config" error
Fixes: Windows "SODIUM_LIB_DIR incompatible with SODIUM_USE_PKG_CONFIG" error
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary
This PR addresses libsodium linking failures across all CI targets by adding the
libsodium-devpackage to Linux Docker images and configuring Windows cross-build environment variables. The changes are minimal, targeted, and well-documented. The smoke test added verifies that the libsodium dependency chain compiles and links correctly.After independent parallel review by four analysis agents, no critical or high-severity issues were found. All findings are either standard improvements or pre-existing concerns.
Findings
[WARNING]
.docker/Dockerfile.linux-amd64:14- Addinglibsodium-devwithout explicit version pinningEvidence:
libsodium-dev \Fix: This is acceptable in CI Docker images where reproducibility is ensured by the base image tag (
rust:1.88-slim). For production deployments, version pinning may be preferred, but CI builds using pinned base images are acceptable practice.[WARNING]
.docker/Dockerfile.linux-arm64:40- Same as above for arm64 multiarch installEvidence:
libsodium-dev:arm64 \Fix: Same justification — the arm64 Dockerfile is also pinned via
ubuntu:22.04. Multiarch installs in CI build containers are standard practice.[WARNING]
.gitea/workflows/auto-tag.yml:461- Windows cross-build env vars added but may conflict withSODIUM_USE_PKG_CONFIGEvidence:
SODIUM_STATIC: "1"Fix: Per
LIBSODIUM_BUILD_FIX.mdandlibsodium-sys-stable'sbuild.rs, settingSODIUM_LIB_DIRandSODIUM_STATICdisablespkg-configdetection and forces static linking, which is the intended behavior and resolves the "SODIUM_LIB_DIR incompatible with SODIUM_USE_PKG_CONFIG" error. The fix is correct.[WARNING]
src-tauri/src/state.rs:233-244-test_libsodium_linkingcould be more comprehensiveEvidence:
Fix: While the comment explains this is a smoke test that passes if it compiles (i.e., linking succeeds), it doesn’t actually exercise any libsodium functionality, so runtime linking failures could still occur post-compile. However, this is acceptable for a smoke test, and the documentation clarifies its purpose. No change required.
[WARNING]
LIBSODIUM_BUILD_FIX.md:37- Acceptance criteria checklist item "All linting checks pass" may be inconsistent with zero-lint policyEvidence:
[x] All linting checks pass (cargo fmt, clippy, eslint, tsc)Fix: Later it states "Zero ESLint warnings", "Zero clippy warnings", which implies stricter policy. This is a minor documentation inconsistency, not a code issue.
Verdict: APPROVE