ros / meta-ros

OpenEmbedded Layers for ROS 1 and ROS 2
MIT License
371 stars 246 forks source link

error: 'memset' is not a member of 'std'; #1130

Closed jq2333 closed 2 months ago

jq2333 commented 2 months ago

Describe the bug

To Reproduce use gcc12.3.0 to compile.

Expected behavior build pass

Solution

diff --git a/src/Serialization.cpp b/src/Serialization.cpp
index 8263c58..2ab6931 100644
--- a/src/Serialization.cpp
+++ b/src/Serialization.cpp
@@ -20,6 +20,8 @@

 #include "Serialization.hpp"

+#include <cstring> //std::memcpy
+
 #include <array>
 #include <limits>
 #include <memory>

https://github.com/ros2/rmw_cyclonedds/blob/humble/rmw_cyclonedds_cpp/src/Serialization.cpp

robwoolley commented 2 months ago

Thanks for reporting this.

The ROS 2 Foxy release went end-of-life on June 20, 2023. Unfortunately, it is no longer supported.

It appears that this was fixed in Humble: https://github.com/ros2/rmw_cyclonedds/commit/6bc618534e6230f0c6db102c8a7b0706e902c763

If there is something that is keeping you on Foxy, I'd be interested in understanding why you can't migrate forward.

jq2333 commented 2 months ago

Thanks for reporting this.

The ROS 2 Foxy release went end-of-life on June 20, 2023. Unfortunately, it is no longer supported.

It appears that this was fixed in Humble: ros2/rmw_cyclonedds@6bc6185

If there is something that is keeping you on Foxy, I'd be interested in understanding why you can't migrate forward.

Thank you! I'll migrate to humble as soon as possible!!