Boost C++ Libraries: Ticket #4376: Compilation failure on Solaris 5.9, 5.10, because of non existent membar_producer(membar_consumer) https://svn.boost.org/trac10/ticket/4376 <p> We have to compile our application for a large set of unixes, including solaris 5.9 and 5.10. After switching from 1.42 to 1.43 I have got the following compilation error: </p> <pre class="wiki">/export/esuitebuild/boost_1_43_0/boost/asio/detail/solaris_fenced_block.hpp: In constructor 'boost::asio::detail::solaris_fe\ nced_block::solaris_fenced_block()': /export/esuitebuild/boost_1_43_0/boost/asio/detail/solaris_fenced_block.hpp:41: error: 'membar_consumer' was not declared in\ this scope /export/esuitebuild/boost_1_43_0/boost/asio/detail/solaris_fenced_block.hpp: In destructor 'boost::asio::detail::solaris_fen\ ced_block::~solaris_fenced_block()': /export/esuitebuild/boost_1_43_0/boost/asio/detail/solaris_fenced_block.hpp:47: error: 'membar_producer' was not declared in\ this scope </pre><p> These functions doesn`t exists in atomic.h. I found them in sys/atomic.h, and they can be used only from kernel mode. </p> <p> Is there any way to avoid membar_producer(membar_consumer) usage? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4376 Trac 1.4.3 chris_kohlhoff Mon, 05 Jul 2010 07:55:02 GMT <link>https://svn.boost.org/trac10/ticket/4376#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4376#comment:1</guid> <description> <p> This is a Solaris 9 issue; the membar functions are available in userspace on Solaris 10. Since you have access to Solaris 9, can you please suggest an alternative approach for that target. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 29 Aug 2010 01:55:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4376#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4376#comment:2</guid> <description> <p> I ran into the same problem when compiling under Solaris 8 using gcc 4.2. To circumvent the issue, I modified asio/detail/fenced_block.hpp where it checks #if defined (sun). I changed it to be #if defined(sun) &amp;&amp; !defined(GNUC). This bypasses sun's atomic operations (which aren't present prior to Solaris 10) in favor of gcc's built-in implementation. </p> <p> My application compiles fine now, however, I still need to test it. Is there a reason this change would be unsafe? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 23 Nov 2010 14:32:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4376#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4376#comment:3</guid> <description> <p> BOOST_ASIO_DISABLE_FENCED_BLOCK works well. Thank you. But seems you forgot to add it to documentation. Cannot find it here <a href="http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio/using.html">http://www.boost.org/doc/libs/1_45_0/doc/html/boost_asio/using.html</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>