在ubuntu12.04下,编译Android2.3.3的时候提示一些致命错误,调试了很久都没有成功,网上有说要gcc4.4.3版本才可以编译通过(现有的gcc版本是4.7.2),于是只好尝试一下。重新安装gcc比想象的要麻烦,详细过程参考:
http://huangw10.blogbus.com/logs/182474992.html
这里只整理一些遇到的错误和注意事项。(事后整理,无图)
注:重新安装前系统中要保留一个gcc。
error: libmpfc.so.1: No such file or directory
原因:libmpfc.so和libmpfc.so.1都是链接到旁边的libmpfc.so.1.2.2,为什么会找不到呢?
解决:删掉两个链接文件,复制两个libmpfc.so.1.2.2,分别改名为libmpfc.so和libmpfc.so.1。
system.h error conflicting types for strsignal
原因:在其他地方定义过
解决:被我注释掉,编译通过,不影响使用
line_map.h error: CHAR_BIT undeclared here
原因:环境变量C_INCLUDE_PATH设置问题
解决:export C_INCLUDE_PATH=/usr/include
error: cannot find crti.o : No such file or directory
原因:网上有说是链接错误的,但是创建链接后仍然不行
解决:设置LIBRARY_PATH=/usr/lib/x86-64-linux-gnu