2

ros2 rolling installation returns this error on raspberry pi 3b

https://github.com/ros2/rmw/blob/master/rmw/include/rmw/types.h#L418

I believe the 418th line is wrong but I don't know how to fix it

image of error

#ifndef _WIN32
#define RMW_DECLARE_DEPRECATED(name, msg) name __attribute__((deprecated(msg)))
#else
#define RMW_DECLARE_DEPRECATED(name, msg) name __pragma(deprecated(name))
#endif
  • 1
    Which compiler are you using? `GCC`? You could simply retry to replace it with `#define DEPRECATED(name, msg) name __attribute__ ((deprecated))` so dropping the additional deprecation message that is shown when the function is called. If that does not work you could try to simply replace it by `#define RMW_DECLARE_DEPRECATED(name, msg) name` dropping the attribute and see if the compilation succeeds or fails then. – 2b-t Jun 20 '21 at 11:06

1 Answers1

0

thanks! @2b-t Your suggestion to use this line worked! I don't know how this affects the code but the compilation runs!

#define RMW_DECLARE_DEPRECATED(name, msg) name 
  • Excellent. It is not a very clean workaround though as the `__attribute__((deprecated))` is actually there to suppress compiler warnings but as long as it works... – 2b-t Jun 21 '21 at 21:11