Boost C++ Libraries: Ticket #12457: cannot compile log with Oracle Developer Studio 12.5 https://svn.boost.org/trac10/ticket/12457 <p> Compiling Boost.log with Oracle Developer Studio 12.5, we see the following failure: </p> <p> % "CC" -std=c++11 -library=stdcpp,CrunG3 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_HAS_PTHREAD_MUTEX_ROBUST -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=500 -D<span class="underline">EXTENSIONS</span> -D<span class="underline">STDC_CONSTANT_MACROS -D</span>typeof<span class="underline">=</span>typeof<span class="underline"> -I"../../.." -I"../../../libs/log/src" -c -o "../../../bin.v2/libs/log/build/sun/release/stdlib-gnu/threading-multi/posix/ipc_reliable_message_queue.o" "../../../libs/log/src/posix/ipc_reliable_message_queue.cpp" </span></p> <p> "../../../libs/log/src/posix/ipc_reliable_message_queue.cpp", line 61: Error: #error Boost.Log: Native 32-bit atomic operations are required but not supported by Boost.Atomic on the target platform. </p> <p> This seems to be a configuration issue. </p> <p> The following changes seems to work: </p> <p> 1) In boost/atomic/detail/platform/platform.hpp % !diff diff ./platform.hpp ./platform.hpp_orig 46c46 </p> <table class="wiki"> <tr>&lt; #elif (defined(<span class="underline">GNUC</span>) <td> (<span class="underline">SUNPRO_CC &gt;= 0x5130)) &amp;&amp; (defined(</span>i386<span class="underline">) </span></td><td> defined(<span class="underline">x86_64</span>)) </td></tr></table> <p> --- </p> <blockquote class="citation"> <table class="wiki"> <tr>#elif defined(<span class="underline">GNUC</span>) &amp;&amp; (defined(<span class="underline">i386</span>) <td> defined(<span class="underline">x86_64</span>)) </td></tr></table> </blockquote> <p> 68c68 </p> <table class="wiki"> <tr>&lt; #elif (defined(<span class="underline">GNUC</span>) <td> (<span class="underline">SUNPRO_CC &gt;= 0x5130)) &amp;&amp; defined(</span>sparc) </td></tr></table> <p> --- </p> <blockquote class="citation"> <p> #elif defined(<span class="underline">GNUC</span>) &amp;&amp; defined(<span class="underline">sparc_v9</span>) </p> </blockquote> <p> The above change causes the compilation to proceed further, however, it fails again with another configuration issue causing failure to build atomic library </p> <p> "CC" -std=c++11 -library=stdcpp,CrunG3 -xO4 -mt -erroff=%none -m32 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"../../.." -c -o "../../../bin.v2/libs/atomic/build/sun/release/stdlib-gnu/threading-multi/lockpool.o" "../../../libs/atomic/src/lockpool.cpp" </p> <p> "../../../boost/atomic/detail/ops_gcc_sparc.hpp", line 69: Error: The function "fence_before_store" must have a prototype. </p> <p> In boost/atomic/detail/ops_gcc_sparc.hpp, the following change seems to resolve the issue </p> <p> % !diff % diff ./ops_gcc_sparc.hpp ./ops_gcc_sparc.hpp_orig 69c69 &lt; fence_before(order); --- </p> <blockquote class="citation"> <blockquote> <p> fence_before_store(order); </p> </blockquote> </blockquote> <p> 71c71 &lt; fence_after(order); --- </p> <blockquote class="citation"> <blockquote> <p> fence_after_store(order); </p> </blockquote> </blockquote> <p> 110c110 &lt; fence_before(order); --- </p> <blockquote class="citation"> <blockquote> <p> base_type::fence_before(order); </p> </blockquote> </blockquote> <p> 118c118 &lt; fence_after(order); --- </p> <blockquote class="citation"> <blockquote> <p> base_type::fence_after(order); </p> </blockquote> </blockquote> <p> The changes above successfully compiles the log sources. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12457 Trac 1.4.3 Andrey Semashev Wed, 14 Sep 2016 16:48:56 GMT owner changed https://svn.boost.org/trac10/ticket/12457#comment:1 https://svn.boost.org/trac10/ticket/12457#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">timblechmann</span> to <span class="trac-author">Andrey Semashev</span> </li> </ul> Ticket Andrey Semashev Wed, 14 Sep 2016 18:34:02 GMT <link>https://svn.boost.org/trac10/ticket/12457#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12457#comment:2</guid> <description> <p> ops_gcc_sparc.hpp should be fixed in 4274a78f46923653082e32328d73b022e6be9365. </p> <p> Regarding changes to platform.hpp, I don't think they are legit. See <a class="ext-link" href="https://github.com/boostorg/atomic/pull/6"><span class="icon">​</span>https://github.com/boostorg/atomic/pull/6</a>. </p> </description> <category>Ticket</category> </item> <item> <author>Aparna Kumta <aparna.kumta@…></author> <pubDate>Wed, 14 Sep 2016 19:40:34 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_x86_m64.txt</span> </li> </ul> <p> predefined macros 64 bit mode for x86 </p> Ticket Aparna Kumta <aparna.kumta@…> Wed, 14 Sep 2016 19:41:30 GMT attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_x86_m32.txt</span> </li> </ul> <p> predefined macros 32 bit mode for x86 </p> Ticket Aparna Kumta <aparna.kumta@…> Wed, 14 Sep 2016 19:46:40 GMT attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_m64_sparc.txt</span> </li> </ul> <p> predefined macros 64 bit mode for sparc-S2 </p> Ticket Aparna Kumta <aparna.kumta@…> Wed, 14 Sep 2016 19:47:31 GMT attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_m32_sparc.txt</span> </li> </ul> <p> predefined macros 32 bit mode for sparc-S2 </p> Ticket Andrey Semashev Wed, 14 Sep 2016 22:28:13 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12457#comment:3 https://svn.boost.org/trac10/ticket/12457#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">fixed</span> </li> </ul> <p> Compiler detection was corrected in dce87d3c0a756e6c627e1be3258d558767f24db8 and e4506534510635ff45d2d46dd9e9b53273c8d4c8, this should fix the problem. If it doesn't? please reopen (I have no way of testing the changes). </p> Ticket Aparna Kumta <aparna.kumta@…> Wed, 14 Sep 2016 23:45:43 GMT attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_sparc.tar.gz</span> </li> </ul> <p> predefined macros for sparc-s2 </p> Ticket Aparna Kumta <aparna.kumta@…> Wed, 14 Sep 2016 23:46:29 GMT attachment set https://svn.boost.org/trac10/ticket/12457 https://svn.boost.org/trac10/ticket/12457 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">dump_x86.tar.gz</span> </li> </ul> <p> predefined macros for x86 </p> Ticket