Closed Bug 791060 Opened 12 years ago Closed 12 years ago

Errors building Firefox with Homebrew versions of Android SDK and NDK.

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bwinton, Unassigned)

Details

Steps to reproduce:
Follow the instructions in https://wiki.mozilla.org/Mobile/Fennec/Android but, when you get to the "Install Android NDK"/"Install Android SDK", type "brew install android-sdk" and "brew install android-ndk" instead.

The error I get is "make[6]: /usr/local/Cellar/android-sdk/r20.0.1/platforms/android-16/../../tools/apkbuilder: No such file or directory"

The file seems to be there.  Well, there-ish…

$ ls -la /usr/local/Cellar/android-sdk/r20.0.1/tools/apkbuilder 
-rwxrwxr-x@ 1 bwinton  wheel  1977 13 Jul 18:59 /usr/local/Cellar/android-sdk/r20.0.1/tools/apkbuilder

$ ls -al /usr/local/Cellar/android-sdk/r20.0.1/platforms/android-16/../../tools/apkbuilder
ls: /usr/local/Cellar/android-sdk/r20.0.1/platforms/android-16/../../tools/apkbuilder: No such file or directory

I suspect the problem is this:
$ ls -al /usr/local/Cellar/android-sdk/r20.0.1
[snip…]
lrwxr-xr-x   1 bwinton  admin    38 13 Sep 10:57 platforms -> ../../../var/lib/android-sdk/platforms

but I'm not sure how to get around the dereferencing of the symlink, or if I even could.
So, I went to /usr/local/Cellar/android-sdk/r20.0.1 and ran:
rm -rf add-ons extras platforms samples sources system-images temp
and then re-ran the android tool to download the platform, and re-built, and it all worked just fine.  As a workaround, perhaps we should add this step to the build instructions?
(In reply to Blake Winton (:bwinton - Thunderbird UX) from comment #1)
> So, I went to /usr/local/Cellar/android-sdk/r20.0.1 and ran:
> rm -rf add-ons extras platforms samples sources system-images temp
> and then re-ran the android tool to download the platform, and re-built, and
> it all worked just fine.  As a workaround, perhaps we should add this step
> to the build instructions?

It's a wiki ;)

Cc'ing kats, since I think he worked on these build docs.
Since the STR involve deviating from the basic instructions, I'd rather put the brew notes/workaround on a separate page. I'd suggest taking https://wiki.mozilla.org/Mobile/Fennec/Android_OtherBuildEnvs (which is still linked from https://wiki.mozilla.org/Mobile/Fennec/Android) and transmogrifying it into a more general "other environments" page rather than just "what you might be able to do on redhat"
Added a section to https://wiki.mozilla.org/Mobile/Fennec/Android_OtherBuildEnvs pointing to this bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.