Skip to content

[CI] Add libnexthopgroup to CI pipeline for swss compilation#1908

Closed
GaladrielZhao wants to merge 1 commit into
sonic-net:masterfrom
GaladrielZhao:fix/add_libnexthopgroup
Closed

[CI] Add libnexthopgroup to CI pipeline for swss compilation#1908
GaladrielZhao wants to merge 1 commit into
sonic-net:masterfrom
GaladrielZhao:fix/add_libnexthopgroup

Conversation

@GaladrielZhao

@GaladrielZhao GaladrielZhao commented May 26, 2026

Copy link
Copy Markdown

Description of PR

Summary:
sonic-swss PR #4394 added -lnexthopgroup to fpmsyncd link dependencies, but only updated swss's own CI pipeline. This causes sairedis CI to fail when compiling swss because libnexthopgroup is missing from the build environment, with the error message:

2026-05-25T05:56:13.7258134Z /usr/bin/ld: cannot find -lnexthopgroup: No such file or directory 

To fix this, let's add libnexthopgroup deb download and installation to:

  • build-swss-template.yml (swss compilation environment)
  • build-docker-sonic-vs-template.yml (VS image build)
  • docker-sonic-vs/Dockerfile (VS image runtime)

Fix:
This PR will fix the CI building.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation update
  • Test improvement

Approach

What is the motivation for this PR?

  • Fixing the CI building.

How did you do it?

  • Add libnexthopgroup deb download and installation to CI pipeline.

How did you verify/test it?

  • Verified the changes match the pattern used in sonic-swss PR #4394
  • Will be validated by CI pipeline of this PR

Any platform specific information?

  • None

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@radha-danda

Copy link
Copy Markdown

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

No Azure DevOps builds found for #1908.

@radha-danda radha-danda reopened this May 26, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@radha-danda

Copy link
Copy Markdown

@kcudnik, Please review the PR. this PR is needed for sairedis CI pipeline

@radha-danda

Copy link
Copy Markdown

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

No Azure DevOps builds found for #1908.

@radha-danda radha-danda reopened this May 26, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@radha-danda

Copy link
Copy Markdown

@GaladrielZhao, Can you please trigger CI pipeline?

kcudnik
kcudnik previously approved these changes May 26, 2026

@kcudnik kcudnik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

how come suddenly this dependency is required ?

@GaladrielZhao
GaladrielZhao force-pushed the fix/add_libnexthopgroup branch from a7c6c90 to 9d8a4ed Compare May 27, 2026 01:53
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@GaladrielZhao

Copy link
Copy Markdown
Author

how come suddenly this dependency is required ?

Hi @kcudnik , thanks for your review.

We are implementing the RIB/FIB feature for SONiC. The libnexthopgroup library is a foundational component of this feature — it provides the encoding/decoding layer for NextHopGroup objects between FRR and fpmsyncd.
It was merged first because other parts of the implementation depend on it. Since fpmsyncd depends on this library, sonic-swss PR #4394 added the -lnexthopgroup link dependency to swss.

You can find more details in RIB/FIB HLD.

@GaladrielZhao

Copy link
Copy Markdown
Author

@kcudnik Also, could you help trigger the CI pipeline for this PR? We've tried reopening the PR and rebasing the commit, but neither worked. Thanks!

@lolyu

lolyu commented May 27, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@lolyu

lolyu commented May 27, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

@lolyu lolyu closed this May 27, 2026
@lolyu lolyu reopened this May 27, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines failed to run 1 pipeline(s).

runVersion: 'latestFromBranch'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
path: $(Build.ArtifactStagingDirectory)/download
patterns: '**/target/debs/${{ parameters.debian_version }}/libnexthopgroup_*.deb'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line breaks the pr checker:

/.azure-pipelines/build-docker-sonic-vs-template.yml (Line: 71, Col: 17): Key not found 'debian_version'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the feedback. Fixed — replaced ${{ parameters.debian_version }} with * since the template doesn't define that parameter.

sonic-swss PR #4394 added -lnexthopgroup to fpmsyncd link
dependencies, but only updated swss's own CI pipeline. This causes
sairedis CI to fail when compiling swss because libnexthopgroup
is missing from the build environment.

Add libnexthopgroup deb download and installation to:
- build-swss-template.yml (swss compilation environment)
- build-docker-sonic-vs-template.yml (VS image build)
- docker-sonic-vs/Dockerfile (VS image runtime)

Signed-off-by: Yuqing Zhao <galadriel.zyq@alibaba-inc.com>
@GaladrielZhao
GaladrielZhao dismissed stale reviews from eddieruan-alibaba and kcudnik via a39ed25 May 27, 2026 07:26
@GaladrielZhao
GaladrielZhao force-pushed the fix/add_libnexthopgroup branch from 9d8a4ed to a39ed25 Compare May 27, 2026 07:26
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik

kcudnik commented May 27, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@GaladrielZhao

Copy link
Copy Markdown
Author

Hi @lolyu , the BuildTrixie arm64 job in this PR keeps failing with rsyslogd permission errors even after several reruns, which seem unrelated to my changes. Could you please help take a look?

@eddieruan-alibaba

eddieruan-alibaba commented May 27, 2026

Copy link
Copy Markdown

Need someone to check why it fails at here.

  • sudo rsyslogd
    rsyslogd: error during config processing: omfile: chown for file '/var/log/auth.log' failed: Operation not permitted [v8.2504.0 try https://www.rsyslog.com/e/2207 ]
  • cat /etc/apt/sources.list
    cat: /etc/apt/sources.list: Permission denied

##[error]Bash exited with code '1'.

@saiarcot895 can you help to check why Trixie build fails here.

@lolyu

lolyu commented May 28, 2026

Copy link
Copy Markdown
Contributor

PR #1911 is to fix the build permission issue.

@eddieruan-alibaba

Copy link
Copy Markdown

PR #1911 is to fix the build permission issue.

Would they be in a dead lock situation? Neither PR would be able to pass the sanity now. Should we combine two PR?

@lolyu

lolyu commented May 28, 2026

Copy link
Copy Markdown
Contributor

PR #1911 is to fix the build permission issue.

Would they be in a dead lock situation? Neither PR would be able to pass the sanity now. Should we combine two PR?

Those two will be force merged if the build from this dummy PR that combines those two fixes is passing:

#1914

Looks promising for now :D

@lolyu

lolyu commented May 28, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@GaladrielZhao

Copy link
Copy Markdown
Author

Closing this PR as it has been included in PR#1916 to avoid circular dependency. Thanks!

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.

6 participants