Boost C++ Libraries: Ticket #8814: Atomic doesn't compile for QNX https://svn.boost.org/trac10/ticket/8814 <p> I had to modify the file base.hpp to get it compiled on QNX 6.5.0 (compiler qcc): </p> <p> #ifdef <span class="underline">QNX</span> #include &lt;stddef.h&gt; #endif </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8814 Trac 1.4.3 timblechmann Fri, 12 Jul 2013 08:48:07 GMT <link>https://svn.boost.org/trac10/ticket/8814#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8814#comment:1</guid> <description> <p> funny. are you absolutely sure that this fixes the issue? maybe can you post the error message? </p> <p> thing is that the code includes &lt;cstddef&gt; which afaict should be equivalent to including &lt;stddef.h&gt;. </p> <p> iac, please either attach a patch or include trac code blocks to attach code, as dashes will underline normal text in trac. </p> </description> <category>Ticket</category> </item> <item> <author>davide.faconti@…</author> <pubDate>Fri, 12 Jul 2013 12:02:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8814#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8814#comment:2</guid> <description> <p> This is the error message </p> <p> Note that I try to compile with the command:<br /> </p> <p> <strong>./b2 toolset=qcc target-os=qnx --with-atomic</strong> </p> <pre class="wiki">$ ./b2 toolset=qcc target-os=qnx --with-atomic Building the Boost C++ Libraries. Component configuration: - atomic : building - chrono : not building - context : not building - coroutine : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - log : not building - math : not building - mpi : not building - program_options : not building - python : not building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...patience... ...found 735 targets... ...updating 20 targets... common.mkdir stage common.mkdir stage/lib common.mkdir bin.v2 common.mkdir bin.v2/libs common.mkdir bin.v2/libs/atomic common.mkdir bin.v2/libs/atomic/build common.mkdir bin.v2/libs/atomic/build/qcc common.mkdir bin.v2/libs/atomic/build/qcc/release common.mkdir bin.v2/libs/atomic/build/qcc/release/target-os-qnx common.mkdir bin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi qcc.compile.c++ bin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi/lockpool.o In file included from ./boost/atomic/detail/gcc-x86.hpp:198, from ./boost/atomic/detail/platform.hpp:20, from ./boost/atomic/atomic.hpp:17, from ./boost/atomic.hpp:12, from libs/atomic/src/lockpool.cpp:1: ./boost/atomic/detail/base.hpp:396: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/base.hpp:452: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:461: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:476: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:476: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:488: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/base.hpp:551: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:562: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:573: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:573: error: 'difference_type' has not been declared In file included from ./boost/atomic/detail/platform.hpp:20, from ./boost/atomic/atomic.hpp:17, from ./boost/atomic.hpp:12, from libs/atomic/src/lockpool.cpp:1: ./boost/atomic/detail/gcc-x86.hpp:820: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/gcc-x86.hpp:889: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:901: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:906: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:906: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:918: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/gcc-x86.hpp:988: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1001: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1012: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1012: error: 'difference_type' has not been declared cc: /opt/qnx650/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/cc1plus error 1 "QCC" -Wc,-ftemplate-depth-128 -O3 -Wc,-finline-functions -Wc,-Wno-inline -shared -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi/lockpool.o" "libs/atomic/src/lockpool.cpp" ...failed qcc.compile.c++ bin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi/lockpool.o... ...skipped &lt;pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi&gt;libboost_atomic.so.1.54.0 for lack of &lt;pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi&gt;lockpool.o... ...skipped &lt;pstage/lib&gt;libboost_atomic.so.1.54.0 for lack of &lt;pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi&gt;libboost_atomic.so.1.54.0... ...skipped &lt;pstage/lib&gt;libboost_atomic.so for lack of &lt;pstage/lib&gt;libboost_atomic.so.1.54.0... common.mkdir bin.v2/libs/atomic/build/qcc/release/link-static common.mkdir bin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx common.mkdir bin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi qcc.compile.c++ bin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi/lockpool.o In file included from ./boost/atomic/detail/gcc-x86.hpp:198, from ./boost/atomic/detail/platform.hpp:20, from ./boost/atomic/atomic.hpp:17, from ./boost/atomic.hpp:12, from libs/atomic/src/lockpool.cpp:1: ./boost/atomic/detail/base.hpp:396: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/base.hpp:452: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:461: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:476: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:476: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:488: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/base.hpp:551: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:562: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:573: error: 'difference_type' has not been declared ./boost/atomic/detail/base.hpp:573: error: 'difference_type' has not been declared In file included from ./boost/atomic/detail/platform.hpp:20, from ./boost/atomic/atomic.hpp:17, from ./boost/atomic.hpp:12, from libs/atomic/src/lockpool.cpp:1: ./boost/atomic/detail/gcc-x86.hpp:820: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/gcc-x86.hpp:889: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:901: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:906: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:906: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:918: error: 'ptrdiff_t' does not name a type ./boost/atomic/detail/gcc-x86.hpp:988: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1001: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1012: error: 'difference_type' has not been declared ./boost/atomic/detail/gcc-x86.hpp:1012: error: 'difference_type' has not been declared cc: /opt/qnx650/host/linux/x86/usr/lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/cc1plus error 1 "QCC" -Wc,-ftemplate-depth-128 -O3 -Wc,-finline-functions -Wc,-Wno-inline -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi/lockpool.o" "libs/atomic/src/lockpool.cpp" ...failed qcc.compile.c++ bin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi/lockpool.o... ...skipped &lt;pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi&gt;libboost_atomic.a for lack of &lt;pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi&gt;lockpool.o... ...skipped &lt;pstage/lib&gt;libboost_atomic.a for lack of &lt;pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi&gt;libboost_atomic.a... ...failed updating 2 targets... ...skipped 5 targets... ...updated 13 targets... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>timblechmann</dc:creator> <pubDate>Sat, 13 Jul 2013 09:20:06 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8814#comment:3 https://svn.boost.org/trac10/ticket/8814#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> ok, pushed a workaround. thanks for reporting! </p> Ticket anonymous Wed, 07 Aug 2013 19:25:42 GMT <link>https://svn.boost.org/trac10/ticket/8814#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8814#comment:4</guid> <description> <p> &lt;cstddef&gt; 'includes' stddef.h but does not necessarily put things into the global namespace. </p> <p> ie when using &lt;cstddef&gt; your code should use std::ptrdiff_t not just the global ptrdiff_t. </p> <p> The rule is that &lt;cxxx&gt; must put the &lt;xxx.h&gt; stuff into namespace std:: and *may* also put it into the global namespace. </p> </description> <category>Ticket</category> </item> </channel> </rss>