Closed Bug 905315 Opened 9 years ago Closed 9 years ago
configure errors with recent android sdk, 'dx' seems to have moved
I just followed the steps in https://wiki.mozilla.org/Mobile/Fennec/Android#Linux fairly directly and I get a configure error about not being able to find 'dx'. 'find $(SDK) -name dx' shows that it is in build-tools/android-4.3/dx. Opening up the SDK Manager GUI, I see that Tools / Android SDK Build-tools is installed with Rev. 18.0.1. I was able to fix the problem by installing Rev 17 of the Android SDK Build-tools (which is not installed by default following the above instructions). Rev. 17 places 'dx' in build-tools/17.0.0/dx which is apparently where configure was looking for it. Seems like 'dx' just moved in 18?
What is $(SDK)? We have a weird convention around this (that predates me!). I have, for example, ac_add_options --with-android-sdk="$HOME/Mozilla/Android/android-sdks/platforms/android-16"
Oh sorry, I made that up, it's just the directory of the android SDK.
(In reply to Luke Wagner [:luke] from comment #2) > Oh sorry, I made that up, it's just the directory of the android SDK. Right, but what is it? Observe the platforms/android-16 in my line. That's misleading but what the build system expects.
For me, running under Linux and on a clean download of the SDK, dx gets placed in <SDK>/build-tools/18.0.1/dx which seems to be a valid path (https://mxr.mozilla.org/mozilla-central/source/js/src/build/autoconf/android.m4#300).
<SDK> being the path to the base directory of the android-sdk (/opt/android-sdk/), which I imagine is what Luke means by $(SDK) above (I was about to use the same convention).
That's right, my SDK dir is /opt/android-sdk, I tried both ac_add_options --with-android-sdk=/opt/android-sdk/platforms/android-18 and ac_add_options --with-android-sdk=/opt/android-sdk/platforms/android-16 and both fail before I installed Rev 17 of SDK Build Tools. Both succeed after installing Rev 17.
(In reply to Luke Wagner [:luke] from comment #6) > That's right, my SDK dir is /opt/android-sdk, I tried both > ac_add_options --with-android-sdk=/opt/android-sdk/platforms/android-18 > and > ac_add_options --with-android-sdk=/opt/android-sdk/platforms/android-16 > and both fail before I installed Rev 17 of SDK Build Tools. Both succeed > after installing Rev 17. Interesting. Can you tell me what /opt/android-sdk/build-tools looks like (including where dx is located throughout that tree)? The logic isn't too hard to follow here -- see mcomella's mxr link above -- so it's probably easiest for you to figure out what's happening with a little debug logging and update the ticket. Sorry for the hassle.
With Rev 17 NOT installed: /opt/android-sdk $ find . -name dx ./platforms/android-3/tools/dx ./platforms/android-4/tools/dx ./build-tools/android-4.3/dx With Rev 17 installed, there is on additional entry: ./build-tools/17.0.0/dx Judging by the output of configure, this is the one configure is looking for. So I think configure just needs to look in build-tools/android-4.3.
Since I can't repo locally, can you also "ls -R build-tools"?
Without Rev 17 installed: http://pastebin.mozilla.org/2856655 With Rev 17 installed: http://pastebin.mozilla.org/2856668
Looks like Google fucked with us again, by changing the naming scheme to android-xxx. Who knows why. Fix should be to add android-4.3 to the front of the suffix list at https://mxr.mozilla.org/mozilla-central/source/js/src/build/autoconf/android.m4#300. :luke, you mind testing? Thanks for the legwork.
It worked! Note: I had to make the change in two places: where you linked to and in build/autoconf/android.m4 (no js/src).
Here's a patch with the fix suggested in comment 11.
Attachment #795454 - Flags: review?(nalexander)
Comment on attachment 795454 [details] [diff] [review] Add android-4.3 to the list of searched directories Review of attachment 795454 [details] [diff] [review]: ----------------------------------------------------------------- lgtm.
Attachment #795454 - Flags: review?(nalexander) → review+
Assignee: nobody → irving
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Hi seems that Google changed things again, here on new linux install of the SDK I have build-tools/19.0.0/ so I think "19.0.0" needs to be added ad well. I'll attach the 1 liner patch.
I just ran into this problem as well. The fix from comment #18 isn't complete though - it needs the same addition to build/autoconf/android.m4. Nick, we reopen this bug or would a new bug be better?
Comment on attachment 8335061 [details] [diff] [review] add v19 of build tools path Review of attachment 8335061 [details] [diff] [review]: ----------------------------------------------------------------- This is only one half of the places this is needed. We'll land this under Bug 941889.
Attachment #8335061 - Flags: review-
Cancelling needinfo since I just landed Bug 941889.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.