Correcting a Bug in the Latest Google NDK r8e

http://developer.appcelerator.com/blog/2013/03/correcting-a-bug-in-the-latest-google-ndk-r8e.html

In our continuing effort to inform you of ecosystem issues as we encounter them, the latest NDK toolchain update from Google contains a bug. This causes an issue when building the Titanium Mobile SDK from source. The fix is trivial, and is only necessary if you’ve updated to NDK version r8e, released March 21st, 2013 and are building Titanium Mobile using SCons.

To perform the fix, edit the file build/core/build-binary.mk under the Android NDK directory, replacing line 49:

$(cleantarget): PRIVATE_CLEAN_FILES := ($(my)OBJS)

With this:

$(cleantarget): PRIVATE_CLEAN_FILES := $($(my)OBJS)

The following output from “scons android” (when building titatitanium_mobile) is a symptom of the problem:
     [exec] rm -f src/native/../../generated/*
     [exec] rm -rf src/native/../../obj/*
     [exec] Clean: kroll-v8 [armeabi]
     [exec] rm -rf (TARGET_OBJS)
     [exec] /bin/sh: -c: line 0: syntax error near unexpected token `(‘
     [exec] /bin/sh: -c: line 0: `rm -rf (TARGET_OBJS)’
     [exec] make: *** [clean-kroll-v8-armeabi] Error 2

 

More information can be found here:

https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU

There is a second issue that only affects Max OS X developers using the 64-bit NDK (i.e. the download with the file name android-ndk-r8e-darwin-x86_64.tar.bz2). The fix is trivial and requires you to make the following one-line changes to these two files:

${ANDROID_NDK}/ndk-build: Replace line 158:

file -L “$SHELL” | grep -q “x86[_-]64″

with this:

file -L “$SHELL” | grep -q “[xX]86[_-]64″

${ANDROID_NDK}/build/core/init.mk: Replace line 229:

ifneq (,$(shell file -L $(SHELL) | grep ‘x86[_-]64′))

with this:

ifneq (,$(shell file -L $(SHELL) | grep ‘[xX]86[_-]64′))

As a note, you should be using the 64-bit NDK if your system supports it, since you will get 30% faster builds. The 64-bit tools utilize host resources better (faster, handle larger programs, etc) and they should function identically to their 32-bit counterparts, i.e. 64-bit toolchains still generate 32-bit binaries for Android.

This issue will be fixed by Google in the next release of the NDK. We will update this post with any new information we receive.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值