Closed Bug 949314 Opened 11 years ago Closed 11 years ago

'./mach configure' fails to find zipalign when using Android NDK/SDK installed via Homebrew

Categories

(Firefox Build System :: General, defect)

x86_64
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla29

People

(Reporter: james.gilbertson, Assigned: james.gilbertson)

Details

Attachments

(1 file)

Homebrew distributes the various sub-directories of the Android SDK to different locations inside /usr/local/, and uses symlinks to stitch the SDK root directory back together (in "/usr/local/opt/android-sdk"). So when configure tries to find 'android_sdk_root' via a relative path (e.g. "/usr/local/opt/android-sdk/platforms/android-19/../../"), it ends up in "/usr/local/var/lib/android-sdk", which doesn't have the "tools" directory.

Using parameter expansion (i.e. ${withval%/platforms/android-*}) instead works.

Steps to reproduce:
Follow the instructions at https://wiki.mozilla.org/Mobile/Fennec/Android#Mac_OS_X with the following changes:
For "Install Android NDK/SDK", use Homebrew to install the NDK/SDK instead (i.e. brew install android-sdk android-ndk)

For "Setup Fennec mozconfig", use the following for the NDK/SDK locations:
ac_add_options --with-android-ndk="/usr/local/opt/android-ndk"
ac_add_options --with-android-sdk="/usr/local/opt/android-sdk/platforms/android-19"

Result:
james.gilbertson@blasted-church ~/D/mozilla> ./mach configure
...
 0:06.30 configure: error: The program zipalign was not found.  Use --with-android-sdk={android-sdk-dir}.
 0:06.30 *** Fix above errors and then restart with               "/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
 0:06.30 make: *** [configure] Error 1
Attachment #8346364 - Flags: review?(mh+mozilla)
Attachment #8346364 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7c1b16d368f1
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: