Skip to content

Fix CodeQL cpp build failure by linking libyang#342

Draft
Copilot wants to merge 1 commit into
masterfrom
copilot/fix-codeql-failure
Draft

Fix CodeQL cpp build failure by linking libyang#342
Copilot wants to merge 1 commit into
masterfrom
copilot/fix-codeql-failure

Conversation

Copilot AI commented Jun 3, 2026

Copy link
Copy Markdown

Description of PR

Summary:
Resolve the failing CodeQL / Analyze (cpp) job caused by a link-time dependency gap after swsscommon moved to libyang.so.3.
This PR adds libyang to the link set used for linkmgrd binaries.

Type of change

  • Bug fix
  • New feature
  • Doc/Design
  • Unit test

Approach

What is the motivation for this PR?

The CodeQL C++ workflow fails during the build phase (before analysis) with undefined ly_* symbols from libswsscommon.so, indicating libyang is required but not linked by this repo.

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

How did you do it?

  • Root-cause fix
    • Updated linker libraries in objects.mk to include -lyang in LIBS.
  • Scope
    • Single-file, minimal build-system change; no source logic changes.
LIBS := \
    -lswsscommon \
    -lyang \
    -lboost_date_time \

How did you verify/test it?

Confirmed the generated release-targets linker command now contains -lyang, which addresses the missing libyang.so.3 symbols seen in the failing job logs.

Any platform specific information?

Targets the Ubuntu GitHub Actions environment used by CodeQL where swsscommon links against libyang.so.3.

Documentation

No documentation update required (build/link dependency correction only).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

Copilot AI changed the title [WIP] Fix failing GitHub Actions job CodeQL / Analyze (cpp) Fix CodeQL cpp build failure by linking libyang Jun 3, 2026
Copilot AI requested a review from vaibhavhd June 3, 2026 03:28
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.

3 participants