Skip to content

Fix local build failures: libnl3 test propagation and Rust lockfile#20

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1770923258-fix-local-build-issues
Open

Fix local build failures: libnl3 test propagation and Rust lockfile#20
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1770923258-fix-local-build-issues

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Feb 12, 2026

Why I did it

Two issues were discovered when attempting a local SONiC VS image build:

  1. libnl3 test failures in containerized builds: The native (non-cross) build path in src/libnl3/Makefile did not explicitly forward the DEB_BUILD_OPTIONS environment variable to dpkg-buildpackage. While env vars should propagate by default, this makes the forwarding explicit (matching the cross-build path which already passes -Pcross,nocheck). The libnl3 test suite (tests/check-all) attempts to create network interfaces via netlink, which fails in nested Docker environments with error -10 (NLE_OBJ_NOTFOUND).

  2. Rust dependency version drift: The cargo install --path . command in sonic-supervisord-utilities-rs/Makefile re-resolves dependencies from crates.io, ignoring Cargo.lock. This pulled time@0.3.47 which requires rustc 1.88.0, but the sonic-slave container ships rustc 1.86.0.

Work item tracking
  • Microsoft ADO (number only): N/A

How I did it

  1. libnl3: Added explicit DEB_BUILD_OPTIONS="$$DEB_BUILD_OPTIONS" prefix to the dpkg-buildpackage call in the native build path, ensuring nocheck is respected when BUILD_SKIP_TEST=y.

  2. sonic-supervisord-utilities-rs: Added --locked flag to cargo install to force use of Cargo.lock, preventing dependency re-resolution.

How to verify it

make PLATFORM=vs BUILD_SKIP_TEST=y configure
make PLATFORM=vs BUILD_SKIP_TEST=y target/docker-sonic-vs.gz

The build should progress past both libnl3 and sonic-supervisord-utilities-rs without failures.

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

  • Not fully tested (full build takes 2-4 hours)

Description for the changelog

Fix local build failures by forwarding DEB_BUILD_OPTIONS to libnl3 dpkg-buildpackage and adding --locked to cargo install for sonic-supervisord-utilities-rs

Human Review Checklist

  • Verify the libnl3 DEB_BUILD_OPTIONS forwarding is actually necessary (env vars should propagate by default - this may be redundant)
  • Confirm --locked is appropriate for cargo install in the Debian package build context
  • Check if other Rust packages in the repo have similar cargo install patterns that need the same fix

Link to config_db schema for YANG module changes

N/A


Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/9043b312451b437c96397725e0b27047
Requested by: @arthurkkp-cog


Open with Devin

- libnl3: Forward DEB_BUILD_OPTIONS to dpkg-buildpackage in native build
  path so that nocheck is respected when BUILD_SKIP_TEST=y, fixing test
  failures in containerized build environments where netlink interface
  creation is unavailable

- sonic-supervisord-utilities-rs: Add --locked flag to cargo install to
  force use of Cargo.lock, preventing dependency re-resolution that pulls
  newer crate versions incompatible with the installed rustc version

Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant