Bug 1170010
| Summary: | devtoolset-gcc not compatible with boost | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Kirby Zhou <kirbyzhou> | ||||
| Component: | boost | Assignee: | Jonathan Wakely <jwakely> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Miloš Prchlík <mprchlik> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.6 | CC: | btotty, jherrman, mcermak, mnewsome, mprchlik | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| 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: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 980207 [details]
A fix
Verified for build boost-1.41.0-27.el6 and both devtoolset 3.x/2.x. 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 |
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 )