fix(build): remove SODIUM_USE_PKG_CONFIG from .cargo/config.toml [env] block #114
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#114
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/cargo-config-sodium"
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?
Root cause (finally found)
src-tauri/.cargo/config.tomlhadSODIUM_USE_PKG_CONFIG = "0"in its[env]block. Cargo injects[env]entries directly into each build script's environment at exec time — completely invisible to shellunsetorenv -u, which only operate on the parent process environment.The value
"0"still makesenv::var("SODIUM_USE_PKG_CONFIG").is_ok()returntrue(it checks presence, not value). Combined withSODIUM_LIB_DIRset in the workflow, thelibsodium-sys-stablebuild script always hit the incompatibility panic.This is why every workflow-level fix (
unset,env -u, different env var approaches) had zero effect — the variable was being re-injected by Cargo itself after exec.Fix
Remove
SODIUM_USE_PKG_CONFIG = "0"from the[env]block insrc-tauri/.cargo/config.toml. The original comment claiming it "avoids memset_explicit on Windows" was incorrect — that variable controls detection strategy, not link behaviour. The actual Windows sodium handling is viaSODIUM_LIB_DIRin the workflow.SODIUM_STATIC = "1"is retained as it controls static linking (correct for distribution).