Firefox Android Artifact Mode: Build Error - You need to have Java... when Java 11 is present
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
People
(Reporter: sonali18317, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Steps to reproduce:
I am trying to build Firefox for Android (Artifact Mode) on MacOS. When I try to run "./mach bootstrap"
Actual results:
It gives an error asking for me to have Java 1.8, even though my system has Java 11. Error log: https://pastebin.com/XZpddv6B
Comment 1•6 years ago
|
||
Paste for posterity:
➜ mozilla-central ./mach bootsrap
We're assuming the 'bootsrap' command is 'bootstrap' and we're executing it for you.
Note on Artifact Mode:
Artifact builds download prebuilt C++ components rather than building
them locally. Artifact builds are faster!
Artifact builds are recommended for people working on Firefox or
Firefox for Android frontends, or the GeckoView Java API. They are unsuitable
for those working on C++ code. For more information see:
https://developer.mozilla.org/en-US/docs/Artifact_builds.
Please choose the version of Firefox you want to build:
1. Firefox for Desktop Artifact Mode
2. Firefox for Desktop
3. GeckoView/Firefox for Android Artifact Mode
4. GeckoView/Firefox for Android
Your choice: 3
Looks like you have Homebrew installed. We will install all required packages via Homebrew.
Error running mach:
['bootsrap']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
Exception: You need to have Java version 1.8 installed (found /usr/bin/java with version "11"). Check the JAVA_HOME environment variable. Please visit http://www.java.com/en/download to get version 1.8.
File "/Users/sonalisinghal/mozilla-central/python/mozboot/mozboot/mach_commands.py", line 43, in bootstrap
bootstrapper.bootstrap()
File "/Users/sonalisinghal/mozilla-central/python/mozboot/mozboot/bootstrap.py", line 442, in bootstrap
getattr(self.instance, 'install_%s_packages' % application)()
File "/Users/sonalisinghal/mozilla-central/python/mozboot/mozboot/osx.py", line 207, in install_mobile_android_artifact_mode_packages
self.package_manager)(artifact_mode=True)
File "/Users/sonalisinghal/mozilla-central/python/mozboot/mozboot/osx.py", line 384, in ensure_homebrew_mobile_android_packages
self.ensure_java()
File "/Users/sonalisinghal/mozilla-central/python/mozboot/mozboot/base.py", line 829, in ensure_java
'to get version 1.8.'.format(java, version))
➜ mozilla-central java --version
java 11.0.1 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.1+13-LTS, mixed mode)
➜ mozilla-central
nalexander, do you know why we require a specific Java version and where one can obtain said version?
Comment 2•6 years ago
|
||
This is a hard requirement from the Android SDK tools. I broke it down in this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=1477487#c11. I think this ticket is a dupe of Bug 1445729.
This is related to Bug 1519180, but not the same.
Comment 3•6 years ago
|
||
Just FYI, we try pretty hard to install java8 exactly using Homebrew -- see https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/osx.py#368 -- so I'm surprised we're finding the wrong one.
Assignee | ||
Updated•4 years ago
|
Description
•