2

取り組みたいオープンソース プロジェクトの一部としてブースト ライブラリを構築しようとしています。

C:\boost_1_55_0>bootstrap.bat gcc
Building Boost.Build engine

Bootstrapping is done. To build, run:

    .\b2

[snip]

C:\boost_1_55_0>b2.exe --toolset=gcc
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
BOOST_ROOT must be set, either in the environment, or
on the command-line with -sBOOST_ROOT=..., to the root
of the boost installation.

Attempted search from C:\boost_1_55_0 up to the root
at C:/share/boost-build
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: c:/boost_1_55_0.
Please consult the documentation at 'http://www.boost.org'.

C:\boost_1_55_0>dir *.jam
 [snip]

 Directory of C:\boost_1_55_0

09/21/2013  01:17 PM               866 boost-build.jam
09/21/2013  01:17 PM            18,083 boostcpp.jam
12/16/2013  03:36 PM                76 project-config.jam
               3 File(s)         19,025 bytes
               0 Dir(s)  34,868,432,896 bytes free

ツールセットは MinGW/gcc で、%PATH% に正しくあります。

基本的に、どういうわけか、ブーストは現在のディレクトリにboost-build.jamあるファイルを認識していません。

適切に設定したことに注意してくださいBOOST_ROOT

C:\boost_1_55_0>echo %BOOST_ROOT%
c:/boost_1_55_0

私はここで私の機知に富んでいます。バックスラッシュとスラッシュのさまざまな順列を試しました。また、からのエラーメッセージb2には path が含まれていますがC:/share/boost-build、どこから来たのかわかりません。コードベース全体を完全に検索しましたが、それを指定している可能性のある構成ファイルがどこにもありません。


それで、Boost.Build が必要になるのでしょうか?

とにかく、こちらの指示に従ってBoost.Build をビルドすると、まったく同じ問題が発生します。

C:\boost_1_55_0\tools\build\v2>echo %BOOST_ROOT%
C:/boost_1_55_0

C:\boost_1_55_0\tools\build\v2>bootstrap.bat gcc
Bootstrapping the build engine

Bootstrapping is done. To build, run:

    .\b2 --prefix=DIR install


C:\boost_1_55_0\tools\build\v2>b2 --toolset=gcc --prefix=c:/pathutils install
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
BOOST_ROOT must be set, either in the environment, or
on the command-line with -sBOOST_ROOT=..., to the root
of the boost installation.

Attempted search from C:\boost_1_55_0\tools\build\v2 up to the root
at C:/boost_1_55_0/tools/build/share/boost-build
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: C:\boost_1_55_0\tools\build\v2\test\startup\boost-root\build, C:/boost_1_55_0.
Please consult the documentation at 'http://www.boost.org'.
4

4 に答える 4

1

ええと、コンピューターの何かが何らかの形%PATH%でブーストを壊しているとしか思えません。

クリーンな VM で同じセットアップ手順を実行したところ、正常にコンパイルされているようです。

具体的に何が悪いのかわかりません。

于 2013-12-21T09:57:02.893 に答える
1

Jamfile を探しているわけではありません。サポートする jam スクリプトが含まれている、boost.build tools サブディレクトリを探します。Linux では、これはデフォルトで「/usr/share/boost-build/」になります。Windows では、おそらくBOOST_BUILD_PATH、boost.build をサポートするスクリプトがインストールされている場所を指すように設定する必要があります。

http://www.boost.org/doc/libs/1_55_0/doc/html/bbv2/reference.html

于 2013-12-17T00:49:54.240 に答える
0

これはかなり古い質問のように見えますが、誰かに役立つ場合は、同じ問題が発生しました。これは、/boost ディレクトリにいたが、/boost/boost にいる必要があったために発生しました。ディレクトリをサブディレクトリに変更し、./bootstrap に続いて ./b2 ヘッダーを実行すると、正常に動作しました。

/boost ディレクトリにいるときに ./bootstrap が機能していたことを少し混乱させましたが、これで終わりです。

于 2020-06-05T16:40:40.237 に答える