From cf037b2e2895be335d41e12f64cd7d3704983585 Mon Sep 17 00:00:00 2001 From: Aarav Gupta Date: Wed, 15 Apr 2026 17:07:49 +0530 Subject: [PATCH 1/2] Remove atomic patch Co-authored-by: Narukara --- colcon.meta | 2 +- libmicroros.mk | 44 +------------------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/colcon.meta b/colcon.meta index ce2992a2..10c22199 100644 --- a/colcon.meta +++ b/colcon.meta @@ -17,7 +17,7 @@ "-DENABLE_TESTING=OFF", "-DRCUTILS_NO_FILESYSTEM=ON", "-DRCUTILS_NO_THREAD_SUPPORT=ON", - "-DRCUTILS_NO_64_ATOMIC=ON", + "-DRCUTILS_NO_64_ATOMIC=OFF", "-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON" ] }, diff --git a/libmicroros.mk b/libmicroros.mk index 47f94faf..651e49f2 100644 --- a/libmicroros.mk +++ b/libmicroros.mk @@ -111,49 +111,7 @@ $(EXTENSIONS_DIR)/micro_ros_src/install: $(EXTENSIONS_DIR)/esp32_toolchain.cmake -DCMAKE_C_STANDARD=$(C_STANDARD) \ -DUCLIENT_C_STANDARD=$(C_STANDARD); -patch_atomic:$(EXTENSIONS_DIR)/micro_ros_src/install -# Workaround https://github.com/micro-ROS/micro_ros_espidf_component/issues/18 -ifeq ($(IDF_TARGET),$(filter $(IDF_TARGET),esp32s2 esp32c3 esp32c6)) - echo $(UROS_DIR)/atomic_workaround; \ - mkdir $(UROS_DIR)/atomic_workaround; cd $(UROS_DIR)/atomic_workaround; \ - $(X_AR) x $(UROS_DIR)/install/lib/librcutils.a; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \ - if [ $(IDF_VERSION_MAJOR) -ge 4 ] && [ $(IDF_VERSION_MINOR) -ge 3 ]; then \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \ - fi; \ - if [ $(IDF_VERSION_MAJOR) -ge 4 ] && [ $(IDF_VERSION_MINOR) -ge 4 ]; then \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \ - fi; \ - if [ $(IDF_VERSION_MAJOR) -ge 5 ] && [ $(IDF_VERSION_MINOR) -ge 0 ]; then \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \ - fi; \ - $(X_AR) rc -s librcutils.a *.obj; \ - cp -rf librcutils.a $(UROS_DIR)/install/lib/librcutils.a; \ - cd ..; \ - rm -rf $(UROS_DIR)/atomic_workaround; -endif -ifeq ($(IDF_TARGET),$(filter $(IDF_TARGET),esp32)) - echo $(UROS_DIR)/atomic_workaround; \ - mkdir $(UROS_DIR)/atomic_workaround; cd $(UROS_DIR)/atomic_workaround; \ - $(X_AR) x $(UROS_DIR)/install/lib/librcutils.a; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_fetch_add_8; \ - if [ $(IDF_VERSION_MAJOR) -ge 5 ] && [ $(IDF_VERSION_MINOR) -ge 3 ]; then \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_load_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_store_8; \ - $(X_STRIP) atomic_64bits.c.obj --strip-symbol=__atomic_exchange_8; \ - fi; \ - $(X_AR) rc -s librcutils.a *.obj; \ - cp -rf librcutils.a $(UROS_DIR)/install/lib/librcutils.a; \ - cd ..; \ - rm -rf $(UROS_DIR)/atomic_workaround; -endif - -$(EXTENSIONS_DIR)/libmicroros.a: $(EXTENSIONS_DIR)/micro_ros_src/install patch_atomic +$(EXTENSIONS_DIR)/libmicroros.a: $(EXTENSIONS_DIR)/micro_ros_src/install mkdir -p $(UROS_DIR)/libmicroros; cd $(UROS_DIR)/libmicroros; \ for file in $$(find $(UROS_DIR)/install/lib/ -name '*.a'); do \ folder=$$(echo $$file | sed -E "s/(.+)\/(.+).a/\2/"); \ From d2c43d8ffa59944d854aa45b0b4dd387c0036d83 Mon Sep 17 00:00:00 2001 From: Aarav Gupta Date: Wed, 25 Feb 2026 17:53:58 +0530 Subject: [PATCH 2/2] Fix rolling builds A new package was added to `rcl_logging` called `rcl_logging_implementation`. It depends on `rcpputils`, which I wasn't able to get building. Therefore, we are skipping building that package using `COLCON_IGNORE`. https://github.com/ros2/rclc needs to be pinned to an older version until https://github.com/ros2/rcl/pull/1269 is added in https://github.com/micro-ROS/rcl. https://github.com/ros2/rosidl needs to be pinned to an older version due to breaking changes made with https://github.com/ros2/rosidl/pull/941 --- libmicroros.mk | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libmicroros.mk b/libmicroros.mk index 651e49f2..12911178 100644 --- a/libmicroros.mk +++ b/libmicroros.mk @@ -60,11 +60,17 @@ $(EXTENSIONS_DIR)/micro_ros_src/src: git clone -b ros2 https://github.com/eProsima/micro-CDR src/micro-CDR; \ git clone -b rolling https://github.com/micro-ROS/rcl src/rcl; \ git clone -b rolling https://github.com/ros2/rclc src/rclc; \ + cd src/rclc; \ + git reset --hard 2283a6d76c3f41a964d03610a3305166d8c2caaa; \ + cd ../..; \ git clone -b rolling https://github.com/micro-ROS/rcutils src/rcutils; \ git clone -b rolling https://github.com/micro-ROS/micro_ros_msgs src/micro_ros_msgs; \ git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport src/rosidl_typesupport; \ git clone -b rolling https://github.com/micro-ROS/rosidl_typesupport_microxrcedds src/rosidl_typesupport_microxrcedds; \ git clone -b rolling https://github.com/ros2/rosidl src/rosidl; \ + cd src/rosidl; \ + git reset --hard 2e9ab2d70097cbfa5bb48ae4486a8a1c15a3936c; \ + cd ../..; \ git clone -b rolling https://github.com/ros2/rosidl_dynamic_typesupport src/rosidl_dynamic_typesupport; \ git clone -b rolling https://github.com/ros2/rmw src/rmw; \ git clone -b rolling https://github.com/ros2/rcl_interfaces src/rcl_interfaces; \ @@ -78,10 +84,10 @@ $(EXTENSIONS_DIR)/micro_ros_src/src: git clone -b rolling https://github.com/ros2/ros2_tracing src/ros2_tracing; \ git clone -b rolling https://github.com/micro-ROS/micro_ros_utilities src/micro_ros_utilities; \ git clone -b rolling https://github.com/ros2/rosidl_core src/rosidl_core; \ - touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \ - touch src/rcl_logging/rcl_logging_log4cxx/COLCON_IGNORE; \ - touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \ - touch src/rclc/rclc_examples/COLCON_IGNORE; \ + touch src/rosidl/rosidl_typesupport_introspection_cpp/COLCON_IGNORE; \ + touch src/rcl_logging/rcl_logging_implementation/COLCON_IGNORE; \ + touch src/rcl_logging/rcl_logging_spdlog/COLCON_IGNORE; \ + touch src/rclc/rclc_examples/COLCON_IGNORE; \ touch src/rcl/rcl_yaml_param_parser/COLCON_IGNORE; \ touch src/ros2_tracing/test_tracetools/COLCON_IGNORE; \ touch src/ros2_tracing/lttngpy/COLCON_IGNORE; \