3

boost-libs( cvs repo へのリンク ) のソース インストール中に、bmake の長い出力 (私が使用makeするパッケージ マネージャーpkgsrcで使用されます) の最後に次のメッセージが表示され、ビルドが失敗するようです:

...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

何千もの出力行 ( full output ) のうち、いくつかのエラー行が繰り返し表示されることに気付きました。私はいくつかを除いています(それらは次のように連続して発生しません):

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-jam、boost-docs、boost-build) は既にビルドされ、インストールされています。boost-python失敗しますが、依存していないと思います。

QNX6.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;
4

1 に答える 1

2

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 のどのバージョンから標準タイプが利用可能になっているかを理解し、より堅牢な条件を定義することです。

于 2013-07-16T08:32:59.837 に答える