2017-05-13 68 views
1

我需要交叉編譯power-pc的boost庫。針對power-pc交叉編譯boost庫

請在下面找到我的腳步,我執行讓它運行:

我已經

  1. 下載升壓1.61
  2. 打開包裝在/ home/emh2
  3. 並執行sudo ./home/bootstrap.sh增加建設者b2
  4. Boost.Builder b2已成功創建。

交叉編譯PowerPC的BT-Linux的gnuspe-G ++位於以下路徑:

的/ usr /本地/交叉/ i686的-BT-的Linux的/ usr /斌/ PowerPC的BT-Linux的gnuspe/

的包括用於交叉編譯器目錄如下

的/ usr /本地/的CRO s/ppce500v2-bt-linux-gnuspe/usr/include/C++/5.2.0/powerpc -bt-linux-gnuspe

/usr/local/cross/ppce500v2 -bt-linux-gnuspe/usr/include/C++/5.2.0/

在/ usr /本地/交叉/ ppce500v2-BT-Linux的gnuspe/usr/include目錄/

接下來我在創建的/ home用戶配置.jam,含以下內容:

using gcc 
: ppc 
: /usr/local/cross/i686-bt-linux/usr/bin/powerpc-bt-linux-gnuspe/powerpc-bt-linux-gnuspe-g++ 
: <compilerflags>-I/usr/local/cross/ppce500v2-bt-linux-gnuspe/usr/include/c++/5.2.0/powerpc-bt-linux-gnuspe -I/usr/local/cross/ppce500v2-bt-linux-gnuspe/usr/include/c++/5.2.0/ -I/usr/local/cross/ppce500v2-bt-linux-gnuspe/usr/include/ ; 

後來我開始交叉編譯與

./b2工具包= GCC-PPC --with日誌

這裏是指示輸出,一個文件/目錄無法找到:

Performing configuration checks 
- 32-bit     : yes (cached) 
- arm      : no (cached) 
- mips1     : no (cached) 
- power     : yes (cached) 

Building the Boost C++ Libraries. 
- symlinks supported  : yes (cached) 
- compiler-supports-visibility : yes (cached) 
- has_icu builds   : no (cached) 
- lockfree boost::atomic_flag : no (cached) 
Component configuration: 

- atomic     : not building 
- chrono     : not building 
- container    : not building 
- context     : not building 
- coroutine    : not building 
- coroutine2    : 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 
- log      : building 
- math      : not building 
- metaparse    : 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     : not building 
- test      : not building 
- thread     : not building 
- timer     : not building 
- type_erasure    : not building 
- wave      : not building 
...patience... 
...patience... 
...patience... 
...patience... 
...found 4056 targets... 
...updating 208 targets... 
gcc.compile.c++ bin.v2/libs/atomic/build/gcc-ppc/release/threading- multi/lockpool.o 
libs/atomic/src/lockpool.cpp:15:19: fatal error: cstddef: No such file or directory 
compilation terminated. 

"/usr/local/cross/i686-bt-linux/usr/bin/powerpc-bt-linux-gnuspe/powerpc-bt-linux-gnuspe-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -m32 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/gcc-ppc /release/threading-multi/lockpool.o" "libs/atomic/src/lockpool.cpp" 

...failed gcc.compile.c++ bin.v2/libs/atomic/build/gcc-ppc/release/threading- multi/lockpool.o... 
...skipped <pbin.v2/libs/atomic/build/gcc-ppc/release/threading- multi>libboost_atomic.so.1.61.0 for lack of <pbin.v2/libs/atomic/build/gcc-ppc /release/threading-multi>lockpool.o... 
...skipped <pstage/lib>libboost_atomic.so.1.61.0 for lack of <pbin.v2/libs /atomic/build/gcc-ppc/release/threading-multi>libboost_atomic.so.1.61.0... 
...skipped <pstage/lib>libboost_atomic.so for lack of <pstage/lib>libboost_atomic.so.1.61.0... 
gcc.compile.c++ bin.v2/libs/date_time/build/gcc-ppc/release/threading- multi/gregorian/greg_month.o 
In file included from ./boost/date_time/gregorian/greg_month.hpp:12:0, 
      from libs/date_time/src/gregorian/greg_month.cpp:14: 
./boost/date_time/constrained_value.hpp:12:21: fatal error: exception: No such file or directory 
compilation terminated. 

我在這裏錯過了什麼?爲什麼我會得到這些「沒有這樣的文件或目錄」錯誤?

回答

0

首先,我會跑

./b2 --debug-configuration -n 

描述here。這應該允許您確認b2抓取正確的卡紙文件。它在/ home/user /中查找user-config.jam,因此如果它不存在,您可能需要將其移至該目錄。

此外,我發現自己需要寫出<compileflag>-option1 <compileflag>-option2 etc...可能有一種方法可以傳遞整個字符串的選項,但只是在單個<compileflags>似乎無效後將它們分開。

輸出顯示您正在運行的完整編譯命令。你應該看到你的編譯標誌出現在那裏,並可以用它來驗證你的jam文件語法是否正常工作。

在你上面的輸出,您可以您的預期,包括沒有顯示出來

"/usr/local/cross/i686-bt-linux/usr/bin/powerpc-bt-linux-gnuspe/powerpc-bt-linux-gnuspe-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -m32 -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG -I"." -c -o "bin.v2/libs/atomic/build/gcc-ppc /release/threading-multi/lockpool.o" "libs/atomic/src/lockpool.cpp"