Skip to content

Windows: xbtracer supports config-mode protobuf#9633

Closed
thomthehound wants to merge 1 commit into
Xilinx:masterfrom
thomthehound:win-xbtracer-protobuf
Closed

Windows: xbtracer supports config-mode protobuf#9633
thomthehound wants to merge 1 commit into
Xilinx:masterfrom
thomthehound:win-xbtracer-protobuf

Conversation

@thomthehound
Copy link
Copy Markdown
Contributor

@thomthehound thomthehound commented Feb 28, 2026

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

Bug identified while testing PR #9623.

When building xbtracer against static protobuf libraries on Windows, linkage fails due to CMake not reliably picking up the full transitive dependency set required by newer protobuf releases.

Additionally, MSVC emits benign warnings (here treated as errors) from newer protobuf-generated code.

How problem was solved, alternative solutions (if any) and why they were rejected

When available, let protobuf’s own imported CMake target carry its dependencies by using config-mode. Fall back to the existing module-mode shim if necessary.

Slightly broaden the list of MSVC warning suppressions for this (xbtracer_protobuf) target only.

Risks (if any) associated the changes in the commit

Low.

Existing behavior is preserved when protobuf's config package is not present.

What has been tested and how, request additional testing if necessary

Tested by compiling XRT in Windows with xbtracer enabled by adding the protobuf port, as-per instructions in #9623.

No Linux-specific logic was changed, but Linux builds have not been tested.

Signed-off-by: thomthehound <thomthehound@gmail.com>
@xrt-pr-bot
Copy link
Copy Markdown

xrt-pr-bot Bot commented Feb 28, 2026

⚠️ Authorization Failed

@thomthehound is not a repository collaborator.

To proceed:

  • XRT Admins: Add the build label to authorize this PR build
  • OR Add @thomthehound as a repository collaborator

@stsoe stsoe added the build label Mar 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2026

clang-tidy review says "All clean, LGTM! 👍"

@stsoe
Copy link
Copy Markdown
Collaborator

stsoe commented Mar 5, 2026

Hi @thomthehound. I am having trouble with this change. It doesn't work correctly with Yocto. I am refactoring xbtracer CMakeLists.txt to remove the protobuf configuration and instead move it to a shared protobuf.cmake, which after many tries now succeeds with Yocto. I will open a PR for this and if good, we can close this one.

Please review #9646

stsoe added a commit to stsoe/XRT that referenced this pull request Mar 5, 2026
Redo Xilinx#9633 to (1) refactor messy code to find protobuf in
config or module node, (2) work with Yocto builds.

This simplifies xbtracer CMakeLists.txt removing the logic
behind finding protobuf.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
stsoe added a commit to stsoe/XRT that referenced this pull request Mar 5, 2026
Redo Xilinx#9633 to (1) refactor messy code to find protobuf in
config or module node, (2) work with Yocto builds.

This simplifies xbtracer CMakeLists.txt removing the logic
behind finding protobuf.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
@thomthehound
Copy link
Copy Markdown
Contributor Author

Hi @thomthehound. I am having trouble with this change. It doesn't work correctly with Yocto. I am refactoring xbtracer CMakeLists.txt to remove the protobuf configuration and instead move it to a shared protobuf.cmake, which after many tries now succeeds with Yocto. I will open a PR for this and if good, we can close this one.

Please review #9646

I'm sorry about that, Soren. I was trying to be as cautious as I could, but I do not think it is possible for me to test your Yocto system on my end. Thank you for putting your time into this.

The code in #9646 looks like a huge improvement. I tested it out and it works for me, so I'm going to go ahead and close out this PR.

stsoe added a commit that referenced this pull request Mar 6, 2026
Redo #9633 to (1) refactor messy code to find protobuf in
config or module node, (2) work with Yocto builds.

This simplifies xbtracer CMakeLists.txt removing the logic
behind finding protobuf.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants