Skip to content

build: build on RHEL 8 (GCC 8, glibc 2.28) and fix the rosdoc2 doc warnings - #893

Open
bburda wants to merge 2 commits into
mainfrom
fix/gcc8-and-doc-warnings
Open

bburda wants to merge 2 commits into
mainfrom
fix/gcc8-and-doc-warnings

Conversation

@bburda

@bburda bburda commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

This fixes two things the ROS buildfarm shows for ros2_medkit.

Humble on RHEL 8 builds with GCC 8.5 and glibc 2.28, and ros2_medkit does not build there:

  • GCC 8 keeps std::filesystem in a separate libstdc++fs, so fault_manager, the gateway and linux_introspection fail to link. gateway_core and fault_manager_core link stdc++fs for GCC before 9.1, and medkit_linux_utils uses the new medkit_link_std_filesystem() helper from ros2_medkit_cmake.
  • EPEL ships httplibConfig.cmake for cpp-httplib 0.12. Our version check had only an upper bound, so 0.12 passed and the gateway failed to compile against it. A version before 0.14 now falls back to the vendored copy, in ROS2MedkitCompat and in gateway_core.cmake.
  • GCC 8 deletes the default constructor of std::atomic<std::chrono::steady_clock::time_point>. The member in GatewayNode now starts from an explicit value.
  • -Winfinite-recursion exists since GCC 12, so the pragma that ignores it is now guarded.

The host check in scripts/check_cores_without_ros/hosts now fails at configure time when gateway_core picks the wrong httplib target. Before, a wrong pick only failed the build when the system had no httplib.h. New cases cover 0.12 and both ends of the supported range, 0.14.0 and 0.19.9.

The doc jobs on docs.ros.org are unstable because rosdoc2 reports warnings and errors for most packages, 448 of them for the gateway. The Humble job uses older tools (Sphinx 8.1, MyST 4, Doxygen 1.9.1) than Jazzy and Lyrical, so each fix below works with both:

  • README links to other packages or to docs/ are relative and do not resolve on docs.ros.org. They now point to the published docs or to GitHub.
  • Code blocks marked json that are not valid JSON are now marked text.
  • Exhale documents a nested type on its own page and again on the page of the enclosing class, and Sphinx reports each as a duplicate declaration. doc/conf.py in the packages with C++ API pages drops that warning with a logging filter, because Sphinx before 8.2 gives it no type for suppress_warnings. It also keeps the class and file tree views unminified: docutils dropped the gateway class hierarchy because the minified view is one line longer than its line limit. And it sets myst_heading_anchors, so links to a heading of the same README resolve with MyST 4.
  • rosdoc2.yaml in the gateway keeps symbols out of Doxygen that Breathe and Sphinx cannot render: GCC attributes, the variable template specializations of the DTO traits, and field_enum. kLinksDescription keeps its page; @hideinitializer hides the string literals that Sphinx cannot parse. In ros2_medkit_integration_tests it keeps out write_literal and skips the Python API page, because the Python package holds test helpers only.
  • pre-commit check-yaml now accepts the two YAML documents that rosdoc2.yaml needs.

The installation guide named GCC 11 and GCC 13 as the minimum. It now names GCC 8. The gateway README states the httplib range the code accepts.


Issue

No issue.


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

  • AlmaLinux 8 with Humble from the ROS RPM repo (GCC 8.5, glibc 2.28), colcon build of the released packages with tests: main fails on ros2_medkit_fault_manager, this branch builds all of them. AggregationManagerDiscoveredPlace.* passes there. Without the stdc++fs link in gateway_core or in medkit_linux_utils, the build fails again.
  • scripts/check_cores_without_ros as in CI (ubuntu:20.04, g++-9), with the hosts. With the 0.14 lower bound removed, the 0.12 host case fails at configure time. With 0.14.0 dropped from the range, or with every versioned target ignored, the in-range cases fail.
  • rosdoc2 from git, installed as the doc jobs install it, on every package, with the Humble tools (jammy: Sphinx 8.1.3, MyST 4.0.1, Doxygen 1.9.1) and with the Jazzy tools (Sphinx 9.2, Doxygen 1.15): no warnings or errors in the released packages. ros2_medkit_opcua keeps one warning with the Humble tools, which main has too: Doxygen 1.9.1 cannot parse the std::function member of PollerConfig. opcua is not released, so it has no doc job. The gateway docs lose only the pages that failed to render.
  • Jazzy: build, the full tests of every touched package, the linters, and clang-tidy on the changed files.

To check the docs of one package: rosdoc2 build --package-path src/ros2_medkit_gateway.


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

docs.ros.org builds each package with rosdoc2, and every warning or
error marks the doc job unstable.

- README links that leave the package now point to the published
  documentation or to GitHub, so they resolve on docs.ros.org.
- Code blocks that are not valid JSON are marked as text.
- doc/conf.py drops the duplicate declarations of nested types (Exhale
  documents them on their own page and on the page of the enclosing
  class) with a logging filter, because Sphinx before 8.2, used by the
  Humble doc job, gives this warning no type. It keeps the class and
  file tree views unminified, so docutils does not drop them, and sets
  myst_heading_anchors, so links to a heading of the same README
  resolve with MyST 4.
- rosdoc2.yaml for the gateway keeps GCC attributes, variable template
  specializations of the DTO traits and field_enum out of the Doxygen
  output; Breathe and Sphinx cannot render them. kLinksDescription
  hides its initializer, which Sphinx cannot parse.
- rosdoc2.yaml for the integration tests keeps write_literal out of the
  Doxygen output and skips the Python API page: the Python package holds
  test helpers only.
- pre-commit check-yaml accepts the two YAML documents that
  rosdoc2.yaml needs.
Humble on RHEL 8 builds with GCC 8.5 and glibc 2.28.

- Link stdc++fs for GCC before 9.1 in gateway_core, fault_manager_core
  and medkit_linux_utils, through the new medkit_link_std_filesystem()
  helper where ros2_medkit_cmake is available.
- Ignore a CMake-config cpp-httplib older than 0.14 (EPEL ships 0.12)
  and use the vendored copy instead, in ROS2MedkitCompat and in
  gateway_core.
- Give the atomic time_point member of GatewayNode an explicit value:
  GCC 8 deletes the default constructor of std::atomic<time_point>.
- Ignore -Winfinite-recursion only on GCC 12 and newer.
- The host check of gateway_core now fails at configure time when the
  core picks the wrong httplib, also on a system that has httplib.h.
  New cases cover 0.12 and both ends of the range, 0.14.0 and 0.19.9.
- The installation guide now names GCC 8 as the minimum, and the
  gateway README the httplib range the code accepts.

This branch has not been deployed

No deployments
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.

1 participant