未能生成boost库
boost-libs failed to be built
本文关键字:boost 更新时间:2023-10-16
在源代码安装boost-libs
(链接到cvs repo)期间,我在bmake(我使用的包管理器pkgsrc
中使用的make
)的长输出的最后得到以下内容,构建似乎失败了:
...skipped <pbin.v2/libs/wave/build/gcc-4.4.2/release/link-static/threading-multi>libboost_wave.a for lack of <pbin.v2/libs/wave/build/gcc-4.4.2/release/link-static/threading-multi>instantiate_cpp_exprgrammar.o...
...skipped <pstage/lib>libboost_wave.a for lack of <pbin.v2/libs/wave/build/gcc-4.4.2/release/link-static/threading-multi>libboost_wave.a...
...failed updating 181 targets...
...skipped 280 targets...
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/devel/boost-libs
*** Error code 1
我注意到,在成千上万的输出行(完整输出)中,一些错误行重复出现。我只是排除了一些(它们不会像下面那样背靠背出现):
g++: unrecognized option '-pthread'
./boost/cstdint.hpp:74: error: 'intleast8_t' in namespace '::' does not name a type
./boost/cstdint.hpp:76: error: 'uintleast8_t' in namespace '::' does not name a type
./boost/chrono/detail/inlined/posix/chrono.hpp:23: error: '::clock_gettime' has not been declared
./boost/chrono/detail/inlined/posix/chrono.hpp:36: error: '::clock_gettime' has not been declared
./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp:31: error: '::sysconf' has not been declared
./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp:31: error: '_SC_CLK_TCK' was not declared in this scope
/usr/qnx650/host/qnx6/x86/usr/bin/ntox86-ld: cannot find -lrt
./boost/smart_ptr/detail/yield_k.hpp:123: error: 'nanosleep' was not declared in this scope
./boost/thread/pthread/timespec.hpp:84: error: '::clock_gettime' has not been declared
./boost/thread/pthread/mutex.hpp:275: error: 'boost::chrono::steady_clock' has not been declared
libs/filesystem/src/operations.cpp: In function 'bool<unnamed>::remove_directory(const boost::filesystem::path&)':
libs/filesystem/src/operations.cpp:345: error: '::rmdir' has not been declared
libs/filesystem/src/operations.cpp:348: error: '::unlink' has not been declared
libs/filesystem/src/operations.cpp:427: error: no matching function for call to 'stat::stat(const char*, stat*)'
libs/filesystem/src/operations.cpp:1003: error: '::symlink' has not been declared
```
其他与boost
相关的包(即boost-headers、boost-cam、boost-docs、boost-build)已经构建并安装。boost-python
失败了,但我认为它不依赖。
使用QNX
6.5.0 SDP SP1
谢谢。
更新)回复@Igor R的评论。在许多像这样发现的stdint.h
中:
# find /usr -iname 'stdint.h'
/usr/share/pkgsrc/archivers/gtar-base/work/tar-1.26/gnu/stdint.h
/usr/qnx650/target/qnx6/usr/include/c++/4.4.2/tr1/stdint.h
/usr/qnx650/target/qnx6/usr/include/stdint.h
/usr/include/c++/4.4.2/tr1/stdint.h
/usr/include/stdint.h
在我看来intleast8_t
是在/usr/include/stdint.h
:中定义的
# more /usr/include/stdint.h
:
#if defined(__EXT_QNX)
/*
* These types are deprecated and applications should use the
* int_/uint_ types defined below.
*/
typedef _Intleast8t intleast8_t;
typedef _Uintleast8t uintleast8_t;
Boost假设QNX定义了非标准类型名称:
#ifdef __QNX__
// QNX (Dinkumware stdlib) defines these as non-standard names.
// Reflect to the standard names.
typedef ::intleast8_t int_least8_t;
typedef ::intfast8_t int_fast8_t;
但根据您在/usr/include/stdint.h
中看到的内容,QNX已经否决了这些类型,现在只有在定义了__EXT_QNX
的情况下才能定义它们。因此,以下boost/cstdint.hpp
的特别补丁可能会有所帮助:
9 9 # endif
10 10
11 - #ifdef __QNX__
11 + #if defined(__QNX__) && defined(__EXT_QNX)
12 12
13 13 // QNX (Dinkumware stdlib) defines these as non-standard names.
然而,更好的方法是了解标准类型的QNX版本,并定义更稳健的条件。
相关文章:
- 理解boost::asio-async_read在无需读取内容时的行为
- boost::进程间消息队列引发错误
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- cmake如何在fedora工作站中找到boost静态库包
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- Boost Graph Library,修复节点大小
- 什么是"#include <boost/functional/hash.hpp> "?
- 基于boost的程序的静态链接——zlib问题
- C++:如何在CLion IDE中安装Boost
- C++Boost Asio Pool线程,带有lambda函数和传递引用变量
- 如何在boost beast http请求中设置http头
- Boost Spirit,获取迭代器内部语义动作
- boost::asio::steady_timer()与sleep()我应该使用哪一个
- boost::asio如何生成多个协同程序,然后加入它们
- 当我尝试使用 sstream 和分面将 Boost Time_duration转换为字符串时,我没有得到所需的格式
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头
- 如何使用boost::具有嵌套结构和最小代码更改的序列化
- 使用Boost Interprocess创建托管共享内存需要很长时间
- Boost::posix_time::ptime舍入到给定的分钟数
- boost xml parsingl将xml的路径作为变量发送