Boost C++ Libraries: Ticket #7979: atomic library compilation error on 1.53.0 https://svn.boost.org/trac10/ticket/7979 <p> Hello, </p> <p> I can't compile boost::atomic in boost 1.53.0 version with buildroot trunk version, uClibc 0.9.33 and gcc 4.6.3. </p> <p> I think the problem comes from uClibc : "error: 'uintptr_t' was not declared in this scope". See attached compilation log for more information! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7979 Trac 1.4.3 victor.hiairrassary.ml@… Tue, 05 Feb 2013 12:15:31 GMT attachment set https://svn.boost.org/trac10/ticket/7979 https://svn.boost.org/trac10/ticket/7979 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_compilation_log</span> </li> </ul> <p> atomic compilation log </p> Ticket timblechmann Tue, 05 Feb 2013 12:26:57 GMT version changed https://svn.boost.org/trac10/ticket/7979#comment:1 https://svn.boost.org/trac10/ticket/7979#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> <p> related to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7823" title="#7823: Feature Requests: Support for intptr_t/uintptr_t (closed: obsolete)">#7823</a>, we basically just work around that bug manually. </p> <p> victor, i don't have a uclibc toolchain on my system, but can you try to change </p> <pre class="wiki">defined(_XOPEN_UNIX) &amp;&amp; (_XOPEN_UNIX+0 &gt; 0) </pre><p> to </p> <pre class="wiki">defined(_XOPEN_UNIX) &amp;&amp; (_XOPEN_UNIX+0 &gt; 0) &amp;&amp; !defined(__UCLIBC__) </pre> Ticket victor.hiairrassary.ml@… Tue, 05 Feb 2013 12:44:59 GMT <link>https://svn.boost.org/trac10/ticket/7979#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:2</guid> <description> <p> Thanks, this works fine (compilation finished successfully)! </p> <p> Will you commit it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>timblechmann</dc:creator> <pubDate>Tue, 05 Feb 2013 21:43:07 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7979#comment:3 https://svn.boost.org/trac10/ticket/7979#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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82754" title="atomic: uclibc doesn't seem to have intptr_t fixes #7979">[82754]</a>) atomic: uclibc doesn't seem to have intptr_t </p> <p> fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7979" title="#7979: Bugs: atomic library compilation error on 1.53.0 (closed: fixed)">#7979</a> </p> Ticket victor.hiairrassary.ml@… Wed, 06 Feb 2013 07:09:39 GMT <link>https://svn.boost.org/trac10/ticket/7979#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:4</guid> <description> <p> Thanks, but I don't agree so much with your commit, at least with your comment : indeed, uClibc have stdint.h file, which declare intptr_t and uintptr_t (see <a class="ext-link" href="http://git.uclibc.org/uClibc/tree/include/stdint.h"><span class="icon">​</span>http://git.uclibc.org/uClibc/tree/include/stdint.h</a> at line 118). </p> <p> So, maybe, there is a better way to solve this issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>timblechmann</dc:creator> <pubDate>Wed, 06 Feb 2013 08:48:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:5</guid> <description> <p> the correct way to solve it is to use &lt;boost/cstdint.hpp&gt; and boost::intptr_t ... however apparently that is broken and undermaintained, so we just work around this. unfortunately uclibc doesn't seem to be covered by the automatic tests, so i'd prefer to exclude functionality to be on the safe side </p> </description> <category>Ticket</category> </item> <item> <author>victor.hiairrassary.ml@…</author> <pubDate>Thu, 07 Feb 2013 15:02:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:6</guid> <description> <p> I understand the problem! </p> <p> Thanks for your answer! </p> </description> <category>Ticket</category> </item> <item> <author>david.heidelberger@…</author> <pubDate>Sat, 19 Oct 2013 23:13:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:7</guid> <description> <p> I having this problem with "boost/atomic/atomic.hpp:166:16: error: ‘uintptr_t’ was not declared in this scope". boost-1.53.0, glibc 2.18, gcc 4.9_20131013. </p> <p> ./boost/atomic/atomic.hpp:166:16: error: ‘uintptr_t’ was not declared in this scope ./boost/atomic/atomic.hpp:166:25: error: template argument 1 is invalid ./boost/atomic/atomic.hpp:166:43: error: invalid type in declaration before ‘’ token </p> </description> <category>Ticket</category> </item> <item> <author>hongli@…</author> <pubDate>Sun, 27 Oct 2013 17:41:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:8</guid> <description> <p> I confirm david.heidelberger's problem. I can reproduce it on today's Arch Linux release (2013-10-27), g++ 4.8.2, Boost 1.54.0, glibc instead of ulibc. </p> <p> The problem is still related to the _XOPEN_UNIX definition. It causes atomic.h to typedef "atomic&lt;uintptr_t&gt; atomic_uintptr_t". However, uintptr_t is not defined. This is because boost/cstdint.hpp does not include stdint.h due to this line: </p> <blockquote> <table class="wiki"> <tr>#if defined(BOOST_HAS_STDINT_H) &amp;&amp; (!defined(<span class="underline">GLIBC</span>) <td> defined(<span class="underline">GLIBC_HAVE_LONG_LONG)) </span></td></tr></table> </blockquote> <p> I don't know what's the proper way to fix this problem. Defining <span class="underline">GLIBC_HAVE_LONG_LONG works along the problem though. </span></p> <p> By the way, there is a duplicate here: <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/8973"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/8973</a> </p> </description> <category>Ticket</category> </item> <item> <author>hongli@…</author> <pubDate>Sun, 27 Oct 2013 18:36:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:9</guid> <description> <p> Modifying boost/atomic/atomic.hpp as follows also solves the compilation problem: </p> <pre class="wiki">- || (defined(_XOPEN_UNIX) &amp;&amp; (_XOPEN_UNIX+0 &gt; 0) &amp;&amp; !defined(__UCLIBC__)) \ + || (defined(_XOPEN_UNIX) &amp;&amp; (_XOPEN_UNIX+0 &gt; 0) &amp;&amp; !defined(__UCLIBC__) &amp;&amp; !defined(__GLIBC__)) \ </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>timblechmann</dc:creator> <pubDate>Sun, 27 Oct 2013 18:40:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:10</guid> <description> <p> as mentioned in the other bug, can you try boost-trunk? </p> </description> <category>Ticket</category> </item> <item> <author>hongli@…</author> <pubDate>Sun, 27 Oct 2013 18:46:10 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7979#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7979#comment:11</guid> <description> <p> Yes boost-trunk compiles without problems. </p> </description> <category>Ticket</category> </item> </channel> </rss>