Implement |mach bootstrap| for mobile/android on OS X with macports package manager

RESOLVED FIXED in Firefox 46

Status

()

Core
Build Config
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: nalexander, Assigned: past, Mentored)

Tracking

unspecified
mozilla46
All
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

(Whiteboard: [lang=python][good next bug])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Follow up from Bug 1108771.  We'd like to support bootstrapping mobile/android builds with the macports package manager, but I see no easy way to install a modern Java toolchain using macports.

Hopefully some macports user knows of a package, or some other simple way (downloading from Oracle/Sun requires accepting a license with an awkward flow).
(Assignee)

Comment 1

2 years ago
Can't 'mach bootstrap' at least not fail when Java is already installed manually and found in the path?
(Reporter)

Comment 2

2 years ago
(In reply to Panos Astithas [:past] from comment #1)
> Can't 'mach bootstrap' at least not fail when Java is already installed
> manually and found in the path?

I'm not against that, since we build with whatever the system provides /anyway/.  To address this:

1) around https://dxr.mozilla.org/mozilla-central/source/python/mozboot/mozboot/osx.py?offset=100#406, make this manually install the Android NDK and SDK, like we do for homebrew.

2) check for java and javac, verifying that you have Java 1.7 or later.

3) use the Desktop packages elsewhere.

It should not be hard; I will mentor and review.
Mentor: nalexander@mozilla.com
Whiteboard: [lang=python][good next bug]
(Assignee)

Updated

2 years ago
Assignee: nobody → past
Status: NEW → ASSIGNED
(Assignee)

Comment 3

2 years ago
Created attachment 8709186 [details] [diff] [review]
Patch v1

This seems to work well for me.
Attachment #8709186 - Flags: review?(nalexander)
(Reporter)

Comment 4

2 years ago
Comment on attachment 8709186 [details] [diff] [review]
Patch v1

Review of attachment 8709186 [details] [diff] [review]:
-----------------------------------------------------------------

One nit, one request for a better link.  It's fine by me if you land as is (better than nothing), but I'd really like to get Java onto the machine...

::: python/mozboot/mozboot/osx.py
@@ +422,5 @@
> +        ]
> +        self._ensure_macports_packages(packages)
> +
> +        # Verify the presence of java and javac.
> +        if self.which('java') is None or self.which('javac') is None:

It's pythonic to just use `if not self.which('java) or not self.which('javac')`.  Are you doing the explicit None test for a reason?

@@ +423,5 @@
> +        self._ensure_macports_packages(packages)
> +
> +        # Verify the presence of java and javac.
> +        if self.which('java') is None or self.which('javac') is None:
> +            raise Exception('You need to have Java version 1.7 or later installed.')

This isn't very helpful.  Can we at least give folks a documentation link to how to install Java on a Macports system?
Attachment #8709186 - Flags: review?(nalexander) → review+

Comment 5

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/491b1c69b3ed
(Assignee)

Comment 6

2 years ago
Thanks, I've made both changes as requested.

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/491b1c69b3ed
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.