Boost C++ Libraries: Ticket #11160: failed to build Boost.Math library with cray compiler 8.3.6 on CLE5.2 https://svn.boost.org/trac10/ticket/11160 <p> This is quite similar to </p> <pre class="wiki">https://svn.boost.org/trac/boost/ticket/10925 </pre><p> Error is as follows: </p> <pre class="wiki"> CC -c -g -O0 -hgnu -fPIC -h system_alloc -h tolerant -h fp0 -static -DBOOST_ALL_NO_LIB=1 -I"." -I"libs/math/src/tr1" -o "/dev/shm/build-boost-tmp-cce_8.3.6/boost/bin.v2/libs/math/build/cray/debug/boost.locale.icu-off/link-static/runtime-link-static/assoc_legendre.o" "libs/math/build/../src/tr1/assoc_legendre.cpp" CC-70 crayc++: ERROR File = /dev/shm/boost_1_57_0/./boost/math/cstdfloat/cstdfloat_types.hpp, Line = 350 The indicated type is incomplete. BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::is_iec559 == true, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); ^ CC-70 crayc++: ERROR File = /dev/shm/boost_1_57_0/./boost/math/cstdfloat/cstdfloat_types.hpp, Line = 364 The indicated type is incomplete. BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::is_iec559 == true, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); </pre><p> I am getting around it for the time being with the following patch: </p> <pre class="wiki">--- boost_1_57_0/boost/math/cstdfloat/cstdfloat_types.hpp 2014-10-30 06:35:53.000000000 -0500 +++ boost_1_57_0.xom/boost/math/cstdfloat/cstdfloat_types.hpp 2015-03-30 14:58:00.000000000 -0500 @@ -347,7 +347,13 @@ typedef boost::float32_t float_fast32_t; typedef boost::float32_t float_least32_t; + #if defined(_CRAYC) + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::has_infinity == true, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::has_quiet_NaN == true, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::has_signaling_NaN == true, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + #else BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::is_iec559 == true, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + #endif BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::radix == 2, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::digits == 24, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float32_t&gt;::max_exponent == 128, "boost::float32_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); @@ -361,7 +367,13 @@ typedef boost::float64_t float_fast64_t; typedef boost::float64_t float_least64_t; + #if defined(_CRAYC) + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::has_infinity == true, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::has_quiet_NaN == true, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::has_signaling_NaN == true, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + #else BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::is_iec559 == true, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); + #endif BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::radix == 2, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::digits == 53, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); BOOST_STATIC_ASSERT_MSG(std::numeric_limits&lt;boost::float64_t&gt;::max_exponent == 1024, "boost::float64_t has been detected in &lt;boost/cstdfloat&gt;, but verification with std::numeric_limits fails"); </pre><p> The -h fp0 flags I'm using for this build is the "most standards compliant/least optimizing" floating-point flag I've found for this compiler. I'm also attempting to open a bug with Cray to address this issue, but in the meantime is there something I should be doing differently or is this patch at least "reasonable". </p> <p> Or is the write answer here not to attempt to provide Boost.Math to my users (for my 1.57 builds anyway). FWIW, I do believe this problem was introduced in 1.56... I've just never built it myself. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11160 Trac 1.4.3 John Maddock Tue, 31 Mar 2015 17:15:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11160#comment:1 https://svn.boost.org/trac10/ticket/11160#comment:1 <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> This will be fixed in the next release - in the sense that that header will no longer be included by the rest of Boost.Math, so you will only see the error if you explicitly include &lt;boost/cstdfloat.hpp&gt; and try to use those types. In that context, the error is probably justified if there are no IEC559-conforming floats on that system. </p> Ticket