1、/usr/bin/ld.bfd.real: cannot find -lGL
查看了一些资料,因为编译的时候还是用到了32BIT的libGL.so libX11.so库文件,编译的时候找的不是X86_64库文件配置,而是找的是I386库文件配置
$ sudo apt-get installibgl1-mesa-glx:i386(libGL.so)
由于libGL.so系统默认没有进行库路径下的链接,还需要手动链接一下
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
2、external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
解决办法:
vim external/llvm/llvm-host-build.mk
LOCAL_LDLIBS := -lpthread -ldl
3、gtest错误
external/gtest里打patch或者自己手动修改
4、mutable错误
external/oprofile里打patch或者自己手动修改文件
5、<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
修改build/core/combo/HOST_linux-x86.mk 61行,将 HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 修改成 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 Android源码换服务器了,具体的看http://source.android.com/source/downloading.html
遇到这个错误
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_export_foreach.cpp
frameworks/compile/slang/slang_rs_export_foreach.cpp: In static member function ‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’:
frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
解决办法有两个
1.注释掉frameworks/compile/slang/slang_rs_export_foreach.cpp 中的247行的 定义ParamName的语句;
2..在工程根目录下,打开下面的makefile文件:
http://blog.csdn.net/yuan1590/article/details/7530735
http://blog.csdn.net/shuzui1985/article/details/7628121
http://hcleon.iteye.com/blog/1461352
http://blog.csdn.net/zlm_250/article/details/7949440
http://blog.csdn.net/conanyang/article/details/751874