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: init 19.0.1 #199802

Merged
merged 4 commits into from
Nov 30, 2022
Merged

OpenJDK: init 19.0.1 #199802

merged 4 commits into from
Nov 30, 2022

Conversation

jerith666
Copy link
Contributor

Description of changes

supporting work:

temurin-bin: 8.0.345 -> 8.0.352; 11.0.16 -> 11.0.17; 17.0.4 -> 17.0.5

simple run of generate_sources.py
openjdk: reduce number of places where default jdk version is specified
temurin-bin: init 18.0.2 and 19.0.1

... and the main event:

openjdk: init 19.0.1

as usual this is mostly copy-pasted from 18, so this commit is best
reviewed with '--find-copies-harder'

stop exposing openjdk 18 since it was not a long-term support release

change the default openjdk from 17 to 19 since nixpkgs is a
rolling-release repository

drop the ceremony around bootstrapping via adoptopenjdk for 64-bit
builds vs. via earlier openjdk builds for 32-bit, because, to be
frank, since we're using temurin now, it's not a simple copy-paste
job.  :-/  if someone needs a 32-bit openjdk, that work can be done
separately.

JavaFX revs from 17 to 19; it looks like 18 was never packaged along
with JDK 18.

* the gradle invocation used to build JavaFX must still be done with
  Java 18, as gradle does not yet support running itself on Java 19.

* a couple of patches need to be applied, since a new State enum was
  introduced in the JDK that collides with one in JavaFX.

* the hash of the gradle dependencies has not changed, which is
  surprising, but as far as I can tell correct.

cc @edwtjo @asbachb @xeals @Jonpez2

fixes #195638

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.


gradleProperties = ''
COMPILE_MEDIA = true
COMPILE_WEBKIT = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any chance to enable this? JabRef uses webkit and currently uses the lib from maven with a hack.

unzip $out/lib/javafx-web-*-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I gave it a shot, but it's sort of tangled up with the mystery of the sha256-dV7/... hash a few lines above. Even if I enable this for the deps, the output hash doesn't change! So, the gradle build must be storing the things it fetches somewhere ad-hoc ... and so the main JavaFX build still tries & fails to fetch them. :-/

linking explicitly to #162064 as well, as there's some discussion of this issue there too. I'm afraid I don't have any more ideas on this front. :(

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought now I understand the problem. As a workground, is that possible to use https://github.com/openjdk/jfx/blob/master/WEBKIT-MEDIA-STUBS.md#officially-released-libraries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm ... I don't understand still! :) The page you linked to says these libraries are necessary for running tests. I don't understand how the decision of whether or not to run the tests impacts whether libjfxwebkit.so is produced by the build or not, though.

This definitely feels like a discussion that's better had over in #162064, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean maybe it's possible to use the webkit files from the maven central directly?

Gradle has a task to automate downloading officially released libraries from MavenCentral.

Not sure if this can be used directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

This definitely feels like a discussion that's better had over in #162064, though.

Yes. Maybe I can have a try after this is merged.

@jerith666
Copy link
Contributor Author

Just pushed a new version that pins libreoffice to jdk17, since it doesn't build with 19.

I've just updated my work machine to use this, including running Eclipse on 19; will report back in a few days on whether it's feeling stable or not.

pkgs/development/compilers/openjdk/openjfx/19.nix Outdated Show resolved Hide resolved
pkgs/development/compilers/openjdk/openjfx/19.nix Outdated Show resolved Hide resolved
as usual this is mostly copy-pasted from 18, so this commit is best
reviewed with '--find-copies-harder'

stop exposing openjdk 18 since it was not a long-term support release

change the default openjdk from 17 to 19 since nixpkgs is a
rolling-release repository

drop the ceremony around bootstrapping via adoptopenjdk for 64-bit
builds vs. via earlier openjdk builds for 32-bit, because, to be
frank, since we're using temurin now, it's not a simple copy-paste
job.  :-/  if someone needs a 32-bit openjdk, that work can be done
separately.

JavaFX revs from 17 to 19; it looks like 18 was never packaged along
with JDK 18.

* the gradle invocation used to build JavaFX must still be done with
  Java 18, as gradle does not yet support running itself on Java 19.

* a couple of patches need to be applied, since a new State enum was
  introduced in the JDK that collides with one in JavaFX.

* the hash of the gradle dependencies has not changed, which is
  surprising, but as far as I can tell correct.

One application (libreoffice) doesn't work with 19 yet, so pin it to
jdk 17 for now.

Co-authored-by: Mario Rodas <marsam@users.noreply.github.com>
@jerith666
Copy link
Contributor Author

This is feeling pretty stable to me after a week at work.

@marsam marsam merged commit eed05da into NixOS:master Nov 30, 2022
fabianhjr added a commit to LibreCybernetics/nixpkgs that referenced this pull request Nov 30, 2022
There is currently a build issue with jdk19 (the new default from 17
after 2022-11-30; NixOS#199802)
@Luflosi
Copy link
Contributor

Luflosi commented Dec 22, 2022

Should this be backported? On 22.11, openjdk18 is marked as insecure as it has reached EOL while openjdk19 is not available.

@jerith666
Copy link
Contributor Author

Sure, I don't see why not. We'd just need to backport #203808 and #201321 too.

@jerith666
Copy link
Contributor Author

Noting that #232199 is the OpenJDK 20 initialization.

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.

OpenJDK 19
4 participants