(轉)編譯android5.1,添加swap分區的方法


clang++: error: unable to execute command: Killed
clang++: error: assembler command failed due to signal (use -v to see invocation)
clang version 3.5
Target: i386--linux-gnu
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:
********************


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/android_system_OsConstants-a5eb11.cpp
clang++: note: diagnostic msg: /tmp/android_system_OsConstants-a5eb11.sh
clang++: note: diagnostic msg:


********************

make: *** [out/host/linux-x86/obj32/SHARED_LIBRARIES/libjavacore_intermediates/luni/src/main/native/android_system_OsConstants.o] Error 254

原因:

      這是swap區不夠大的原因。導致clang++ kernel opps
解決方法:
請加大分區:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
開機自動掛載swap:
使用 vi 或 nano 在 /etc/fstab 文件底部添加如下內容:
/swapfile none swap sw 0 0

目前我是配置是:vxbox+ubunut14.04 2G ram,swap=6GB
編譯了十幾個小時。 

 

轉自:http://blog.csdn.net/honour2sword/article/details/43916505


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM