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

openjdk: 10.0.2 -> 11.0.1 #48326

Merged
merged 2 commits into from Nov 1, 2018
Merged

openjdk: 10.0.2 -> 11.0.1 #48326

merged 2 commits into from Nov 1, 2018

Conversation

jerith666
Copy link
Contributor

@jerith666 jerith666 commented Oct 13, 2018

Major TODOs:
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@jerith666
Copy link
Contributor Author

We'll need a bootstrap jdk for arm before we can build openjdk for that architecture.

@jerith666
Copy link
Contributor Author

Squashed some of my WIP comments ... I think I need someone who has access to darwin to make that update, though?

@@ -8098,10 +8095,10 @@ with pkgs;
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
};
bazel_jdk10 = callPackage ../development/tools/build-managers/bazel {
bazel_jdk11 = callPackage ../development/tools/build-managers/bazel {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jerith666
Copy link
Contributor Author

Okay, I've tested that eclipse runs with jdk11 locally. I think once someone can confirm that the darwin jdk11 is basically working, this is ready to merge!

@uri-canva
Copy link
Contributor

Tested this to use Bazel with jdk11 on darwin, failed:

these derivations will be built:
  /nix/store/0vw2fndb535kqj1bbfp42h26zy5pxjv6-zulu11.2.3-jdk11.0.1-linux_x64.tar.gz.drv
  /nix/store/d7bq5ir7mxhs87h0zy88daa1g5glkyjl-zulu11.2.3-jdk11.0.1.drv
  /nix/store/3fb0mnlp8b680ywdl3gvggs02vzcn3py-bazel-0.17.1.drv
these paths will be fetched (73.15 MiB download, 76.57 MiB unpacked):
  /nix/store/08hdv1dsr6ngmyq47h25nqcg3k4fdfmb-bazel-deps
  /nix/store/rd9bdnf17wsfqclyqz4gv3gfb58nfsx8-bazel-0.17.1-dist.zip
  /nix/store/xfc7wancf1x9m0qnc319dfkq1l9viq49-27be70979b54d7510bf401d9581fb4075737ef34.patch
copying path '/nix/store/xfc7wancf1x9m0qnc319dfkq1l9viq49-27be70979b54d7510bf401d9581fb4075737ef34.patch' from 'https://cache.nixos.org'...
copying path '/nix/store/rd9bdnf17wsfqclyqz4gv3gfb58nfsx8-bazel-0.17.1-dist.zip' from 'https://cache.nixos.org'...
copying path '/nix/store/08hdv1dsr6ngmyq47h25nqcg3k4fdfmb-bazel-deps' from 'https://cache.nixos.org'...
building '/nix/store/0vw2fndb535kqj1bbfp42h26zy5pxjv6-zulu11.2.3-jdk11.0.1-linux_x64.tar.gz.drv'...

trying https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  187M  100  187M    0     0  5955k      0  0:00:32  0:00:32 --:--:-- 8910k
building '/nix/store/d7bq5ir7mxhs87h0zy88daa1g5glkyjl-zulu11.2.3-jdk11.0.1.drv'...
unpacking sources
unpacking source archive /nix/store/az6zgzvxqs53ns9pvd8bmhcjc68plrhy-zulu11.2.3-jdk11.0.1-linux_x64.tar.gz
source root is zulu11.2.3-jdk11.0.1-linux_x64
setting SOURCE_DATE_EPOCH to timestamp 1539936296 of file zulu11.2.3-jdk11.0.1-linux_x64/readme.txt
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
Archive:  /nix/store/xkf1p54gf3igqr3qvwxgrrk4asfxl4qp-ZuluJCEPolicies.zip
   creating: ZuluJCEPolicies/
  inflating: ZuluJCEPolicies/LICENSE
  inflating: ZuluJCEPolicies/README.txt
  inflating: ZuluJCEPolicies/DISCLAIMER
  inflating: ZuluJCEPolicies/local_policy.jar
  inflating: ZuluJCEPolicies/US_export_policy.jar
post-installation fixup
error: install_name_tool: can't open file: /nix/store/knc10wvsrgca7schl7d6hpplhvrsbwg4-zulu11.2.3-jdk11.0.1/lib/libfontmanager.dylib (No such file or directory)
builder for '/nix/store/d7bq5ir7mxhs87h0zy88daa1g5glkyjl-zulu11.2.3-jdk11.0.1.drv' failed with exit code 1
error: build of '/nix/store/3fb0mnlp8b680ywdl3gvggs02vzcn3py-bazel-0.17.1.drv', '/nix/store/d7bq5ir7mxhs87h0zy88daa1g5glkyjl-zulu11.2.3-jdk11.0.1.drv' failed

It seems like it's using the Linux derivation here:

$ ls -l /nix/store/knc10wvsrgca7schl7d6hpplhvrsbwg4-zulu11.2.3-jdk11.0.1/lib/
total 410608
-rw-r--r--  1 uri  staff      39427 19 Oct 18:55 classlist
-rw-r--r--  1 uri  staff    4489118 19 Oct 18:55 ct.sym
-rwxr-xr-x  1 uri  staff       9863 19 Oct 18:55 jexec
drwxr-xr-x  4 uri  staff        128 19 Oct 18:55 jfr
drwxr-xr-x  3 uri  staff         96 19 Oct 19:07 jli
-rw-r--r--  1 uri  staff     106630 19 Oct 18:55 jrt-fs.jar
-rw-r--r--  1 uri  staff         29 19 Oct 18:55 jvm.cfg
-rw-r--r--  1 uri  staff      12769 19 Oct 18:55 libattach.so
-rw-r--r--  1 uri  staff     761905 19 Oct 18:55 libawt.so
-rw-r--r--  1 uri  staff      42709 19 Oct 18:55 libawt_headless.so
-rw-r--r--  1 uri  staff     490199 19 Oct 18:55 libawt_xawt.so
-rw-r--r--  1 uri  staff      25443 19 Oct 18:55 libdt_socket.so
-rw-r--r--  1 uri  staff      11432 19 Oct 18:55 libextnet.so
-rw-r--r--  1 uri  staff     842211 19 Oct 18:55 libfontmanager.so
-rw-r--r--  1 uri  staff     772361 19 Oct 18:55 libfreetype.so
-rw-r--r--  1 uri  staff      49510 19 Oct 18:55 libinstrument.so
-rw-r--r--  1 uri  staff      46995 19 Oct 18:55 libj2gss.so
-rw-r--r--  1 uri  staff      15994 19 Oct 18:55 libj2pcsc.so
-rw-r--r--  1 uri  staff      80337 19 Oct 18:55 libj2pkcs11.so
-rw-r--r--  1 uri  staff       8170 19 Oct 18:55 libjaas.so
-rw-r--r--  1 uri  staff     225489 19 Oct 18:55 libjava.so
-rw-r--r--  1 uri  staff     247117 19 Oct 18:55 libjavajpeg.so
-rw-r--r--  1 uri  staff       7803 19 Oct 18:55 libjawt.so
-rw-r--r--  1 uri  staff     276208 19 Oct 18:55 libjdwp.so
-rw-r--r--  1 uri  staff     135284 19 Oct 18:55 libjimage.so
-rw-r--r--  1 uri  staff      14366 19 Oct 18:55 libjsig.so
-rw-r--r--  1 uri  staff      82128 19 Oct 18:55 libjsound.so
-rw-r--r--  1 uri  staff     505031 19 Oct 18:55 liblcms.so
-rw-r--r--  1 uri  staff      25895 19 Oct 18:55 libmanagement.so
-rw-r--r--  1 uri  staff       7751 19 Oct 18:55 libmanagement_agent.so
-rw-r--r--  1 uri  staff      30570 19 Oct 18:55 libmanagement_ext.so
-rw-r--r--  1 uri  staff     531075 19 Oct 18:55 libmlib_image.so
-rw-r--r--  1 uri  staff     113129 19 Oct 18:55 libnet.so
-rw-r--r--  1 uri  staff      86553 19 Oct 18:55 libnio.so
-rw-r--r--  1 uri  staff       9283 19 Oct 18:55 libprefs.so
-rw-r--r--  1 uri  staff       6781 19 Oct 18:55 librmi.so
-rw-r--r--  1 uri  staff      58795 19 Oct 18:55 libsaproc.so
-rw-r--r--  1 uri  staff      28671 19 Oct 18:55 libsctp.so
-rw-r--r--  1 uri  staff     370420 19 Oct 18:55 libsplashscreen.so
-rw-r--r--  1 uri  staff     318147 19 Oct 18:55 libsunec.so
-rw-r--r--  1 uri  staff     217017 19 Oct 18:55 libunpack.so
-rw-r--r--  1 uri  staff      64725 19 Oct 18:55 libverify.so
-rw-r--r--  1 uri  staff      37209 19 Oct 18:55 libzip.so
-rw-r--r--  1 uri  staff  140987885 19 Oct 18:55 modules
-rw-r--r--  1 uri  staff       3793 19 Oct 18:55 psfont.properties.ja
-rw-r--r--  1 uri  staff      11390 19 Oct 18:55 psfontj2d.properties
drwxr-xr-x  8 uri  staff        256 29 Oct 11:01 security
drwxr-xr-x  5 uri  staff        160 19 Oct 19:07 server
-rw-r--r--  1 uri  staff   57825731 19 Oct 18:55 src.zip
-rw-r--r--  1 uri  staff     105882 19 Oct 18:55 tzdb.dat

They're Linux shared libraries:

$ file /nix/store/knc10wvsrgca7schl7d6hpplhvrsbwg4-zulu11.2.3-jdk11.0.1/lib/libfontmanager.so
/nix/store/knc10wvsrgca7schl7d6hpplhvrsbwg4-zulu11.2.3-jdk11.0.1/lib/libfontmanager.so: ELF 64-bit LSB shared object x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=79c4d8cf0e7d1dd5c0dbc745bda6b4b70256dc9a, not stripped

As opposed to Darwin shared libraries:

$ file /usr/lib/libSystem.dylib
/usr/lib/libSystem.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [i386:Mach-O dynamically linked shared library i386]
/usr/lib/libSystem.dylib (for architecture x86_64):     Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libSystem.dylib (for architecture i386):       Mach-O dynamically linked shared library i386

* the jre is no longer an official part of the jdk (jmod is
  recommended as a replacement when needing to create smaller runtime
  images)

* darwin continues to use zulu from azul

* apps that used 10 now use 11 (eclipse, bazel, josm)
@jerith666
Copy link
Contributor Author

Oh geeze -- facepalm! I just followed the Referer:https://www.azul.com/downloads/zulu/zulu-linux/ link, which points to linux, and cut-n-pasted away. :(

Fixed in 1bd7b98, please try again!

@uri-canva
Copy link
Contributor

All good, bazel_jdk11 builds and runs correctly with 1bd7b98c7975136ddd6183a155e90688fd5b3e43. I wasn't able to test building java 11 code with it because your branch doesn't have bazel-0.18.0 from current master, but only bazel-0.17.1 from an older point, but I think it should be ok as far as the jdk is concerned.

@jerith666 jerith666 changed the title WIP: openjdk: 10.0.2 -> 11 openjdk: 10.0.2 -> 11.0.1 Oct 29, 2018
@jerith666
Copy link
Contributor Author

Awesome, thank you! Removed "WIP" from title, ready to merge now! :)

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fpletz fpletz merged commit 38db6fd into NixOS:master Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants