Error with Boost scope

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Feb 5 14:06:07 UTC 2020


Hello,

I think this is an issue with your build settings. I extracted the boost 
includes for the ros project and included them in an example C++ RTEMS file:

#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/atomic.hpp>
#include <boost/bind.hpp>
#include <boost/chrono/ceil.hpp>
#include <boost/chrono/system_clocks.hpp>
#include <boost/config/abi_prefix.hpp>
#include <boost/config/abi_suffix.hpp>
#include <boost/config.hpp>
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time_duration.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/function.hpp>
#include <boost/function_types/function_arity.hpp>
#include <boost/function_types/is_nonmember_callable_builtin.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/make_shared.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/noncopyable.hpp>
#include <boost/program_options.hpp>
#include <boost/regex.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scope_exit.hpp>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals2/connection.hpp>
#include <boost/signals2.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/cv_status.hpp>
#include <boost/thread/detail/delete.hpp>
#include <boost/thread/detail/platform.hpp>
#include <boost/thread.hpp>
#include <boost/thread/lock_types.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
#include <boost/thread/pthread/thread_data.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/shared_mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/thread_time.hpp>
#include <boost/thread/tss.hpp>
#include <boost/thread/xtime.hpp>
#include <boost/throw_exception.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/utility.hpp>
#include <boost/version.hpp>
#include <boost/weak_ptr.hpp>

It works fine with this boost patch:

diff --git a/boost/config/detail/select_platform_config.hpp 
b/boost/config/detail/select_platform_config.hpp
index b36eca5..b87a458 100644
--- a/boost/config/detail/select_platform_config.hpp
+++ b/boost/config/detail/select_platform_config.hpp
@@ -17,7 +17,7 @@
  // linux, also other platforms (Hurd etc) that use GLIBC, should these 
really have their own config headers though?
  #  define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"

-#elif defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__) || defined(__DragonFly__) || defined(__rtems__)
  // BSD:
  #  define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"

diff --git a/boost/config/platform/bsd.hpp b/boost/config/platform/bsd.hpp
index 79e74a0..3b025b0 100644
--- a/boost/config/platform/bsd.hpp
+++ b/boost/config/platform/bsd.hpp
@@ -9,7 +9,7 @@

  //  generic BSD config options:

-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && 
!defined(__OpenBSD__) && !defined(__DragonFly__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && 
!defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__rtems__)
  #error "This platform is not BSD"
  #endif



More information about the users mailing list