Bug 1170010

Summary: devtoolset-gcc not compatible with boost
Product: Red Hat Enterprise Linux 6 Reporter: Kirby Zhou <kirbyzhou>
Component: boostAssignee: Jonathan Wakely <jwakely>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: btotty, jherrman, mcermak, mnewsome, mprchlik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, a number of boost libraries were not compatible with the GNU Compiler Collection (GCC) provided with Red Hat Developer Toolset. A fix has been implemented to address this problem and the affected libraries now properly work with Red Hat Developer Toolset GCC.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 06:00:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
A fix none

Description Kirby Zhou 2014-12-03 01:25:32 UTC
Description of problem:

Some boost libraries are not compatible with devtoolset, Specially, the weak_ptr.hpp.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

[@sjs_49_151 gccbug]# cat boost_weakptr_bug.cpp 
#include <boost/weak_ptr.hpp>

class Foo
	Foo() = default;
	Foo(const Foo&) = default;
	Foo(Foo&&) = default;

typedef boost::weak_ptr<Foo> FooPtr; 

int main()
	FooPtr p1;
	FooPtr p2(p1);

[@sjs_49_151 gccbug]# scl enable devtoolset-3 -- g++ -c -std=c++11 boost_weakptr_bug.cpp 

Actual results:

boost_weakptr_bug.cpp: In function 'int main()':
boost_weakptr_bug.cpp:16:14: error: use of deleted function 'boost::weak_ptr<Foo>::weak_ptr(const boost::weak_ptr<Foo>&)'
  FooPtr p2(p1);
In file included from /usr/include/boost/weak_ptr.hpp:16:0,
                 from boost_weakptr_bug.cpp:1:
/usr/include/boost/smart_ptr/weak_ptr.hpp:28:25: note: 'boost::weak_ptr<Foo>::weak_ptr(const boost::weak_ptr<Foo>&)' is implicitly declared as deleted because 'boost::weak_ptr<Foo>' declares a move constructor or move assignment operator
 template<class T> class weak_ptr

Expected results:

Compiled without error.

Additional info:

This bug is similar of shared_ptr at #Bug 1108268.



--- include/boost/smart_ptr/weak_ptr.hpp   2009-11-19 00:44:37.000000000 +0800
+++ fixed/include/boost/smart_ptr/weak_ptr.hpp   2014-04-28 16:15:21.000000000 +0800
@@ -76,8 +76,6 @@
 #if defined( BOOST_HAS_RVALUE_REFS )
+    weak_ptr( weak_ptr<Y> const & r ) = default;
     template<class Y>

Comment 4 Petr Machata 2015-01-14 20:51:43 UTC
Created attachment 980207 [details]
A fix

Comment 7 Miloš Prchlík 2015-04-23 06:57:31 UTC
Verified for build boost-1.41.0-27.el6 and both devtoolset 3.x/2.x.

Comment 9 errata-xmlrpc 2015-07-22 06:00:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.