I need to use shared memory in an application on Windows and Solaris so I’ve grabbed boost::shmem 0.93. It works fine on Windows but fails to compile on Solaris 10/SunPro 11. Has anybody had success on Solaris? I get the following errors when I try to compile.

 

“boost/shmem/detail/segment_manager.hpp", line 253: Error: Redefining boost::shmem::detail::segment_manager<boost::shmem::detail::CharType, boost::shmem::detail::MemoryAlgorithm, boost::shmem::detail::IndexType<boost::shmem::detail::IndexConfig>> after use in boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>::index_config<char>.

"boost/shmem/indexes/flat_map_index.hpp", line 29:     Where: While specializing "boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>::index_config<char>".

"boost/shmem/indexes/flat_map_index.hpp", line 29:     Where: Specialized in boost::shmem::flat_map_index_aux<boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>::index_config<char>>.

"boost/shmem/indexes/flat_map_index.hpp", line 45:     Where: Specialized in boost::shmem::flat_map_index<boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>::index_config<char>>.

"boost/shmem/detail/segment_manager.hpp", line 1046:     Where: Specialized in boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>::header_t.

"boost/shmem/detail/segment_manager.hpp", line 1053:     Where: Specialized in boost::shmem::detail::segment_manager<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>.

"boost/shmem/detail/named_object_impl.hpp", line 73:     Where: Specialized in boost::shmem::detail::basic_named_object_impl<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>.

"boost/shmem/named_shared_object.hpp", line 42:     Where: Specialized in boost::shmem::basic_named_shared_object<char, boost::shmem::simple_seq_fit<boost::shmem::shared_mutex_family, boost::shmem::offset_ptr<void, boost::shmem::offset_1_null_ptr>>, boost::shmem::flat_map_index<boost::shmem::IndexConfig>>.

"Signaling.h", line 52:     Where: Specialized in non-template code.

1 Error(s) and 1 Warning(s) detected.

 

The offending bit of code is:

void sendPathAndName(std::string &path, std::string &name, boost::shmem::named_shared_object *pSegment)

{

   if(mpPath != NULL)

   {

            pSegment->deallocate(mpPath.get());   // ß error

   }

 

Where mpPath is a boost::shmem::offset_ptr<char> that was created with pSegment->allocate()

--------------------

Trevor R.H. Clarke

tclarke at ball.com

Ball Aerospace & Technologies Corp