Skip to content

[Nexthop] Distro Image build fixes#986

Open
travisb-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:distro_image_build_fixes
Open

[Nexthop] Distro Image build fixes#986
travisb-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:distro_image_build_fixes

Conversation

@travisb-nexthop
Copy link
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Build fixes needed for Distro Image.

Firstly some additional cmake defines are necessary due to moving to clang.

Secondly, though the sai_build.env values are source'd into the build script shell instance, they must also be exported to be made available to the getdeps invocation.

Failure to do this results in the FBOSS build using a default set of headers for SAI API 1.16.3 instead of whichever version the SAI specifies. However, build-helper.py still configures the build to use the proper SAI library.

This results in mismatched SAI API enum values versus that known to the SAI library; which results in confusing crash errors.

Test Plan

This is copied from the Distro Omnibus PR, which successfully builds an image when including these changes.

Build fixes needed for Distro Image.

Firstly some additional cmake defines are necessary due to moving to
clang.

Secondly, though the sai_build.env values are source'd into the build
script shell instance, they must also be exported to be made available
to the getdeps invocation.

Failure to do this results in the FBOSS build using a default set of
headers for SAI API 1.16.3 instead of whichever version the SAI
specifies. However, build-helper.py still configures the build to use
the proper SAI library.

This results in mismatched SAI API enum values versus that known to the
SAI library; which results in confusing crash errors.

This is copied from the Distro Omnibus PR, which successfully builds
an image when including these changes.
@meta-cla meta-cla bot added the CLA Signed label Mar 6, 2026
@travisb-nexthop travisb-nexthop marked this pull request as ready for review March 7, 2026 00:01
@travisb-nexthop travisb-nexthop requested a review from a team as a code owner March 7, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant