#8814 closed Bugs (fixed)
Atomic doesn't compile for QNX
| Reported by: | Owned by: | timblechmann | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | atomic |
| Version: | Boost 1.54.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
I had to modify the file base.hpp to get it compiled on QNX 6.5.0 (compiler qcc):
#ifdef QNX #include <stddef.h> #endif
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
This is the error message
Note that I try to compile with the command:
./b2 toolset=qcc target-os=qnx --with-atomic
$ ./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 <pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi>libboost_atomic.so.1.54.0 for lack of <pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi>lockpool.o...
...skipped <pstage/lib>libboost_atomic.so.1.54.0 for lack of <pbin.v2/libs/atomic/build/qcc/release/target-os-qnx/threading-multi>libboost_atomic.so.1.54.0...
...skipped <pstage/lib>libboost_atomic.so for lack of <pstage/lib>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 <pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi>libboost_atomic.a for lack of <pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi>lockpool.o...
...skipped <pstage/lib>libboost_atomic.a for lack of <pbin.v2/libs/atomic/build/qcc/release/link-static/target-os-qnx/threading-multi>libboost_atomic.a...
...failed updating 2 targets...
...skipped 5 targets...
...updated 13 targets...
comment:3 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
ok, pushed a workaround. thanks for reporting!
comment:4 by , 9 years ago
<cstddef> 'includes' stddef.h but does not necessarily put things into the global namespace.
ie when using <cstddef> your code should use std::ptrdiff_t not just the global ptrdiff_t.
The rule is that <cxxx> must put the <xxx.h> stuff into namespace std:: and *may* also put it into the global namespace.
Note:
See TracTickets
for help on using tickets.

funny. are you absolutely sure that this fixes the issue? maybe can you post the error message?
thing is that the code includes <cstddef> which afaict should be equivalent to including <stddef.h>.
iac, please either attach a patch or include trac code blocks to attach code, as dashes will underline normal text in trac.