Bug 1170010 - devtoolset-gcc not compatible with boost
Summary: devtoolset-gcc not compatible with boost
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: boost
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jonathan Wakely
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-03 01:25 UTC by Kirby Zhou
Modified: 2015-07-22 06:00 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-07-22 06:00:09 UTC


Attachments (Terms of Use)
A fix (802 bytes, patch)
2015-01-14 20:51 UTC, Petr Machata
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1269 normal SHIPPED_LIVE boost bug update 2015-07-20 17:49:29 UTC
Red Hat Bugzilla 1108268 None CLOSED devtoolset-gcc not compatible with boost 2018-08-29 20:39:49 UTC

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):

boost-1.41.0-25.el6.x86_64
devtoolset-3-gcc-c++-4.9.1-10.el6.x86_64

How reproducible:

100%



Steps to Reproduce:

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

class Foo
{
public:
	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.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1108268

Patch:

--- 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>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )

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.

https://rhn.redhat.com/errata/RHBA-2015-1269.html


Note You need to log in before you can comment on or make changes to this bug.