PowerPCアーキテクチャ用のBoostライブラリ(スレッド、システム)をクロスコンパイルしようとしています。以下の手順に従いましたが、問題が発生しました。
ツールチェーンを設定するシェルスクリプトを実行します。コンパイラppc_4xx-g++はシェルに表示されます。
続く手順:
- 「usinggcc:power:ppc_4xx-g++;」という行を追加します。ファイルuser-config.jamに
- ルートディレクトリで./bootstrap.sh--prefix=BoostPowerPCを実行します。
- ./b2 install --build-dir = BoostPowerPC toolset = gcc-power --with-thread--with-systemstageを実行します
結果:すべてのディレクトリが作成されますが、コンパイルは失敗します。エラーログを添付できません(必要に応じてエラーログを送信できるように、メールを送ってください)。以下は、エラーログのスナップショットです。
Component configuration:
- atomic : not building
- chrono : not building
- context : 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
- 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 : building
- test : not building
- thread : building
- timer : not building
- wave : not building
...patience...
...found 20376 targets...
...updating 10110 targets...
common.mkdir BoostPowerPC
common.mkdir BoostPowerPC/lib
common.mkdir BoostPowerPC/boost
common.mkdir BoostPowerPC/boost/bin.v2
common.mkdir BoostPowerPC/boost/bin.v2/libs
common.mkdir BoostPowerPC/boost/bin.v2/libs/system
common.mkdir BoostPowerPC/boost/bin.v2/libs/system/build
common.mkdir BoostPowerPC/boost/bin.v2/libs/system/build/gcc-power
common.mkdir BoostPowerPC/boost/bin.v2/libs/system/build/gcc-power/release
common.mkdir BoostPowerPC/boost/bin.v2/libs/system/build/gcc-power/release/threading-multi
gcc.compile.c++ BoostPowerPC/boost/bin.v2/libs/system/build/gcc-power/release/threading-multi/error_code.o
In file included from ./boost/config/select_stdlib_config.hpp:18,
from ./boost/config.hpp:40,
from ./boost/system/config.hpp:13,
from libs/system/src/error_code.cpp:18:
/opt/ELDK/4.2/ppc_4xx/usr/include/c++/4.2.2/cstddef:50:28: error: bits/c++config.h: No such file or directory
In file included from /opt/ELDK/4.2/ppc_4xx/usr/include/c++/4.2.2/ios:43,
from /opt/ELDK/4.2/ppc_4xx/usr/include/c++/4.2.2/ostream:45,
from /opt/ELDK/4.2/ppc_4xx/usr/include/c++/4.2.2/iterator:70,
from ./boost/iterator.hpp:17,
from ./boost/operators.hpp:86,
from ./boost/system/error_code.hpp:17,
from libs/system/src/error_code.cpp:19:
.
.
.
ファイルc++config.hが見つからないという不満。ただし、ファイルは/opt/ELDK/4.2/usr/include/c++/4.2.2/powerpc-linux/bitsディレクトリにあります。
次に、b2コマンドでタグ「include」を使用しようとしました。しかし、ディレクトリ/opt/ELDK/4.2/usr/include/c++/4.2.2にあるファイルcstddefが見つからないというエラーが表示されます。インクルードパスを書きすぎていると思います。
何が問題だと思いますか?ファイルが存在していても、コンパイラがファイルを見つけられないのはなぜですか?助言がありますか ?
アップデート:
-d + 2および-qオプションを使用しましたが、以下が結果です。
"ppc_4xx-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DNDEBUG -I"." -I"/opt/ELDK/4.2/ppc_4xx/usr/include" -c -o "BoostPowerPC/boost/bin.v2/libs/system/build/gcc-power/release/threading-multi/error_code.o" "libs/system/src/error_code.cpp"
コンパイルログ:
In file included from ./boost/config/select_stdlib_config.hpp:18,
from ./boost/config.hpp:40,
from ./boost/system/config.hpp:13,
from libs/system/src/error_code.cpp:18:
/opt/ELDK/4.2/ppc_4xx/usr/include/c++/4.2.2/cstddef:50:28: error: bits/c++config.h: No such file or directory
ご覧のとおり、必要なファイルが含まれている上位ディレクトリが含まれており、コンパイラに表示されます。-Lコマンドを使用して、ルートディレクトリを指定してみました。それでも役に立たなかった。
私はppc_4xx-g++のコンパイルオプションをチェックし、2つのオプションに興味がありました
--sysroot =:これは、コンパイラが使用するすべてのインクルードとライブラリのルートディレクトリです。
-B:これを使用して、コンパイラの検索パスを追加できます。
私は両方を試しましたが、役に立ちませんでした。助言がありますか ?