-
Notifications
You must be signed in to change notification settings - Fork 957
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
address gcc6 build error #423
Conversation
With gcc6, compiling fails with `stdlib.h: No such file or directory`, as including '-isystem /usr/include' breaks with gcc6, cf., https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129. This commit addresses this issue for this package in almost the same way it was addressed in various other ROS packages. A list of related commits and pull requests is at: ros/rosdistro#12783 Particularly when searching for the Boost library CMake sets Boost_INCLUDE_DIRS to @sysRoot@/usr/include which should be avoided in the `-isystem` option of gcc. The same goes for OpenCV. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Added two more commits:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I messed up the review inline-comments v.s. summary here and I can't seem to delete this comment. Just ignore this =]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking in to it, and checking the warnings. One small point, but looks good to me other than that.
@@ -63,7 +63,7 @@ void planning_scene_monitor::TrajectoryMonitor::setSamplingFrequency(double samp | |||
|
|||
bool planning_scene_monitor::TrajectoryMonitor::isActive() const | |||
{ | |||
return record_states_thread_; | |||
return !!record_states_thread_.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the kinetic-devel branch this is currently already fixed as return static_cast<bool>(record_states_thread_);
Not sure why we didn't backport it, but I think it's best to use the same fix here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. static_cast would be much better here. Will fix!
When building with gcc6.2 and hardened compiler options used in Ostro project the build fails with the following error: moveit-ros-planning/moveit_ros/planning/planning_scene_monitor /src/trajectory_monitor.cpp:67:10: error: cannot convert 'const boost::scoped_ptr<boost::thread>' to 'bool' in return The patch does explicit conversion of boost::scoped_ptr to bool. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Updated the type conversion to use static cast |
Thanks for working on these details |
PRs opened for J/K |
Co-authored-by: AndyZe <zelenak@picknik.ai>
With gcc6, compiling fails with
stdlib.h: No such file or directory
,as including '-isystem /usr/include' breaks with gcc6, cf.,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129.
This commit addresses this issue for this package in almost the same way
it was addressed in various other ROS packages. A list of related
commits and pull requests is at:
Particularly when searching for the Boost library CMake sets
Boost_INCLUDE_DIRS to @sysRoot@/usr/include which should be
avoided in the
-isystem
option of gcc.The same goes for OpenCV.
Fortunately neither Boost nor OpenCV trigger build warnings when their include dirs are not marked as system ones.