Boost C++ Libraries: Ticket #11972: thousands multi-thread tests fail after -mt, _REENTRANT elimination in Oracle Studio 12.5 C++ https://svn.boost.org/trac10/ticket/11972 <p> Problem:thousands multi-thread tests fail after -mt, _REENTRANT elimination in Oracle Studio 12.5 C++. for example: atomic shared library build, CC lockpool.cpp -KPIC -G -o ../libboost_atomic.so -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I. -mt -DBOOST_ATOMIC_SOURCE -DBOOST_ATOMIC_DYN_LINK=1 -compat=5 -library=stlport4 -m32 ... </p> <p> "lockpool.cpp", line 24: Error: #error Boost.Atomic: Unsupported target platform, POSIX threads are required when native atomic operations are not available. Solution: in boost/config/suffix.hpp 26:#ifndef BOOST_CONFIG_SUFFIX_HPP 27:#define BOOST_CONFIG_SUFFIX_HPP </p> <p> change to 25:#include &lt;unistd.h&gt; 26:#ifndef BOOST_CONFIG_SUFFIX_HPP 27:#define BOOST_CONFIG_SUFFIX_HPP </p> <table class="wiki"> <tr>250: <td> defined(_PTHREADS) </td><td> defined(<span class="underline">APPLE</span>) </td><td> defined(<span class="underline">DragonFly</span>)) \ </td></tr></table> <p> change to </p> <table class="wiki"> <tr>250: <td> defined(_PTHREADS) </td><td> defined(<span class="underline">APPLE</span>) </td><td> defined(<span class="underline">DragonFly</span>) </td><td> (defined(_POSIX_THREADS) &amp;&amp; (_POSIX_THREADS+0 &gt;= 0))) \ </td></tr></table> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11972 Trac 1.4.3 John Maddock Sat, 12 Mar 2016 18:16:26 GMT component changed; owner set https://svn.boost.org/trac10/ticket/11972#comment:1 https://svn.boost.org/trac10/ticket/11972#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">John Maddock</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">config</span> </li> </ul> <p> I mentioned this in the PR, but there's something wrong here: </p> <ul><li>_POSIX_THREADS only tells you whether the operating system supports threads, it tells you nothing about whether the compiler in it's current version and build configuration generates thread safe code. At the very least the check would have to be in sun.hpp and guarded by a compiler version check if it's true that the next compiler release always generates thread safe code. </li><li>The latest online docs for Oracle 12.5 beta still mention -mt and _REENTRANT, in fact they say that -mt is a requirement for building thread safe code. </li></ul> Ticket John Maddock Sun, 16 Apr 2017 17:41:23 GMT <link>https://svn.boost.org/trac10/ticket/11972#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11972#comment:2</guid> <description> <p> Ping? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 31 Jul 2018 18:38:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11972#comment:3 https://svn.boost.org/trac10/ticket/11972#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> Ticket