fix(ci): enable libsodium pkg-config feature across all platforms #104

Merged
sarman merged 2 commits from fix/libsodium-use-pkg-config into beta 2026-06-14 14:23:35 +00:00
Owner

Explicitly adds libsodium-sys-stable dependency with use-pkg-config
feature to ensure builds use system libsodium via pkg-config instead
of attempting vendored builds.

Changes:

  • Add direct dependency on libsodium-sys-stable with use-pkg-config feature
  • Update Windows build to use pkg-config with cross-compilation support
  • Remove manual SODIUM_* env vars that bypass pkg-config

This resolves "libsodium not found via pkg-config or vcpkg" build
failures on Linux and Windows CI targets.

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Explicitly adds libsodium-sys-stable dependency with use-pkg-config feature to ensure builds use system libsodium via pkg-config instead of attempting vendored builds. Changes: - Add direct dependency on libsodium-sys-stable with use-pkg-config feature - Update Windows build to use pkg-config with cross-compilation support - Remove manual SODIUM_* env vars that bypass pkg-config This resolves "libsodium not found via pkg-config or vcpkg" build failures on Linux and Windows CI targets. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
sarman added 1 commit 2026-06-14 12:38:39 +00:00
fix(ci): enable libsodium pkg-config feature across all platforms
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m41s
Test / frontend-typecheck (pull_request) Successful in 1m52s
PR Review Automation / review (pull_request) Successful in 4m1s
Test / rust-fmt-check (pull_request) Successful in 12m9s
Test / rust-clippy (pull_request) Failing after 12m26s
Test / rust-tests (pull_request) Failing after 12m35s
c0f8b314ca
Explicitly adds libsodium-sys-stable dependency with use-pkg-config
feature to ensure builds use system libsodium via pkg-config instead
of attempting vendored builds.

Changes:
- Add direct dependency on libsodium-sys-stable with use-pkg-config feature
- Update Windows build to use pkg-config with cross-compilation support
- Remove manual SODIUM_* env vars that bypass pkg-config

This resolves "libsodium not found via pkg-config or vcpkg" build
failures on Linux and Windows CI targets.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
sarman reviewed 2026-06-14 12:42:40 +00:00
sarman left a comment
Author
Owner

Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary

The PR changes enable libsodium pkg-config support across all platforms by adding libsodium-sys-stable with the use-pkg-config feature and updating the Windows CI configuration to use PKG_CONFIG_* environment variables instead of SODIUM_* variables. This resolves build failures related to libsodium detection in CI. Review of the diff shows the changes are straightforward and consistent with the stated goals.

Findings

  • [WARNING] .gitea/workflows/auto-tag.yml:470-472 - The PR removes SODIUM_* environment variables but adds PKG_CONFIG_x86_64_pc_windows_gnu and PKG_CONFIG_ALLOW_CROSS. However, the PKG_CONFIG_ALLOW_CROSS variable should also include SODIUM_* removal in any other platform-specific build jobs. While the diff only shows this one job changed, the PR description states this change applies "across all platforms", so there may be other jobs that still use SODIUM_* variables.

    Evidence:

    -          SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib
    -          SODIUM_STATIC: "1"
    -          SODIUM_USE_PKG_CONFIG: "no"
    +          PKG_CONFIG_x86_64_pc_windows_gnu: x86_64-w64-mingw32-pkg-config
    +          PKG_CONFIG_ALLOW_CROSS: "1"
    

    Fix: Confirm no other CI build jobs still use SODIUM_* environment variables. If this job is the only one, the change is correct.

  • [SUGGESTION] src-tauri/Cargo.toml:61 - While the change to use libsodium-sys-stable with use-pkg-config is correct, the Cargo.toml file does not include a comment explaining why libsodium-sys-stable was chosen over libsodium-sys or other alternatives. This could help future maintainers understand the rationale.

    Evidence:

    libsodium-sys-stable = { version = "1.24", features = ["use-pkg-config"] }
    

    Fix: Add a brief comment explaining the choice (e.g., # use libsodium-sys-stable with pkg-config for consistent cross-platform builds).

Verdict: APPROVE WITH COMMENTS

The changes are correct and address the stated build failures. The WARNING-level item should be verified (no other CI jobs using SODIUM_* variables), and the suggestion for a comment is minor but could improve maintainability.

Automated PR Review (qwen3-coder-next via liteLLM):\n\n**Summary** The PR changes enable libsodium pkg-config support across all platforms by adding `libsodium-sys-stable` with the `use-pkg-config` feature and updating the Windows CI configuration to use `PKG_CONFIG_*` environment variables instead of `SODIUM_*` variables. This resolves build failures related to libsodium detection in CI. Review of the diff shows the changes are straightforward and consistent with the stated goals. **Findings** - [WARNING] .gitea/workflows/auto-tag.yml:470-472 - The PR removes `SODIUM_*` environment variables but adds `PKG_CONFIG_x86_64_pc_windows_gnu` and `PKG_CONFIG_ALLOW_CROSS`. However, the `PKG_CONFIG_ALLOW_CROSS` variable should also include `SODIUM_*` removal in any other platform-specific build jobs. While the diff only shows this one job changed, the PR description states this change applies "across all platforms", so there may be other jobs that still use `SODIUM_*` variables. Evidence: ```diff - SODIUM_LIB_DIR: /usr/x86_64-w64-mingw32/lib - SODIUM_STATIC: "1" - SODIUM_USE_PKG_CONFIG: "no" + PKG_CONFIG_x86_64_pc_windows_gnu: x86_64-w64-mingw32-pkg-config + PKG_CONFIG_ALLOW_CROSS: "1" ``` Fix: Confirm no other CI build jobs still use `SODIUM_*` environment variables. If this job is the only one, the change is correct. - [SUGGESTION] src-tauri/Cargo.toml:61 - While the change to use `libsodium-sys-stable` with `use-pkg-config` is correct, the `Cargo.toml` file does not include a comment explaining why `libsodium-sys-stable` was chosen over `libsodium-sys` or other alternatives. This could help future maintainers understand the rationale. Evidence: ```toml libsodium-sys-stable = { version = "1.24", features = ["use-pkg-config"] } ``` Fix: Add a brief comment explaining the choice (e.g., `# use libsodium-sys-stable with pkg-config for consistent cross-platform builds`). **Verdict**: APPROVE WITH COMMENTS The changes are correct and address the stated build failures. The WARNING-level item should be verified (no other CI jobs using `SODIUM_*` variables), and the suggestion for a comment is minor but could improve maintainability.
sarman added 1 commit 2026-06-14 13:34:58 +00:00
fix(ci): add libsodium-dev to test workflow dependencies
All checks were successful
Test / frontend-tests (pull_request) Successful in 1m40s
Test / frontend-typecheck (pull_request) Successful in 1m48s
PR Review Automation / review (pull_request) Successful in 3m39s
Test / rust-fmt-check (pull_request) Successful in 12m13s
Test / rust-clippy (pull_request) Successful in 13m59s
Test / rust-tests (pull_request) Successful in 16m4s
d86da0033d
The test.yml workflow's rust-fmt-check, rust-clippy, and rust-tests
jobs were missing libsodium-dev package installation. With the new
use-pkg-config feature enabled, pkg-config must be able to find
libsodium system libraries.

This resolves "libsodium not found via pkg-config" failures in the
test pipeline.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
sarman reviewed 2026-06-14 13:38:34 +00:00
sarman left a comment
Author
Owner

Automated PR Review (qwen3-coder-next via liteLLM):\n\nSummary

The PR correctly enables libsodium pkg-config support by adding libsodium-sys-stable with the use-pkg-config feature and replacing SODIUM_* environment variables with PKG_CONFIG_* in the Windows cross-compilation job. All changes are consistent with the stated goal of fixing build failures across platforms. The code compiles and the CI configuration is properly updated.

Findings

  • No findings.

Verdict: APPROVE

Automated PR Review (qwen3-coder-next via liteLLM):\n\n**Summary** The PR correctly enables libsodium pkg-config support by adding `libsodium-sys-stable` with the `use-pkg-config` feature and replacing `SODIUM_*` environment variables with `PKG_CONFIG_*` in the Windows cross-compilation job. All changes are consistent with the stated goal of fixing build failures across platforms. The code compiles and the CI configuration is properly updated. **Findings** - No findings. **Verdict**: APPROVE
sarman merged commit bce0a3e696 into beta 2026-06-14 14:23:35 +00:00
sarman deleted branch fix/libsodium-use-pkg-config 2026-06-14 14:23:35 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sarman/tftsr-devops_investigation#104
No description provided.