Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Eclipse OpenJ9 #24

Closed
joschi opened this issue Jun 20, 2018 · 14 comments
Closed

Add support for Eclipse OpenJ9 #24

joschi opened this issue Jun 20, 2018 · 14 comments

Comments

@joschi
Copy link

joschi commented Jun 20, 2018

It would be great, if install-jdk.sh supported Eclipse OpenJ9 JDKs.

Stable and nightly builds for OpenJDK 8, 9, and 10 with OpenJ9 can be downloaded at https://adoptopenjdk.net/releases.html?variant=openjdk8-openj9.

@sormuras
Copy link
Owner

Good idea. Mh, via a new license name? Somthing like: --license GPL|BCL|J9
Or an entire new option?

@joschi
Copy link
Author

joschi commented Jun 20, 2018

@sormuras Thanks for your quick reply!

From the CONTRIBUTING.md document in the OpenJ9 GitHub repository:

Eclipse OpenJ9 is dual-licensed under the Eclipse Public License v2.0 and the Apache License v2.0.

So maybe using EPL2 as license switch would make sense?

@sormuras
Copy link
Owner

AdoptOpenJDK also offers "pristine" HotSpot OpenJDK builds.
Azul offers Zulu builds: https://www.azul.com/downloads/zulu/zulu-linux/
(...)
Maybe an option like --distributor jdk.java.net|adoptopenjdk.net|azul.com|... makes sense.

@sormuras
Copy link
Owner

install-jdk.sh allows you specify an URL via the --url "https://..." Use custom JDK archive (provided as .tar.gz file) option. Can you please test-drive it pointing to J9 archive?

@joschi
Copy link
Author

joschi commented Jun 20, 2018

@sormuras That doesn't seem to work right now:
(Tested in a fresh ubuntu:bionic Docker container after installing cURL with https://github.com/sormuras/bach/blob/4505dd794aa952dd3be9bbe7315fc438b18bfbd4/install-jdk.sh)

# install-jdk.sh -e -v --url 'https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz'
install-jdk.sh 2018-06-01
url=https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
Variables:
  feature = <overridden by custom url>
  license = <overridden by custom url>
       os = <overridden by custom url>
      url = https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
   status = 302
  archive = /root/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
Downloading JDK from https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz...
Using wget options:  --directory-prefix /root --timestamping --continue
--2018-06-20 10:03:54--  https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/111691917/32e87414-284a-11e8-9ee1-c654f98deb8f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180620%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180620T100355Z&X-Amz-Expires=300&X-Amz-Signature=73076a902df2beae47efdd6f393c4b9b924f20ae7fd1406a57c65903a70f3c24&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DOpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz&response-content-type=application%2Foctet-stream [following]
--2018-06-20 10:03:55--  https://github-production-release-asset-2e65be.s3.amazonaws.com/111691917/32e87414-284a-11e8-9ee1-c654f98deb8f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180620%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180620T100355Z&X-Amz-Expires=300&X-Amz-Signature=73076a902df2beae47efdd6f393c4b9b924f20ae7fd1406a57c65903a70f3c24&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DOpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.232.107
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.232.107|:443... connected.
HTTP request sent, awaiting response... 304 Not Modified
File '/root/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz' not modified on server. Omitting download.

Using tar options: -z --file /root/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
Set target to: /root/.
Content of target directory:
OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz  jdk8u162-b12_openj9-0.8.0
Content of release file:
/usr/local/bin/install-jdk.sh: line 311: java: command not found


# ls -l
total 80648
-rw-r--r-- 1 root root 82573385 Mar 15 12:13 OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
drwxrwxr-x 9 1001 1001     4096 Mar 15 11:26 jdk8u162-b12_openj9-0.8.0
root@2445578cd31d:~# ls -l *
-rw-r--r-- 1 root root 82573385 Mar 15 12:13 OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz

jdk8u162-b12_openj9-0.8.0:
total 23512
-r--r--r--  1 1001 1001     1522 Mar 15 11:26 ASSEMBLY_EXCEPTION
-r--r--r--  1 1001 1001    19274 Mar 15 11:26 LICENSE
-r--r--r--  1 1001 1001   145180 Mar 15 11:26 THIRD_PARTY_README
drwxrwxr-x  2 1001 1001     4096 Mar 15 11:26 bin
drwxrwxr-x  9 1001 1001     4096 Mar 15 11:26 demo
drwxrwxr-x  3 1001 1001     4096 Mar 15 11:26 include
drwxrwxr-x  4 1001 1001     4096 Mar 15 11:26 jre
drwxrwxr-x  3 1001 1001     4096 Mar 15 11:26 lib
drwxrwxr-x  4 1001 1001     4096 Mar 15 11:26 man
-rw-rw-r--  1 1001 1001    16720 Mar 15 11:13 openj9-notices.html
-rw-rw-r--  1 1001 1001       84 Mar 15 11:26 release
drwxrwxr-x 10 1001 1001     4096 Mar 15 11:26 sample
-rw-rw-r--  1 1001 1001 23847581 Mar 15 11:26 src.zip

sormuras added a commit that referenced this issue Jun 20, 2018
@sormuras
Copy link
Owner

Fixed on a branch: https://travis-ci.org/sormuras/bach/builds/394516528#L431

$ java --version
openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
Eclipse OpenJ9 VM (build master-3926aa29, JRE 10 Linux amd64-64-Bit Compressed References 20180619_82 (JIT enabled, AOT enabled)
OpenJ9   - 3926aa29
OMR      - 12fd129d
JCL      - 3e42389178 based on jdk-10.0.1+10)

Needs more testing before hitting master. Do you have a minute to test-drive https://raw.githubusercontent.com/sormuras/bach/issue-24/install-jdk.sh ?

@joschi
Copy link
Author

joschi commented Jun 20, 2018

@sormuras It's working with all releases/nightlies of OpenJDK with OpenJ9 I've tested. 👍

root@4d1522606cf4:~# install-jdk.sh --url 'https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz'
install-jdk.sh 2018-06-01
Variables:
  feature = <overridden by custom url>
  license = <overridden by custom url>
       os = <overridden by custom url>
      url = https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
   status = 302
  archive = /root/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz
Downloading JDK from https://github.com/AdoptOpenJDK/openjdk8-openj9-releases/releases/download/jdk8u162-b12_openj9-0.8.0/OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz...
openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-b12)
Eclipse OpenJ9 VM (build openj9-0.8.0, JRE 1.8.0 Linux amd64-64 Compressed References 20180315_120 (JIT enabled, AOT enabled)
OpenJ9   - e24e8aa9
OMR      - 3e8296b4
JCL      - ee1e77df1d based on jdk8u162-b12)
root@4d1522606cf4:~# install-jdk.sh --url 'https://github.com/AdoptOpenJDK/openjdk10-openj9-nightly/releases/download/jdk-10.0.1%2B10-201819061532/OpenJDK10-OPENJ9_x64_Linux_201819061532.tar.gz'
install-jdk.sh 2018-06-01
Variables:
  feature = <overridden by custom url>
  license = <overridden by custom url>
       os = <overridden by custom url>
      url = https://github.com/AdoptOpenJDK/openjdk10-openj9-nightly/releases/download/jdk-10.0.1%2B10-201819061532/OpenJDK10-OPENJ9_x64_Linux_201819061532.tar.gz
   status = 302
  archive = /root/OpenJDK10-OPENJ9_x64_Linux_201819061532.tar.gz
Downloading JDK from https://github.com/AdoptOpenJDK/openjdk10-openj9-nightly/releases/download/jdk-10.0.1%2B10-201819061532/OpenJDK10-OPENJ9_x64_Linux_201819061532.tar.gz...
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
Eclipse OpenJ9 VM (build master-3926aa29, JRE 10 Linux amd64-64-Bit Compressed References 20180619_82 (JIT enabled, AOT enabled)
OpenJ9   - 3926aa29
OMR      - 12fd129d
JCL      - 3e42389178 based on jdk-10.0.1+10)
root@4d1522606cf4:~# install-jdk.sh --url 'https://github.com/AdoptOpenJDK/openjdk9-openj9-nightly/releases/download/jdk-9.0.4%2B12-201819061047/OpenJDK9-OPENJ9_x64_Linux_201819061047.tar.gz'
install-jdk.sh 2018-06-01
Variables:
  feature = <overridden by custom url>
  license = <overridden by custom url>
       os = <overridden by custom url>
      url = https://github.com/AdoptOpenJDK/openjdk9-openj9-nightly/releases/download/jdk-9.0.4%2B12-201819061047/OpenJDK9-OPENJ9_x64_Linux_201819061047.tar.gz
   status = 302
  archive = /root/OpenJDK9-OPENJ9_x64_Linux_201819061047.tar.gz
Downloading JDK from https://github.com/AdoptOpenJDK/openjdk9-openj9-nightly/releases/download/jdk-9.0.4%2B12-201819061047/OpenJDK9-OPENJ9_x64_Linux_201819061047.tar.gz...
openjdk version "9.0.4-adoptopenjdk"
OpenJDK Runtime Environment (build 9.0.4-adoptopenjdk+12)
Eclipse OpenJ9 VM (build master-87d78baf, JRE 9 Linux amd64-64-Bit Compressed References 20180619_208 (JIT enabled, AOT enabled)
OpenJ9   - 87d78baf
OMR      - 12fd129d
JCL      - f8f07f1d9 based on jdk-9.0.4+12)
root@4d1522606cf4:~# ls
OpenJDK10-OPENJ9_x64_Linux_201819061532.tar.gz  OpenJDK8-OPENJ9_x64_Linux_jdk8u162-b12_openj9-0.8.0.tar.gz  OpenJDK9-OPENJ9_x64_Linux_201819061047.tar.gz  jdk-10.0.1+10  jdk-9.0.4+12  jdk8u162-b12_openj9-0.8.0

@sormuras
Copy link
Owner

Nice. Looks good to me.

Now to the mapping. Are those builds "fixed"? Don't think so. Thus, how to figure out the current URL for the 8, 9, 10, or "-ea" feature build?

@joschi
Copy link
Author

joschi commented Jun 20, 2018

@sormuras I've seen that you've asked in the AdoptOpenJDK Slack. 😃

Just for reference, here's what they've suggested:
https://github.com/AdoptOpenJDK/openjdk-api

@sormuras
Copy link
Owner

Plan: Merge the "extract target directory name" fix into master and let you pass the url explicitly or for example via:

install-jdk.sh --url $(curl --silent https://api.adoptopenjdk.net/openjdk10-openj9/nightly/x64_linux/ | grep 'binary_link' | grep -Eo '(http|https)://[^"]+' | head -1)

@sormuras
Copy link
Owner

Green lights: https://travis-ci.org/sormuras/sormuras.github.io/builds/395359878

Also added a Graal VM job -- because it works. 🚀

@sormuras
Copy link
Owner

Included current Zulu build as well: https://travis-ci.org/sormuras/sormuras.github.io/builds/395363329

@sormuras
Copy link
Owner

Fixed via 589e2f4 and https://sormuras.github.io/blog/2018-06-22-jdk-matrix.html

@joschi
Copy link
Author

joschi commented Jun 25, 2018

@sormuras Awesome work. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants