RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1167383 - 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: All
OS: Linux
medium
low
Target Milestone: alpha
: 6.6
Assignee: Jonathan Wakely
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On: 1108268
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-24 15:36 UTC by Bryan Totty
Modified: 2019-03-22 07:25 UTC (History)
11 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: 1108268
Environment:
Last Closed: 2015-07-22 06:00:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A fix (675 bytes, patch)
2015-01-13 23:23 UTC, Petr Machata
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1269 0 normal SHIPPED_LIVE boost bug update 2015-07-20 17:49:29 UTC

Comment 1 Bryan Totty 2014-11-24 15:37:15 UTC
The error with boost-filesystem is listed as now fixed per: https://bugzilla.redhat.com/show_bug.cgi?id=1108268

However, it turns out that there is a related problem: boost-interprocess also turns out to be incompatible with devtoolset. The code to reproduce the error is as follows:

$ rpm -q boost-devel devtoolset-2-gcc-c++
boost-devel-1.41.0-25.el6.x86_64
devtoolset-2-gcc-c++-4.8.2-15.1.el6.x86_64

$ cat interprocess.cc 
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/private_node_allocator.hpp>

class A {};

void do_allocate(boost::interprocess::fixed_managed_shared_memory *segment) {
  boost::interprocess::private_node_allocator<
  A, boost::interprocess::fixed_managed_shared_memory::segment_manager, 1024>
    allocator(segment->get_segment_manager());
  auto* pool = allocator.get_node_pool();
  pool->deallocate_nodes(pool->allocate_nodes(10));
}

A* find(boost::interprocess::fixed_managed_shared_memory *segment) {
  return segment->find_no_lock<A>(boost::interprocess::unique_instance).first;
}

/tmp$ gcc -c -std=c++0x -Wall interprocess.cc # Fine with gcc 4.4
/tmp$ scl enable devtoolset-2 'gcc -c -std=c++0x -Wall interprocess.cc'
In file included from /usr/include/boost/interprocess/detail/utilities.hpp:25:0,
                 from /usr/include/boost/interprocess/mem_algo/detail/mem_algo_common.hpp:23,
                 from /usr/include/boost/interprocess/mem_algo/rbtree_best_fit.hpp:24,
                 from /usr/include/boost/interprocess/detail/managed_memory_impl.hpp:22,
                 from /usr/include/boost/interprocess/managed_shared_memory.hpp:21,
                 from interprocess.cc:1:
/usr/include/boost/interprocess/detail/move.hpp: In instantiation of \u2018typename boost::remove_reference<T>::type&& boost::interprocess::move(T&&) [with T = boost::interprocess::mapped_region&; typename boost::remove_reference<T>::type = boost::interprocess::mapped_region]\u2019:
/usr/include/boost/interprocess/mapped_region.hpp:159:53:   required from here
/usr/include/boost/interprocess/detail/move.hpp:342:11: error: cannot bind \u2018boost::interprocess::mapped_region\u2019 lvalue to \u2018boost::remove_reference<boost::interprocess::mapped_region&>::type&& {aka boost::interprocess::mapped_region&&}\u2019
 {  return t;   }
           ^
/usr/include/boost/interprocess/detail/move.hpp: In instantiation of \u2018typename boost::remove_reference<T>::type&& boost::interprocess::move(T&&) [with T = boost::interprocess::shared_memory_object&; typename boost::remove_reference<T>::type = boost::interprocess::shared_memory_object]\u2019:
/usr/include/boost/interprocess/shared_memory_object.hpp:85:63:   required from here
/usr/include/boost/interprocess/detail/move.hpp:342:11: error: cannot bind \u2018boost::interprocess::shared_memory_object\u2019 lvalue to \u2018boost::remove_reference<boost::interprocess::shared_memory_object&>::type&& {aka boost::interprocess::shared_memory_object&&}\u2019
/usr/include/boost/interprocess/detail/move.hpp: In instantiation of \u2018typename boost::remove_reference<T>::type&& boost::interprocess::move(T&&) [with T = boost::container::containers_detail::basic_multiallocation_chain<void*>&; typename boost::remove_reference<T>::type = boost::container::containers_detail::basic_multiallocation_chain<void*>]\u2019:
/usr/include/boost/interprocess/containers/container/detail/node_pool_impl.hpp:123:45:   required from \u2018boost::container::containers_detail::private_node_pool_impl<SegmentManagerBase>::multiallocation_chain boost::container::containers_detail::private_node_pool_impl<SegmentManagerBase>::allocate_nodes(std::size_t) [with SegmentManagerBase = boost::interprocess::segment_manager_base<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*> >; boost::container::containers_detail::private_node_pool_impl<SegmentManagerBase>::multiallocation_chain = boost::container::containers_detail::basic_multiallocation_chain<void*>; std::size_t = long unsigned int]\u2019
interprocess.cc:11:49:   required from here
/usr/include/boost/interprocess/detail/move.hpp:342:11: error: cannot bind \u2018boost::container::containers_detail::basic_multiallocation_chain<void*>\u2019 lvalue to \u2018boost::remove_reference<boost::container::containers_detail::basic_multiallocation_chain<void*>&>::type&& {aka boost::container::containers_detail::basic_multiallocation_chain<void*>&&}\u2019
/usr/include/boost/interprocess/detail/move.hpp: In instantiation of \u2018typename boost::remove_reference<T>::type&& boost::interprocess::move(T&&) [with T = boost::interprocess::scoped_lock<boost::interprocess::interprocess_recursive_mutex>&; typename boost::remove_reference<T>::type = boost::interprocess::scoped_lock<boost::interprocess::interprocess_recursive_mutex>]\u2019:
/usr/include/boost/interprocess/segment_manager.hpp:1316:65:   required from \u2018boost::interprocess::scoped_lock<typename MemoryAlgorithm::mutex_family::recursive_mutex_type> boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_get_lock(bool) [with CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*>; IndexType = boost::interprocess::iset_index; typename MemoryAlgorithm::mutex_family::recursive_mutex_type = boost::interprocess::interprocess_recursive_mutex]\u2019
/usr/include/boost/interprocess/segment_manager.hpp:830:55:   required from \u2018void* boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_generic_find(const CharT*, IndexType<boost::interprocess::detail::index_config<CharT, MemoryAlgorithm> >&, boost::interprocess::detail::in_place_interface&, std::size_t&, boost::interprocess::detail::true_, bool) [with CharT = char; CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*>; IndexType = boost::interprocess::iset_index; std::size_t = long unsigned int; boost::interprocess::detail::true_ = boost::interprocess::detail::bool_<true>]\u2019
/usr/include/boost/interprocess/segment_manager.hpp:701:33:   required from \u2018std::pair<T*, long unsigned int> boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::priv_find_impl(const CharType*, bool) [with T = A; CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*>; IndexType = boost::interprocess::iset_index]\u2019
/usr/include/boost/interprocess/segment_manager.hpp:432:49:   required from \u2018std::pair<T*, long unsigned int> boost::interprocess::segment_manager<CharType, MemoryAlgorithm, IndexType>::find_no_lock(const CharType*) [with T = A; CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*>; IndexType = boost::interprocess::iset_index]\u2019
/usr/include/boost/interprocess/detail/managed_memory_impl.hpp:699:55:   required from \u2018std::pair<T*, long unsigned int> boost::interprocess::detail::basic_managed_memory_impl<CharType, MemoryAlgorithm, IndexType, Offset>::find_no_lock(boost::interprocess::detail::basic_managed_memory_impl<CharType, MemoryAlgorithm, IndexType, Offset>::char_ptr_holder_t) [with T = A; CharType = char; MemoryAlgorithm = boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, void*>; IndexType = boost::interprocess::iset_index; long unsigned int Offset = 16ul; boost::interprocess::detail::basic_managed_memory_impl<CharType, MemoryAlgorithm, IndexType, Offset>::char_ptr_holder_t = boost::interprocess::detail::char_ptr_holder<char>]\u2019
interprocess.cc:15:71:   required from here
/usr/include/boost/interprocess/detail/move.hpp:342:11: error: cannot bind \u2018boost::interprocess::scoped_lock<boost::interprocess::interprocess_recursive_mutex>\u2019 lvalue to \u2018boost::remove_reference<boost::interprocess::scoped_lock<boost::interprocess::interprocess_recursive_mutex>&>::type&& {aka boost::interprocess::scoped_lock<boost::interprocess::interprocess_recursive_mutex>&&}\u2019


The error is also reproducible on DTS3, running
  scl enable devtoolset-3 'gcc -c -std=c++0x -Wall interprocess.cc'
with interprocess.cc as in the previous comment.

Comment 2 Petr Machata 2014-11-26 14:15:59 UTC
Boost shipped with Red Hat Enterprise Linux 7 can generally not be considered compatible with C++11.  That it can be compiled with system gcc in c++0x mode, but can't be with gcc 4.8, just means that the constructs that Boost uses are buggy with respect to C++11 compliance.  Similarly you could blame the system GCC that it allows these constructs to pass, which is likely a problem in its C++11 support.  These codebases were written when C++11 was not finalized yet, and these interoperability problems are to be expected.

Comment 5 Petr Machata 2015-01-13 23:23:24 UTC
Created attachment 979776 [details]
A fix

Comment 6 Petr Machata 2015-01-13 23:37:03 UTC
Since bug 1170010 is considered, we should consider this one as well.

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

Comment 10 errata-xmlrpc 2015-07-22 06:00:03 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.