Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problems with Android NDK-7 and AWK

I am having problems with the latest Android NDK:

ligi@ligid:~$ ndk-build 
/home/ligi/bin/android-ndk/prebuilt/linux-x86/bin/awk: 1: ELF: not found
/home/ligi/bin/android-ndk/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 !    
/home/ligi/bin/android-ndk/build/core/init.mk:258: *** Android NDK: Aborting.    .  Stop.

ligi@ligid:~$ `echo $HOST_AWK --v`
GNU Awk 3.1.7

I am on stock ubuntu ant totally out of ideas and good keywords for searches

like image 703
ligi Avatar asked Nov 14 '11 00:11

ligi


1 Answers

I also had this issue and found this Japanese site with similar problems:

http://d.hatena.ne.jp/yohpapa/20111113/1321198570

I hope I puzzled out the Google Translated stuff correctly - in any case, basically in the new NDK install, find this directory:

..../android-ndk-r7/prebuilt/linux-x86/bin

and rename the file "awk" there to something else like "awk_"

I did this and ndk_build now works for me. If I am reading the make files right there is a file called init.mk which replaces your HOST_AWK with the prebuilt value if it finds it...so renaming the awk file there defaults back to your gawk.

Hope that helps

Kibi

like image 187
Kibi Avatar answered Sep 28 '22 00:09

Kibi