Boost C++ Libraries: Ticket #8265: quadmath.h not found on clang https://svn.boost.org/trac10/ticket/8265 <p> When trying to compile: </p> <pre class="wiki">#include &lt;boost/math/special_functions/sign.hpp&gt; </pre><p> with clang, I get the following compiler error: </p> <pre class="wiki">In file included from test.cpp:1: In file included from boost/math/special_functions/sign.hpp:16: boost/math/tools/config.hpp:215:10: fatal error: 'quadmath.h' file not found #include &lt;quadmath.h&gt; ^ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8265 Trac 1.4.3 John Maddock Fri, 08 Mar 2013 11:33:09 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8265#comment:1 https://svn.boost.org/trac10/ticket/8265#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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83356" title="Remove dependency on quadmath.h. Fixes #8265.">[83356]</a>) Remove dependency on quadmath.h. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8265" title="#8265: Bugs: quadmath.h not found on clang (closed: fixed)">#8265</a>. </p> Ticket Nathan Ridge Sat, 09 Mar 2013 00:28:24 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/8265#comment:2 https://svn.boost.org/trac10/ticket/8265#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Thanks for the fix. Unfortunately, the example given in the description still doesn't compile with clang. This time the error is: </p> <pre class="wiki">In file included from test.cpp:1: In file included from boost/math/special_functions/sign.hpp:17: In file included from boost/math/special_functions/math_fwd.hpp:28: boost/math/policies/policy.hpp:819:18: error: use of undeclared identifier '__float128' struct precision&lt;__float128, Policy&gt; ^ </pre> Ticket John Maddock Sat, 09 Mar 2013 09:21:43 GMT <link>https://svn.boost.org/trac10/ticket/8265#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:3</guid> <description> <p> OK some more questions: </p> <ul><li>Do you know if it's possible to detect when clang supports <code>__float128</code>? Recent SVN Trunk versions certainly do so? </li><li>Presumably your version can't handle libstdc++ as that also refers to <code>__float128</code> in &lt;type_traits&gt; ? </li><li>Which clang version are you using also? </li></ul><p> Thanks! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Sat, 09 Mar 2013 09:59:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8265#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:4</guid> <description> <p> I am using a very recent clang (version 3.3, trunk revision 176405). I am using it with libstdc++, which it handles just fine. The libstdc++ version it uses is from a recent GCC build (4.8.0 20130224). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Sat, 09 Mar 2013 10:21:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8265#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:5</guid> <description> <p> Regarding &lt;type_traits&gt;, I did a bit of digging and discovered the following: </p> <ul><li>&lt;type_traits&gt; can only be used in C++11 mode (obviously) </li><li>There are two flags that get clang to operate in C++11 mode: -std=c++11 and -std=gnu++11. If the -std=c++11 flag is used, the symbol <code>__STRICT_ANSI__</code> gets defined. If the -std=gnu++11 flag is used, that symbol does not get defined. </li><li>The use of <code>__float128</code> in &lt;type_traits&gt; is guarded by <code>!defined(__STRICT_ANSI__)</code> </li><li>I usually compile my code with the -std=c++11 flag. In this configuration, &lt;type_traits&gt; compiles just fine. If I change the flag to -std=gnu++11, I get the same error about <code>__float128</code> in &lt;type_traits&gt; that I get with Boost.Math. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Nathan Ridge</dc:creator> <pubDate>Sat, 09 Mar 2013 10:27:01 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8265#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:6</guid> <description> <p> A quick google search suggests that clang doesn't have any support for <code>__float128</code> yet. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 09 Mar 2013 11:17:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8265#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:7</guid> <description> <p> You're right, I found this open bug report: <a class="ext-link" href="http://llvm.org/bugs/show_bug.cgi?id=13530"><span class="icon">​</span>http://llvm.org/bugs/show_bug.cgi?id=13530</a> on this very issue. So I'll unconditionally disable <span class="underline">float128 support when the compiler is clang for now. </span></p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 09 Mar 2013 11:32:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8265#comment:8 https://svn.boost.org/trac10/ticket/8265#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83369" title="Restrict __float128 support to GCC only for now. Fixes #8265.">[83369]</a>) Restrict <span class="underline">float128 support to GCC only for now. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8265" title="#8265: Bugs: quadmath.h not found on clang (closed: fixed)">#8265</a>. </span></p> Ticket anonymous Fri, 02 Feb 2018 14:34:14 GMT <link>https://svn.boost.org/trac10/ticket/8265#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:9</guid> <description> <p> I have the same problem, but with float128, can you help me, please? </p> <p> /usr/local/include/boost/multiprecision/float128.hpp:40:10: fatal error: </p> <blockquote> <p> 'quadmath.h' file not found </p> </blockquote> <p> #include &lt;quadmath.h&gt; </p> <blockquote> <p> <sup><del></del><del></del><del>~ </del></sup></p> </blockquote> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 02 Feb 2018 17:08:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8265#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8265#comment:10</guid> <description> <p> clang has no support for <span class="underline">float128 and libquadmath, so you're out of luck: that header is supported by gcc and Intel compilers only. </span></p> </description> <category>Ticket</category> </item> </channel> </rss>