(转)编译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++kernelopps
解决方法:
请加大分区:
sudofallocate-l4G/swapfile
sudochmod600/swapfile
sudomkswap/swapfile
sudoswapon/swapfile
开机自动挂载swap:
使用vi或nano在/etc/fstab文件底部添加如下内容:
/swapfilenoneswapsw00

目前我是配置是:vxbox+ubunut14.042Gram,swap=6GB
编译了十几个小时。

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

优质内容筛选与推荐>>
1、php添加日志文件
2、Axis2 服务器端抛出ServiceClass object does not implement问题解决方法
3、【html5】html5 本地存储
4、instanceof
5、manta api


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号