Boost C++ Libraries: Ticket #10925: fialed to build math library with studo 12.4 c++ on Solaris 11.2 https://svn.boost.org/trac10/ticket/10925 <p> Problem:fails to build math library with studio 12.4 on Solaris 11.2 </p> <blockquote> <p> with "../../../boost/math/cstdfloat/cstdfloat_types.hpp", line 393: Error: The type "boost::STATIC_ASSERTION_FAILURE&lt;0&gt;" is incomplete. </p> </blockquote> <p> 1 Error(s) detected. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10925 Trac 1.4.3 John Maddock Sat, 10 Jan 2015 19:47:29 GMT cc set https://svn.boost.org/trac10/ticket/10925#comment:1 https://svn.boost.org/trac10/ticket/10925#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">e_float@…</span> added </li> </ul> <p> Chris can you look at this? </p> <p> I assume that since the only part of Boost.Math that has a lib build does not include this file.... that this is an issue with the tests building, and not the lib building? </p> Ticket e_float@… Sat, 10 Jan 2015 22:53:09 GMT <link>https://svn.boost.org/trac10/ticket/10925#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:2</guid> <description> <p> Whatever the root cause, I just reviewed some of the compiler switches in all of cstdfloatX. Maybe this issue actually reveals a logic error in my pre-processor code. </p> <p> I think we need to review what I wrote for the case when GCC's libquadmath is available *and* the compiler supports a native 128-bit floating-point type. </p> <p> Maybe there is a cut-and-paste error still lurking in my code. </p> <p> Chris </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 11 Jan 2015 09:32:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:3</guid> <description> <p> I think we probably need to see the preprocessed source for the file that failing to figure this out, can the OP please provide that? </p> <p> Thanks, John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 13 Jan 2015 01:39:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:4</guid> <description> <p> studio 12.4 compilers don't support float128. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 18 Jan 2015 18:54:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:5</guid> <description> <blockquote class="citation"> <p> studio 12.4 compilers don't support float128. </p> </blockquote> <p> OK but we would still need to see the preprocessed source to figure out what's gone wrong. </p> </description> <category>Ticket</category> </item> <item> <author>angela.xie@…</author> <pubDate>Tue, 20 Jan 2015 19:24:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:6</guid> <description> <p> John, </p> <p> I have sent the preprocessed source to boost-bugs@… it is too large to attach it to this ticket. </p> <p> Please let me know if you don't receive it. </p> <p> Thanks </p> <p> Angela </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Zok</dc:creator> <pubDate>Thu, 22 Jan 2015 13:50:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:7</guid> <description> <p> I think the problem is that Sun compiler always returns false on std::numeric_limits&lt;T&gt;::is_iec559. Is it reasonable to check instead for?: std::numeric_limits&lt;T&gt;::has_infinity std::numeric_limits&lt;T&gt;::has_quiet_NaN std::numeric_limits&lt;T&gt;::has_signaling_NaN </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 22 Jan 2015 18:21:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:8</guid> <description> <p> I'll let Chris answer that, in the mean time can you send the preprocessed source to john@… as I didn't get the boost-bugs one (and that list has no archives apparently). You'll need to zip it up to make it small enough to send through email too. Thanks! John. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 22 Jan 2015 19:58:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:9</guid> <description> <blockquote class="citation"> <blockquote class="citation"> <p> I think the problem is that Sun compiler always returns false on std::numeric_limits&lt;T&gt;::is_iec559. Is it reasonable to check instead for?: std::numeric_limits&lt;T&gt;::has_infinity std::numeric_limits&lt;T&gt;::has_quiet_NaN std::numeric_limits&lt;T&gt;::has_signaling_NaN </p> </blockquote> </blockquote> <p> Thanks for this information. See below. </p> <blockquote class="citation"> <p> I'll let Chris answer that, ... </p> </blockquote> <p> The proposed change is reasonable, but unfortunately not allowed. The types in &lt;boost/cstdfloat.hpp&gt; such as boost::float32_t, etc. provide the reference implementation for N3626 proposed for C++17. This requires the undelying floating-point built-in types to adhere to IEEE-754 (which is analogous to std::numeric_limits&lt;T&gt;::is_iec559 testing true. </p> <p> I am, therefore, reluctant to provide a workaround. If we provide one --- and I'm not sure we will --- we would probably limit the workaround to this compiler and platform only. Can anyone provide clear and unique preprocessor defines for detecting this compiler and this platform only? </p> <p> Thanks for your help and best regards, Chris </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Zok</dc:creator> <pubDate>Fri, 23 Jan 2015 14:26:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:10</guid> <description> <p> Hey, is that what you asking? (Sorry, if I misunderstood) </p> <pre class="wiki">#if defined(__sun) &amp;&amp; defined(__SVR4) Check for std::numeric_limits&lt;T&gt;::has_infinity std::numeric_limits&lt;T&gt;::has_quiet_NaN std::numeric_limits&lt;T&gt;::has_signaling_NaN #else Check for std::numeric_limits&lt;T&gt;::is_iec559 #endif </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 23 Jan 2015 19:06:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:11</guid> <description> <blockquote class="citation"> <p> Hey, is that what you asking? </p> </blockquote> <p> Yes. Thank you. </p> <p> #if defined(<span class="underline">sun) &amp;&amp; defined(</span>SVR4) </p> <blockquote> <p> <em> use infinity and NaN </em></p> </blockquote> <p> #else </p> <blockquote> <p> <em> use is_iec559 </em></p> </blockquote> <p> #endif </p> <p> Also: </p> <ul><li>What does <span class="underline">SVR4 mean? </span></li><li>Does the PP have a version represented numerically? </li></ul><p> Thank you and best regards, Chris </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Zok</dc:creator> <pubDate>Fri, 23 Jan 2015 20:56:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:12</guid> <description> <p> Oh good :), </p> <p> SVR4 means that it is System V Based (i.e Solaris, does not include obsolete BSD-based SunOS) </p> <p> As for the preprocessor, since I am on Solaris 12.3 <code>__SUNPRO_CC and __SUNPRO_C</code> are 0x5120 </p> <p> For older versions:<br /> 10 : 0x570<br /> 11 : 0x580<br /> 12 : 0x590<br /> 12.1 : 0x5100<br /> 12.2 : 0x5100<br /> </p> <p> Thanks! </p> </description> <category>Ticket</category> </item> <item> <author>angela.xie@…</author> <pubDate>Sat, 31 Jan 2015 01:48:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:13</guid> <description> <p> this problem is only if compile with option -library=stlport4. there is no this problem if compile with -std=c++03 or -library=stdcxx4 </p> <p> Angela </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 05 Feb 2015 22:58:52 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:14</guid> <description> <blockquote class="citation"> <p> this problem is only if compile with option -library=stlport4. </p> </blockquote> <p> OK. Well that's interesting. What does STLport4 report for std::numeric_limits&lt;T&gt;::is_iec559 for float, double and long double ? </p> <blockquote class="citation"> <p> there is no this problem if compile with -std=c++03 </p> </blockquote> <p> OK. Thanks. </p> <blockquote class="citation"> <p> or -library=stdcxx4 </p> </blockquote> <p> OK. Do you know what stdcxx4 means ? Is it support for C++14 ? </p> <p> Cheers, Chris </p> </description> <category>Ticket</category> </item> <item> <author>angela.xie@…</author> <pubDate>Thu, 05 Feb 2015 23:04:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:15</guid> <description> <p> -library=stdcxx4 is Apache C++ Standard Library. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 06 Feb 2015 15:08:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:16</guid> <description> <p> It is completely opposite for me. </p> <p> <strong>-library=stlport4</strong> is the only option that returns <strong>true</strong> on: </p> <blockquote> <p> std::numeric_limits&lt;<strong>double</strong>&gt;::is_iec559 (i.e expected behavior) std::numeric_limits&lt;<strong>float</strong>&gt;::is_iec559 (i.e expected behavior) </p> </blockquote> <blockquote> <p> except this one I got false even with stlport4: </p> <blockquote> <p> std::numeric_limits&lt;<strong>long double</strong>&gt;::is_iec559 </p> </blockquote> </blockquote> <p> I got <strong>false</strong> for all three when specifying <strong>compat=5(-std=sun03)</strong> and <strong>compat=g(-std=c++03)</strong> options instead. </p> <p> Compiler version: </p> <blockquote> <p> Sun C++ 5.12 SunOS_sparc Patch 148506-18 2014/02/1 </p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 22 Feb 2015 19:16:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:17</guid> <description> <p> This should be fixed for Solaris on x86 in <a class="ext-link" href="https://github.com/boostorg/math/commit/1ef4e9c1c28b8d322f045c204ad25474bfde2221"><span class="icon">​</span>https://github.com/boostorg/math/commit/1ef4e9c1c28b8d322f045c204ad25474bfde2221</a> </p> <p> At least for me, the only combination that failed was when using STLPort, and then only the 80-bit long double case. I fixed by <em>not</em> making long double a "standard" type in that case. </p> <p> Which appears to just leave the Sparc case where none of the types are IEEE-compatible, is that right? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Zok</dc:creator> <pubDate>Tue, 24 Feb 2015 19:54:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:18</guid> <description> <p> So I guess, I would not be able to compile my code then :( </p> <p> Why can`t we just fix it for <strong>double</strong> and <strong>float</strong> as well? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Wed, 25 Feb 2015 08:53:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:19 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:19</guid> <description> <blockquote class="citation"> <p> So I guess, I would not be able to compile my code then :( Why can`t we just fix it for double and float as well? </p> </blockquote> <p> We need to figure out what the right thing to do is ;) </p> <p> I assume you're on Sparc then? </p> <p> I should have thought of this before - can you please compile and run libs/config/test/math_info.cpp and let us have the program output when run? If you can do that for each of the -library=stlport4, -library=apache4 and -std=c++11 options that would be great. It's a self contained program so from the command line in the Boost root directory it's just a: </p> <p> CC -I. &lt;option&gt; libs/config/test/math_info.cpp &amp;&amp; ./a.out </p> <p> As a temporary workaround - you casn either comment out the offending static_assert's or else revert boost/math/tools/big_constant.hpp to this version: <a class="ext-link" href="https://github.com/boostorg/math/blob/c08785d7dd8b5c2f5da53fece401099fd31f852f/include/boost/math/tools/big_constant.hpp"><span class="icon">​</span>https://github.com/boostorg/math/blob/c08785d7dd8b5c2f5da53fece401099fd31f852f/include/boost/math/tools/big_constant.hpp</a> </p> <p> Either should get the Boost.Math C-interface libraries building again for you </p> </description> <category>Ticket</category> </item> <item> <author>rsd@…</author> <pubDate>Tue, 31 Mar 2015 19:29:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:20 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:20</guid> <description> <p> Me Too </p> <p> After getting an inquiry from a customer I've been looking at this for the past day or so. The Cray C compiler has the same problem as the Sun C compiler. The current school of thought here is that flushing denormals to 0 is a reasonable optimization that the standard should not preclude. </p> </description> <category>Ticket</category> </item> <item> <author>rsd@…</author> <pubDate>Thu, 02 Apr 2015 16:06:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:21 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:21</guid> <description> <p> Ah, so I made a little test program, and figured out that g++ -ffast-math or icpc -O&lt;anything but 0&gt; DO set FTZ (and presumably DAZ) and flush to zero, but then they lie about it and set has_denorm to denorm_present anyway. </p> <p> So do I completely not understand this? Is there some interpretation of the standard that says it's compliant to zero denormals and still set has_denorm to denorm_present? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Thu, 02 Apr 2015 17:10:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10925#comment:22 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10925#comment:22</guid> <description> <p> I think the fundamental issue with flushing-to-zero is that this is potentially a runtime setting (certainly it is if you're using the x87 FPU, not so sure about the SSE instructions). So there's no way that the compile time constant numeric_limits::has_denorm can accurately reflect reality. IEC559 would give the definitive answer as to whether flush-to-zero is acceptible or not. </p> <p> BTW the issue here is when flush-to-zero <em>may</em> occur, but isn't absolutely guarenteed to <em>always</em> occur. That does genuinely make it hard to reason about some floating-point logic, though I agree it's a reasonable optimization. </p> </description> <category>Ticket</category> </item> </channel> </rss>