Skip to content

Allow use of non-vendored Zenoh if present#908

Merged
JEnoch merged 3 commits into
ros2:rollingfrom
oysstu:feature/non-vendored-zenoh
Feb 18, 2026
Merged

Allow use of non-vendored Zenoh if present#908
JEnoch merged 3 commits into
ros2:rollingfrom
oysstu:feature/non-vendored-zenoh

Conversation

@oysstu
Copy link
Copy Markdown
Contributor

@oysstu oysstu commented Feb 15, 2026

Description

Uses zenoh-c and zenoh-cpp if found by cmake. It's easier to handle distributing and patching of Zenoh on non-standard platforms if the rust build can be handled externally.

Is this user-facing behavior change?

Should not affect any users, unless they are building from source and have installed the libraries to the cmake search path.

Did you use Generative AI?

No

Additional Information

There's also #695 but it seems to have stalled. Would appreciate if this could be considered in the meantime.

Signed-off-by: Øystein Sture <os@skarvtech.com>
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Feb 16, 2026

Pulls: #908
Gist: https://gist.githubusercontent.com/ahcorde/4a89ff63bbd4d0605513a0531b729473/raw/c804702c650470234b0499c77d5d9dd09464593f/ros2.repos
BUILD args: --packages-above-and-dependencies zenoh_cpp_vendor
TEST args: --packages-above zenoh_cpp_vendor
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18209

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Copy Markdown
Contributor

@JEnoch JEnoch left a comment

Choose a reason for hiding this comment

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

I believe using non-vendored Zenoh is useful but should be an option, and possibly not the default behaviour. Imagine a host where a version of zenoh-c is installed for non-ROS applications, but rmw_zenoh requires another version. How to deal with that ?

The commit ids which are set in zenoh_cpp_vendor/CMakeLists.txt are the ones that maintainers ensure rmw_zenoh will work as expected. I think using another version should be made on purpose with an explicit flag.

And it might be useful to log (info or warning) whenever another zenoh-c or zenoh-cpp version than the vendor one is used.

Signed-off-by: Øystein Sture <os@skarvtech.com>
@oysstu
Copy link
Copy Markdown
Contributor Author

oysstu commented Feb 16, 2026

I believe using non-vendored Zenoh is useful but should be an option, and possibly not the default behaviour. Imagine a host where a version of zenoh-c is installed for non-ROS applications, but rmw_zenoh requires another version. How to deal with that ?

The commit ids which are set in zenoh_cpp_vendor/CMakeLists.txt are the ones that maintainers ensure rmw_zenoh will work as expected. I think using another version should be made on purpose with an explicit flag.

And it might be useful to log (info or warning) whenever another zenoh-c or zenoh-cpp version than the vendor one is used.

That seems reasonable, I've updated the PR.

I decided to make it fail if USE_SYSTEM_ZENOH is set and it does not find the system installation instead of falling back on the vendored libraries.

Comment thread zenoh_cpp_vendor/CMakeLists.txt
Copy link
Copy Markdown
Contributor

@JEnoch JEnoch left a comment

Choose a reason for hiding this comment

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

A last comment: could you please also add a note in the README (in "Source Installation") wrt. this new USE_SYSTEM_ZENOH flag.

Signed-off-by: Øystein Sture <os@skarvtech.com>
@JEnoch
Copy link
Copy Markdown
Contributor

JEnoch commented Feb 17, 2026

Pulls: #908
Gist: https://gist.githubusercontent.com/JEnoch/7bba8c32677d4dce5a5f3c6a8b1ca1a1/raw/c804702c650470234b0499c77d5d9dd09464593f/ros2.repos
BUILD args: "--continue-on-error" --packages-above-and-dependencies zenoh_cpp_vendor zenoh_security_tools rmw_zenoh_cpp
TEST args: --packages-above zenoh_cpp_vendor zenoh_security_tools rmw_zenoh_cpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18214

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@JEnoch JEnoch merged commit a8714a2 into ros2:rolling Feb 18, 2026
5 checks passed
@JEnoch
Copy link
Copy Markdown
Contributor

JEnoch commented Feb 18, 2026

https://github.com/Mergifyio backport kilted jazzy humble

@mergify
Copy link
Copy Markdown

mergify Bot commented Feb 18, 2026

backport kilted jazzy humble

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Feb 18, 2026
Signed-off-by: Øystein Sture <os@skarvtech.com>
(cherry picked from commit a8714a2)
mergify Bot pushed a commit that referenced this pull request Feb 18, 2026
Signed-off-by: Øystein Sture <os@skarvtech.com>
(cherry picked from commit a8714a2)
mergify Bot pushed a commit that referenced this pull request Feb 18, 2026
Signed-off-by: Øystein Sture <os@skarvtech.com>
(cherry picked from commit a8714a2)
JEnoch pushed a commit that referenced this pull request Feb 18, 2026
(cherry picked from commit a8714a2)

Signed-off-by: Øystein Sture <os@skarvtech.com>
Co-authored-by: Øystein Sture <oysstu@users.noreply.github.com>
JEnoch pushed a commit that referenced this pull request Feb 18, 2026
(cherry picked from commit a8714a2)

Signed-off-by: Øystein Sture <os@skarvtech.com>
Co-authored-by: Øystein Sture <oysstu@users.noreply.github.com>
ahcorde pushed a commit that referenced this pull request Feb 19, 2026
(cherry picked from commit a8714a2)

Signed-off-by: Øystein Sture <os@skarvtech.com>
Co-authored-by: Øystein Sture <oysstu@users.noreply.github.com>
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