■前提
・Windwos10 Pro
・VisualStudio2009 Pro版SP無し
・boostv1.72.0をダウンロードする
https://www.boost.org/users/download/
■手順
1.bootstrap.batの実行
以下手順で、コマンドプロンプトを起動する
スタート > Microsoft Visual Studio 2008 > Visual Studio 2008 コマンド プロンプト
2.> cd <解凍したディレクトリ>
3.以下のコマンドを実行する
> bootstrap.bat
以下のエラーメッセージが表示される
-----------------------------------------------------------------------------
Building Boost.Build engine
ファイルが見つかりません
Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.
------------------------------------------------------------------------------
4.bootstrap.batの同階層フォロダにbootstrap.logが生成される。
bootstrap.logに以下、error1,error2,error3が出力される。
error1
------------------------------------------------------------------------------
c:\build_trial\boost_1_72_0\tools\build\src\engine\sysinfo.h(41) : error C2864: 'b2::system_info::cpu_core_count_' : static const int データ メンバ以外をクラス内で初期化することはできません
------------------------------------------------------------------------------
error2
------------------------------------------------------------------------------
c:\build_trial\boost_1_72_0\tools\build\src\engine\sysinfo.h(42) : error C2864: 'b2::system_info::cpu_thread_count_' : static const int データ メンバ以外をクラス内で初期化することはできません
------------------------------------------------------------------------------
error3
------------------------------------------------------------------------------
sysinfo.cpp(10) : fatal error C1083: include ファイルを開けません。'thread': No such file or directory
------------------------------------------------------------------------------
error1・error2の直し方
boost_1_72_0\tools\build\src\engine\sysinfo.h
sysinfo.h
[before]
------------------------------------------------------------------------------
unsigned int cpu_core_count_ = 0;
unsigned int cpu_thread_count_ = 0;
------------------------------------------------------------------------------
[after]
------------------------------------------------------------------------------
unsigned int cpu_core_count_;
unsigned int cpu_thread_count_;
------------------------------------------------------------------------------
boost_1_72_0\tools\build\src\engine\sysinfo.cpp
[before]
------------------------------------------------------------------------------
b2::system_info::system_info()
{
}
------------------------------------------------------------------------------
[after]
------------------------------------------------------------------------------
b2::system_info::system_info()
{
cpu_core_count_ = 0;
cpu_thread_count_ = 0;
}
------------------------------------------------------------------------------
[before]
------------------------------------------------------------------------------
#include ...(省略)
unsigned int std_thread_hardware_concurrency()
{
return std::thread::hardware_concurrency();
}
------------------------------------------------------------------------------
[after]
------------------------------------------------------------------------------
// #include...(省略)
unsigned int std_thread_hardware_concurrency()
{
//return std::thread::hardware_concurrency();
return 0;//この値は処理系のスレット上限になるみたい
}
------------------------------------------------------------------------------
■補足
Visual Studo2008にて、Boost1.72.0のコンパイルに失敗するケースがある。
要因はboostのバグ。
修正差分コード
https://github.com/boostorg/stacktrace/commit/7379a5cc08e578a5c33cf8a0e3f8d00075f6a1d6
修正ファイル
https://github.com/boostorg/stacktrace/blob/develop/include/boost/stacktrace/detail/frame_msvc.ipp
修正ファイル
https://github.com/boostorg/stacktrace/blob/develop/include/boost/stacktrace/detail/frame_msvc.ipp
0 件のコメント:
コメントを投稿