가장 따뜻한 11월 에 나온 ndk 7이다.
Linux 32/64-bit (x86) | android-ndk-r7-linux-x86.tar.bz2 |
android nkd 7을 다운받아서 ndk 해보는데. 잘 안된다. 구글 검색해도 안나와서.. 좀 열받는다.
ndk 빌드하면 이렇게 아래로 나오는데..
/work/android-ndk-r7/samples/san-angeles# ../../ndk-build
/work/android-ndk-r7/prebuilt/linux-x86/bin/awk: 1: ELF : not found
/work/android-ndk-r7/prebuilt/linux-x86/bin/awk: 4: Syntax error: word unexpected (expecting ")")
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/work/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
/work/android-ndk-r7/prebuilt/linux-x86/bin/awk: 1: ELF : not found
/work/android-ndk-r7/prebuilt/linux-x86/bin/awk: 4: Syntax error: word unexpected (expecting ")")
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/work/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
추적을 해보니. 어라. awk 문법에 맞는 것이 동작이 안된다.
/work/android-ndk-r7/samples/san-angeles# ../../build/awk/check-awk.awk
../../build/awk/check-awk.awk: line 22: BEGIN: command not found
../../build/awk/check-awk.awk: line 26: syntax error near unexpected token `s1,"world"'
../../build/awk/check-awk.awk: line 26: ` if (! match(s1,"world")) {'
../../build/awk/check-awk.awk: line 22: BEGIN: command not found
../../build/awk/check-awk.awk: line 26: syntax error near unexpected token `s1,"world"'
../../build/awk/check-awk.awk: line 26: ` if (! match(s1,"world")) {'
awk도 최신 버전인데..
# apt-get install awk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package awk is a virtual package provided by:
original-awk 2010-05-23-1
mawk 1.3.3-15ubuntu2
gawk 1:3.1.7.dfsg-5
mk 파일보면서 android -ndk에 awk가 이상이 있나 확인해보았다.
32비트 x86 버전에서 prebuild/linux-x86/bin/awk 파일은 64 비트용이었다... 아하~
/work/android-ndk-r7/prebuilt/linux-x86/bin# file awk
awk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
awk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
awk 파일을 지우고 gawk를 링크를 걸어준다.
/work/android-ndk-r7/prebuilt/linux-x86/bin# mv awk awk.old
/work/android-ndk-r7/prebuilt/linux-x86/bin# ln -s /usr/bin/gawk awk
/work/android-ndk-r7/prebuilt/linux-x86/bin# ln -s /usr/bin/gawk awk
그리고, 샘플 디렉토리 가서 테스트해보니. 오예~ 빌드 완료.
/work/android-ndk-r7/samples/hello-jni# ../../ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
SharedLibrary : libhello-jni.so
Install : libhello-jni.so => libs/armeabi/libhello-jni.so
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : hello-jni <= hello-jni.c
SharedLibrary : libhello-jni.so
Install : libhello-jni.so => libs/armeabi/libhello-jni.so
'안드로이드-iOS-Webkit' 카테고리의 다른 글
안드로이드, 이클립스에서 샘플 예제 보는 방법 (0) | 2011.11.24 |
---|---|
안드로이드 JNI 개발 준비 #2 (2) | 2011.11.23 |
안드로이드 JNI 개발 준비 #2 (0) | 2011.11.23 |
안드로이드 JNI 개발 준비 #1 (1) | 2011.11.22 |
안드로이드에 탑재된 리눅스 커널 버전 확인하기 (0) | 2011.11.22 |