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

[ROS-O] work around include issue with Magick++ #60

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from

Conversation

v4hn
Copy link

@v4hn v4hn commented Oct 6, 2022

On Debian bookworm I see this error with the current code:

In file included from /usr/include/boost/assert.hpp:58,
                 from /usr/include/boost/thread/pthread/mutex.hpp:22,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from include/ros/publisher.h:36,
                 from include/ros/node_handle.h:32,
                 from include/ros/ros.h:45,
                 from sr_tools/sr_movements/src/movement_from_image.cpp:31:
/usr/include/boost/thread/detail/platform_time.hpp: In static member function ‘static boost::detail::real_platform_timepoint boost::detail::real_platform_clock ::now()’:
/usr/include/boost/thread/detail/platform_time.hpp:311:11: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘MagickCore::__assert_fail’?
  311 |           BOOST_ASSERT(0 && "Boost::Thread - clock_gettime(CLOCK_REALTIME) Internal Error");
      |           ^~~~~~~~~~~~

which is due to (Debian's?) Magick++ 6 including the assert header in a namespace by accident. While this is clearly a bug upstream as includes should be agnostic to order, there is clearly no harm in changing the order here for a faster fix.

Tests

  • No tests required to be added. (For small changes that will be tested by CI/CD infrastructure).
  • Added/Modified automated and PhantomHand CI tests (if a new class is added (Python or C++), the interface of that class must be unit tested).
  • Manually tested in simulation (if simulation specific or no hardware required to test the functionality).
  • Manually tested on hardware (if hardware specific or related).

Documentation

  • No documentation required to be added.
  • Added documentation (For any new feature, explain what it does and how to use it. Write the documentation in a relevant space, e.g. Github, Confluence, etc).
  • Updated documentation (For changes to pre-existing features mentioned in the documentation).

On Debian bookworm I see this error with the current code:

In file included from /usr/include/boost/assert.hpp:58,
                 from /usr/include/boost/thread/pthread/mutex.hpp:22,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from include/ros/publisher.h:36,
                 from include/ros/node_handle.h:32,
                 from include/ros/ros.h:45,
                 from sr_tools/sr_movements/src/movement_from_image.cpp:31:
/usr/include/boost/thread/detail/platform_time.hpp: In static member function ‘static boost::detail::real_platform_timepoint boost::detail::real_platform_clock
::now()’:
/usr/include/boost/thread/detail/platform_time.hpp:311:11: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘MagickCore::__assert_fail’?
  311 |           BOOST_ASSERT(0 && "Boost::Thread - clock_gettime(CLOCK_REALTIME) Internal Error");
      |           ^~~~~~~~~~~~

which is due to (Debian's?) Magick++ 6 including the headers in a namespace by accident.
While this is clearly a bug upstream as includes should be agnostic to order,
there is clearly no harm in changing the order here for a faster fix.
@v4hn v4hn requested review from a team as code owners October 6, 2022 08:25
@jspricke
Copy link

jspricke commented Oct 6, 2022

For reference, this is an upstream issue: ImageMagick/ImageMagick#4679

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 this pull request may close these issues.

2 participants