From 32e64f16f74cdb26c5ca0446d3d7d94ec259d802 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 19 Oct 2026 09:18:28 +1000 Subject: [PATCH 1/4] Add canopen (Linux) [skip ci] Ports RoboStack/ros-jazzy#167: lely_core_libraries installs the lely-core autotools build into the prefix from its own build directory (refreshed for 0.3.4; humble's 0.2.13 keeps the original patch). The glibc 2.28 the PR needed is already the pinning. Co-authored-by: Marc Bestmann <11520148+SammyRamone@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 --- .../patch/ros2-lely-core-libraries.patch | 55 +++++++++++++++++++ shared/patch/ros2-lely-core-libraries.patch | 55 +++++++++++++++++++ shared/vinca.yaml | 1 + 3 files changed, 111 insertions(+) create mode 100644 distros/humble/patch/ros2-lely-core-libraries.patch create mode 100644 shared/patch/ros2-lely-core-libraries.patch diff --git a/distros/humble/patch/ros2-lely-core-libraries.patch b/distros/humble/patch/ros2-lely-core-libraries.patch new file mode 100644 index 00000000..04af9ee5 --- /dev/null +++ b/distros/humble/patch/ros2-lely-core-libraries.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 29506fe4..6fbfc480 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,8 +8,8 @@ include(ExternalProject) + ExternalProject_Add(upstr_lely_core_libraries # Name for custom target + #--Download step-------------- + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/upstream +- INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" # Installation prefix +- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/build ++ INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lely_install" # Installation prefix ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/lely + GIT_REPOSITORY https://gitlab.com/lely_industries/lely-core.git + GIT_TAG fb735b79cab5f0cdda45bc5087414d405ef8f3ab + TIMEOUT 60 +@@ -21,13 +21,13 @@ ExternalProject_Add(upstr_lely_core_libraries # Name for custom target + CONFIGURE_COMMAND autoreconf -i + COMMAND /configure --prefix= --disable-cython --disable-doc --disable-tests --disable-static --disable-diag + #BUILD STEP execute make +- BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_BINARY_DIR}/build ++ BUILD_COMMAND make -j + #INSTALL STEP do nothing as we install in main +- INSTALL_COMMAND "" ++ INSTALL_COMMAND make install VERBOSE=1 + ) + + #INSTALL lely_core_libraries - execute make install +-install(CODE "execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} install VERBOSE=1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build)") ++#install(CODE "execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} install VERBOSE=1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build)") + + set(lely_core_cmake_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + include("cmake/lely_core_libraries-extras.cmake" NO_POLICY_SCOPE) +@@ -46,6 +46,22 @@ install( + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ + USE_SOURCE_PERMISSIONS) + ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/bin/ ++ USE_SOURCE_PERMISSIONS ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/include/lely/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lely ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/lib/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++) ++ + ament_export_include_directories(include) + ament_export_libraries(lely-can lely-co lely-coapp lely-ev lely-io2 lely-libc lely-tap lely-util) + ament_package( diff --git a/shared/patch/ros2-lely-core-libraries.patch b/shared/patch/ros2-lely-core-libraries.patch new file mode 100644 index 00000000..6c82f7dd --- /dev/null +++ b/shared/patch/ros2-lely-core-libraries.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2af8ddb..330cd95 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,8 +8,8 @@ include(ExternalProject) + ExternalProject_Add(upstr_lely_core_libraries # Name for custom target + #--Download step-------------- + SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/upstream +- INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" # Installation prefix +- BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/build ++ INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lely_install" # Installation prefix ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/lely + GIT_REPOSITORY https://gitlab.com/lely_industries/lely-core.git + GIT_TAG 9e3267d26018f6f6babd50786f6ae2af89cc57ea + TIMEOUT 60 +@@ -22,13 +22,13 @@ ExternalProject_Add(upstr_lely_core_libraries # Name for custom target + CONFIGURE_COMMAND autoreconf -i + COMMAND /configure --prefix= --disable-cython --disable-doc --disable-tests --disable-static --disable-diag + #BUILD STEP execute make +- BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_BINARY_DIR}/build ++ BUILD_COMMAND make -j + #INSTALL STEP do nothing as we install in main +- INSTALL_COMMAND "" ++ INSTALL_COMMAND make install VERBOSE=1 + ) + + #INSTALL lely_core_libraries - execute make install +-install(CODE "execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} install VERBOSE=1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build)") ++#install(CODE "execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} install VERBOSE=1 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build)") + + set(lely_core_cmake_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + include("cmake/lely_core_libraries-extras.cmake" NO_POLICY_SCOPE) +@@ -47,6 +47,22 @@ install( + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ + USE_SOURCE_PERMISSIONS) + ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/bin/ ++ USE_SOURCE_PERMISSIONS ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/include/lely/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lely ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lely_install/lib/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++) ++ + ament_export_include_directories(include) + ament_export_libraries(lely-can lely-co lely-coapp lely-ev lely-io2 lely-libc lely-tap lely-util) + ament_package( diff --git a/shared/vinca.yaml b/shared/vinca.yaml index c93bc085..1592aae9 100644 --- a/shared/vinca.yaml +++ b/shared/vinca.yaml @@ -397,6 +397,7 @@ packages_select_by_deps: - avt_vimba_camera # ships some Linux .so in the repo, so it only supports linux - camera_ros # Depends on libcamera that is only available on linux; Depends on libcamera, only available on linux - can_dbc_parser + - canopen # macOS/Windows not tried yet; requested in https://github.com/RoboStack/ros-jazzy/pull/167 - easynav - easynav_bonxai_maps_manager - easynav_common From c16d8b652b2249c7beed66a0f49540793216af5b Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 19 Oct 2026 18:05:16 +1000 Subject: [PATCH 2/4] humble: lely_core_libraries with GCC 15 [skip ci] humble's lely_core_libraries 0.2.13 builds an older lely commit (fb735b79), and GCC 15 rejects it: C23, its default, removed ATOMIC_VAR_INIT (spscring.h), and the new -Wunterminated-string-initialization fires in print.c, which lely's -Werror makes fatal. Configure lely with -std=gnu17 and that warning not an error. jazzy, lyrical and rolling (0.3.4) build a newer lely that the shared patch covers. humble's own patch shadows the shared one, so the fix goes there. Co-Authored-By: Claude Opus 5.5 --- .../humble/patch/ros2-lely-core-libraries.patch | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/distros/humble/patch/ros2-lely-core-libraries.patch b/distros/humble/patch/ros2-lely-core-libraries.patch index 04af9ee5..f2fd9802 100644 --- a/distros/humble/patch/ros2-lely-core-libraries.patch +++ b/distros/humble/patch/ros2-lely-core-libraries.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 29506fe4..6fbfc480 100644 +index 29506fe..ae05873 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ include(ExternalProject) @@ -13,9 +13,15 @@ index 29506fe4..6fbfc480 100644 GIT_REPOSITORY https://gitlab.com/lely_industries/lely-core.git GIT_TAG fb735b79cab5f0cdda45bc5087414d405ef8f3ab TIMEOUT 60 -@@ -21,13 +21,13 @@ ExternalProject_Add(upstr_lely_core_libraries # Name for custom target +@@ -19,15 +19,18 @@ ExternalProject_Add(upstr_lely_core_libraries # Name for custom target + COMMAND git apply --whitespace=fix --reject ${CMAKE_CURRENT_SOURCE_DIR}/patches/0001-Fix-dcf-tools.patch + #CONFIGURE step execute autoreconf and configure CONFIGURE_COMMAND autoreconf -i - COMMAND /configure --prefix= --disable-cython --disable-doc --disable-tests --disable-static --disable-diag +- COMMAND /configure --prefix= --disable-cython --disable-doc --disable-tests --disable-static --disable-diag ++ # this lely commit predates GCC 15: C23 (GCC 15's default) removed ATOMIC_VAR_INIT, and ++ # -Wunterminated-string-initialization is new (lely builds with -Werror) ++ COMMAND ${CMAKE_COMMAND} -E env "CFLAGS=$ENV{CFLAGS} -std=gnu17 -Wno-error=unterminated-string-initialization" ++ /configure --prefix= --disable-cython --disable-doc --disable-tests --disable-static --disable-diag #BUILD STEP execute make - BUILD_COMMAND $(MAKE) -C ${CMAKE_CURRENT_BINARY_DIR}/build + BUILD_COMMAND make -j @@ -30,7 +36,7 @@ index 29506fe4..6fbfc480 100644 set(lely_core_cmake_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include("cmake/lely_core_libraries-extras.cmake" NO_POLICY_SCOPE) -@@ -46,6 +46,22 @@ install( +@@ -46,6 +49,22 @@ install( DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ USE_SOURCE_PERMISSIONS) From 8deb98e8339c42b727d2ccc097bf3c2224d0cde2 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Mon, 19 Oct 2026 18:33:27 +1000 Subject: [PATCH 3/4] lely_core_libraries: recipe test that libraries and headers are installed [skip ci] Turns the local checks of this PR into a recipe test, so later rebuilds keep them. Co-Authored-By: Claude Opus 5.5 --- shared/tests/ros2-lely-core-libraries.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 shared/tests/ros2-lely-core-libraries.yaml diff --git a/shared/tests/ros2-lely-core-libraries.yaml b/shared/tests/ros2-lely-core-libraries.yaml new file mode 100644 index 00000000..5fd4d6ff --- /dev/null +++ b/shared/tests/ros2-lely-core-libraries.yaml @@ -0,0 +1,7 @@ +tests: + # Our patch installs lely from a staging directory: its libraries and headers must end up + # in the prefix. + - if: unix + then: + script: + - python -c "import glob, os; p = os.environ['PREFIX']; assert glob.glob(os.path.join(p, 'lib', 'liblely-coapp.*')), 'liblely-coapp'; assert os.path.isfile(os.path.join(p, 'include', 'lely', 'coapp', 'master.hpp')), 'lely/coapp/master.hpp'" From e26eaab185b6282f5fc4c6ca37f5380a145a4e2d Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 20 Oct 2026 00:20:14 +1000 Subject: [PATCH 4/4] humble: canopen_core without Boost.System [skip ci] canopen_core 0.2.13's ConfigExtras.cmake (also loaded by every package that finds canopen_core) asks for Boost's system component, and Boost 1.90 has no boost_system library (Boost.System is header-only). Ask for thread only, as canopen_core 0.3 does. The other humble canopen packages don't use Boost.System. Co-Authored-By: Claude Opus 5.5 --- distros/humble/patch/ros2-canopen-core.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 distros/humble/patch/ros2-canopen-core.patch diff --git a/distros/humble/patch/ros2-canopen-core.patch b/distros/humble/patch/ros2-canopen-core.patch new file mode 100644 index 00000000..8b82737b --- /dev/null +++ b/distros/humble/patch/ros2-canopen-core.patch @@ -0,0 +1,11 @@ +diff --git a/ConfigExtras.cmake b/ConfigExtras.cmake +index 8f7786d..b231296 100644 +--- a/ConfigExtras.cmake ++++ b/ConfigExtras.cmake +@@ -12,4 +12,5 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + # +-find_package(Boost REQUIRED system thread) ++# Boost.System is header-only (no boost_system library since Boost 1.89); as canopen_core 0.3 ++find_package(Boost REQUIRED thread)