backport patch for Ticket#12371 on libboost-thread

Bug #1619453 reported by Guillaume W.
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
boost1.58 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Xenial, while building code using boost thread like in https://github.com/shadow-robot/sr_core/blob/indigo-devel/sr_utilities/include/sr_utilities/thread_safe_map.hpp

I encountered this bug
https://svn.boost.org/trac/boost/ticket/12371

{{{
In file included from /usr/include/boost/thread.hpp:24:0,
                 from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot/sr_core/sr_utilities/include/sr_utilities/thread_safe_map.hpp:32,
                 from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_robot_lib/include/sr_robot_lib/sr_joint_motor.hpp:34,
                 from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_tactile_sensor_controller/include/sr_tactile_sensor_controller/sr_tactile_calibration.hpp:13,
                 from /homes/guihome/work/dev/catkin_kinetic_shadow/src/shadow_robot_ethercat/sr_tactile_sensor_controller/src/sr_tactile_calibration.cpp:10:
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<Rp, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:788:32: error: expected primary-expression before ‘(’ token
             this->thr_ = thread(&future_async_shared_state::run, that, boost::forward<Fp>(f));
                                ^
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<void, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:810:32: error: expected primary-expression before ‘(’ token
             this->thr_ = thread(&future_async_shared_state::run, this->shared_from_this(), boost::move(f));
                                ^
/usr/include/boost/thread/future.hpp: In member function ‘void boost::detail::future_async_shared_state<Rp&, Fp>::init(const Fp&)’:
/usr/include/boost/thread/future.hpp:833:32: error: expected primary-expression before ‘(’ token
             this->thr_ = thread(&future_async_shared_state::run, this->shared_from_this(), boost::move(f));
                                ^
}}}

applying a similar patch to Ticket#12371 on 1.58 fixes the issue.

Might be a very specific use-case, but would be nice to backport this fix on LTS.

thanks

Tags: patch
Revision history for this message
Guillaume W. (guihome) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "add namespace to thread() calls" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in boost1.58 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.