[英]Error while building the Android source
我在Mac OS X 10.7.3(Lion)上构建android源时出现以下错误:
host SharedLib: libSR_Recognizer (out/host/darwin-x86/obj/lib/libSR_Recognizer.dylib)
Undefined symbols for architecture i386:
"_pushAudioIntoRecognizer", referenced from:
_SR_RecognizerAdvanceImpl in RecognizerImpl.o
_detectBeginningOfSpeech in RecognizerImpl.o
"_generatePatternFromFrame", referenced from:
_SR_RecognizerAdvanceImpl in RecognizerImpl.o
"_canPushAudioIntoRecognizer", referenced from:
_SR_RecognizerAdvanceImpl in RecognizerImpl.o
_detectBeginningOfSpeech in RecognizerImpl.o
"_generatePatternFromFrameEOI", referenced from:
_SR_RecognizerAdvanceImpl in RecognizerImpl.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [out/host/darwin-x86/obj/lib/libSR_Recognizer.dylib] Error 1
有线索吗?
解决此错误的最佳方法是执行以下操作:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
CC
和CXX
环境变量: export CC=/usr/local/bin/gcc-4.2 && export CXX=/usr/local/bin/g++-4.2
make
如果您需要为#1安装自制软件,请访问: Homebrew主页
我以这种方式修复,我的编译器看起来很满意。
vi ./external/srec/srec/Recognizer/src/RecognizerImpl.c
用/*** PINLINE ***/
替换所有PINLINE
/*** PINLINE ***/
- 实际上删除所有/*** PINLINE ***/
我终于找到了答案:)
使用以下选项运行make
make CC=gcc CXX=g++ -j4
一切都会顺利进行
唯一正确的解决方案是安装XCode 3. *
这是从Android master stram修复的 - external / srec / portable / include / PortExport.h
#if defined(__APPLE_CC__)
#if __APPLE_CC__ >= 5621
#undef PINLINE
#define PINLINE
#endif
#endif
不幸的是,这是AOSP中的一个已知问题(访问http://source.android.com/source/known-issues.html )。 安装brew包。
您应该使用创建自定义构建
lunch full-eng
代替
lunch full-userdebug
我在Android-4.1.2_r1上找不到问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.