Error creating Android source

I get the following error when creating an android source on Mac OS X 10.7.3 (Lion):

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

Any clues?

+3
source share
6 answers

I finally found the answer :)

run make with the following parameters

make CC=gcc CXX=g++ -j4

Everything will go smoothly

+1
source

The best way to get around this error is to do the following:

  • Install gcc-4.2 and g ++ - 4.2: brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
  • Set environment variables CCand CXX:export CC=/usr/local/bin/gcc-4.2 && export CXX=/usr/local/bin/g++-4.2
  • Then do: make

If you need to install homebrew for # 1, go to: Homebrew Home Page

+3
source

i , .

vi ./external/srec/srec/Recognizer/src/RecognizerImpl.c

PINLINE /*** PINLINE ***/ -

+3

- XCode 3. *

+1
source

Here is fixed from the main Android template - external /srec/portable/include/PortExport.h

  #if defined(__APPLE_CC__)
  #if __APPLE_CC__ >= 5621
  #undef PINLINE
  #define PINLINE
  #endif
  #endif
0
source

Unfortunately, this is a known issue in AOSP (visit http://source.android.com/source/known-issues.html ). Install the brew package.

You must create your own assembly using

lunch full-eng

instead

lunch full-userdebug

I do not see a problem on Android 4.1.2_r1

0
source

All Articles