Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing virtual destructors on Apple Clang version 10.0 #563

Closed
greimela-si opened this issue Oct 4, 2018 · 1 comment · Fixed by #566
Closed

Missing virtual destructors on Apple Clang version 10.0 #563

greimela-si opened this issue Oct 4, 2018 · 1 comment · Fixed by #566
Assignees

Comments

@greimela-si
Copy link

Bug report

Required Info:

  • Operating System:
    • macOS 10.14 Mojave
  • Installation type:
    • from source
  • Version or commit hash:
    • 6ff3ff4
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

Build rclcpp from source using Clang with version 10.

$ clang -v
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix

Expected behavior

rclcpp builds without errors.

Actual behavior

rclcpp fails due to warnings about missing virtual destructors.
Error:

rclcpp::message_memory_strategy::MessageMemoryStrategy<rcutils_char_array_t, 
std::__1::allocator<void> >' that has virtual functions but non-virtual destructor
[-Werror,-Wdelete-non-virtual-dtor]

All in all these classes are affected:

include/rclcpp/intra_process_manager_impl.hpp
include/rclcpp/memory_strategy.hpp
include/rclcpp/message_memory_strategy.hpp

Additional information

Adding the virtual destructors fixes the issue.
Unfortunately I can't create the PR myself.

@clalancette
Copy link
Contributor

Oh yeah, good call. I'll do this, should fix the warnings I get on High Sierra as well.

@clalancette clalancette self-assigned this Oct 5, 2018
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this issue Aug 5, 2022
The struct was removed in ros2/rosbag2#493, but in order
to avoid a hard-break for users coming from Foxy I've added it back with a deprecation
warning.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
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 a pull request may close this issue.

2 participants