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

openjfx11: init at 11.0.3+1 #63574

Merged
merged 1 commit into from Jun 28, 2019
Merged

openjfx11: init at 11.0.3+1 #63574

merged 1 commit into from Jun 28, 2019

Conversation

abbradar
Copy link
Member

@abbradar abbradar commented Jun 20, 2019

Motivation for this change

JavaFX (modern Java GUI framework) support in our GUI OpenJDK build. This allows for running JavaFX applications on NixOS. I don't know if any way to split it from OpenJDK and install it separately (perhaps via a symlink farm) exists; this is a documented way to integrate OpenJFX.

Before:

/nix/store/wkd27f2vi5vfx6c8cb0gcjaaxmhcfk4v-openjdk-11.0.3-ga	 637.7M

After:

/nix/store/vm1hzj1gs67xb0rqxndjrwvhxqz4j03y-openjdk-11.0.3-ga	 859.2M
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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

OpenJFX 8 is quite a bit different so it's subject to future work.

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

really good timing, I needed this to try out bisq about 10 seconds ago. testing it now.

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

getting

hash mismatch in fixed-output derivation '/nix/store/pydsjv0h52hf8r5vvqrl99dkdl9983n8-openjfx-deps-11.0.3-11.0.3+1':
  wanted: sha256:0isga30c598y4qwx1r30cm2m3yz639kmyvrw5hwlkcpgbn5053lv
  got:    sha256:1zzq7wfj0yly2qrgfwml387cnhi4ad891nnw1lalqi3wls01f2z7

@abbradar
Copy link
Member Author

That's what I feared. Let me check.

@abbradar
Copy link
Member Author

abbradar commented Jun 20, 2019

Nothing. @jb55 can you fix the checksum and then show me find -L ./result -type f | xargs sha256sum?

EDIT: that's for openjfx11.deps.

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

@abbradar sure give me a sec, I'm running into further build issues so I'm going to update my unstable branch to rule out any weirdness

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

I'm getting this on unstable:

these derivations will be built:
  /nix/store/ijfad24igcym0pd3abll40i1ysbzaaj1-openjfx-modular-sdk-11.0.3-11.0.3+1.drv
building '/nix/store/ijfad24igcym0pd3abll40i1ysbzaaj1-openjfx-modular-sdk-11.0.3-11.0.3+1.drv'...
unpacking sources
unpacking source archive /nix/store/ak9da97df7sfmkjhlfn65dkyj3478v6r-11.0.3+1.tar.gz
source root is rt-11.0.3+1
setting SOURCE_DATE_EPOCH to timestamp 1555071855 of file rt-11.0.3+1/tools/scripts/whatChanged
patching sources
configuring
no configure script, doing nothing
building

Welcome to Gradle 4.10.3!

Here are the highlights of this release:
 - Incremental Java compilation by default
 - Periodic Gradle caches cleanup
 - Gradle Kotlin DSL 1.0-RC6
 - Nested included builds
 - SNAPSHOT plugin versions in the `plugins {}` block

For more details see https://docs.gradle.org/4.10.3/release-notes.html

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/nix/store/ch67lqkmfmbg7y12wqi3dzxc42nphifx-gradle-4.10.3/lib/gradle/lib/groovy-all-2.4.15.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
> Task :buildSrc:compileJava NO-SOURCE

> Task :buildSrc:compileGroovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/nix/store/ch67lqkmfmbg7y12wqi3dzxc42nphifx-gradle-4.10.3/lib/gradle/lib/groovy-all-2.4.15.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes
> Task :buildSrc:jar
> Task :buildSrc:assemble
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build

> Configure project :
*****************************************************************
Unsupported gradle version 4.10.3 in use.
Only version 4.8 is supported. Use this version at your own risk
*****************************************************************
gradle.gradleVersion: 4.10.3
OS_NAME: linux
OS_ARCH: amd64
JAVA_HOME: /nix/store/xdliin147xw3868k0z1qi3qcq6hrn6a2-openjdk-bootstrap/lib/openjdk
JDK_HOME: /nix/store/xdliin147xw3868k0z1qi3qcq6hrn6a2-openjdk-bootstrap/lib/openjdk
java.runtime.version: 10-internal+0-adhoc..jdk10u-jdk-1046
java version: 10
java build number: 0
jdk.runtime.version: 10-internal+0-adhoc..jdk10u-jdk-1046
jdk version: 10
jdk build number: 0
minimum jdk version: 10
minimum jdk build number: 46
HAS_JAVAFX_MODULES: false
HAS_UNSUPPORTED_DESKTOP: false
STUB_RUNTIME: /nix/store/xdliin147xw3868k0z1qi3qcq6hrn6a2-openjdk-bootstrap/lib/openjdk
CONF: Release
NUM_COMPILE_THREADS: 16
COMPILE_TARGETS: linux
COMPILE_FLAGS_FILES: buildSrc/linux.gradle
HUDSON_JOB_NAME: not_hudson
HUDSON_BUILD_NUMBER: 0000
PROMOTED_BUILD_NUMBER: 0
PRODUCT_NAME: OpenJFX
RELEASE_VERSION: 11.0.3
RELEASE_SUFFIX: -internal
RELEASE_VERSION_SHORT: 11.0.3-internal
RELEASE_VERSION_LONG: 11.0.3-internal+0-2019-06-20-182840
RELEASE_VERSION_PADDED: 11.0.3.0
MAVEN_VERSION: 11.0.3-internal+0-2019-06-20-182840
UPDATE_STUB_CACHE: false
Building Webkit configuration /Release/ into /build/rt-11.0.3+1/modules/javafx.web/build/linux
module: project ':apps' (buildModule=NO)
module: project ':base' (buildModule=YES)
module: project ':controls' (buildModule=YES)
module: project ':fxml' (buildModule=YES)
module: project ':fxpackager' (buildModule=NO)
module: project ':fxpackagerservices' (buildModule=NO)
module: project ':graphics' (buildModule=YES)
module: project ':media' (buildModule=YES)
module: project ':swing' (buildModule=YES)
module: project ':swt' (buildModule=NO)
module: project ':systemTests' (buildModule=NO)
module: project ':web' (buildModule=YES)

> Task :verifyJava
> Task :base:processVersionInfo

> Task :base:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :base:processResources NO-SOURCE
> Task :base:classes
> Task :base:jar SKIPPED
> Task :base:assemble UP-TO-DATE
> Task :buildModuleBaseLinux
> Task :graphics:generateGrammarSource FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':graphics:antlr'.
> Could not resolve org.antlr:antlr-complete:3.5.2.
  Required by:
      project :graphics
   > Could not resolve org.antlr:antlr-complete:3.5.2.
      > Could not get resource 'http://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/ivy.xml'.
         > Could not GET 'http://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/ivy.xml'.
            > download.eclipse.org: Name or service not known

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 23s
5 actionable tasks: 5 executed
builder for '/nix/store/ijfad24igcym0pd3abll40i1ysbzaaj1-openjfx-modular-sdk-11.0.3-11.0.3+1.drv' failed with exit code 1
error: build of '/nix/store/ijfad24igcym0pd3abll40i1ysbzaaj1-openjfx-modular-sdk-11.0.3-11.0.3+1.drv' failed

does this require stuff from master? It doesn't look like it...

@abbradar
Copy link
Member Author

sigh Okay, I think I know what happens. Give me several minutes.

@abbradar abbradar force-pushed the openjfx branch 2 times, most recently from 1159b10 to b6f2b32 Compare June 20, 2019 19:02
@abbradar
Copy link
Member Author

Fixed. Fun fact - you need to build close-to-full JavaFX extra time to get all downloaded dependencies.

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

you need to build close-to-full JavaFX extra time to get all downloaded dependencies

my brain isn't parsing this, what do you mean?

@abbradar
Copy link
Member Author

abbradar commented Jun 20, 2019

I build JavaFX two times - the first one (thankfully without GStreamer and WebKit but still a full build) to get all dependencies into a fixed-output derivation as a byproduct.

@jb55
Copy link
Contributor

jb55 commented Jun 20, 2019

oh that sounds fun. I got it to build! thanks!

Copy link
Contributor

@jb55 jb55 left a comment

Choose a reason for hiding this comment

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

Briefly skimmed the commit, but was able to test it on an application and it appears to be working!

@risicle
Copy link
Contributor

risicle commented Jun 23, 2019

Hmm this seems to be causing an evaluation failure on darwin?

error: while querying the derivation named 'openjfx-modular-sdk-11.0.3-11.0.3+1':
while evaluating 'assertValidity' at /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:246:20, called from /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/make-derivation.nix:278:18:
while evaluating 'checkValidity' at /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:227:19, called from /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:247:18:
while evaluating 'hasDeniedUnfreeLicense' at /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:63:28, called from /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:228:8:
while evaluating 'isUnfree' at /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:49:14, called from /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:66:5:
while evaluating 'toList' at /Users/r/code/nixpkgs-devel/lib/lists.nix:270:12, called from /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/check-meta.nix:66:15:
while evaluating the attribute 'meta.license' at /Users/r/code/nixpkgs-devel/pkgs/development/compilers/openjdk/openjfx/11.nix:105:5:
while evaluating the attribute 'meta.license' at /Users/r/code/nixpkgs-devel/pkgs/stdenv/generic/make-derivation.nix:319:19:
attribute 'license' missing, at /Users/r/code/nixpkgs-devel/pkgs/development/compilers/openjdk/openjfx/11.nix:105:15

@risicle
Copy link
Contributor

risicle commented Jun 24, 2019

Yeah - non-nixos linux x86_64, openjfx11 itself builds fine but openjdk11 fails: https://gist.github.com/risicle/15c36f01f70cec28f1c9879dad2375fd

@abbradar
Copy link
Member Author

abbradar commented Jun 24, 2019

@risicle I've fixed Darwin problems. No idea what happens with your build though. I've tested in against master now, it builds for me on x86_64 NixOS.

Most curious is that it's in OpenJDK, not in OpenJFX. Why would it try to download anything?

@risicle
Copy link
Contributor

risicle commented Jun 24, 2019

Running it again and it appears to be working this time 🤷‍♂️

(Edit: yes, nox-review was happy)

@abbradar
Copy link
Member Author

Very strange, it's not like I changed anything of significance apart from disabling Darwin.

Anyway, thanks for testing! I'll merge this in several days if there is no better ideas about closure size..

@abbradar abbradar merged commit 9d9eb87 into NixOS:master Jun 28, 2019
@jerith666 jerith666 mentioned this pull request Jul 8, 2019
10 tasks
jlesquembre added a commit to jlesquembre/nixpkgs that referenced this pull request Jul 9, 2019
Updates jdk dependency from 8 to 11. Clojure 1.10.0 added support for
jdk11, and was released with a new develper tool: REBL
(https://github.com/cognitect-labs/REBL-distro). REBL depends on javafx,
currently only supported on Nix by jdk11 (see NixOS#63574)
@c0bw3b c0bw3b mentioned this pull request Nov 15, 2019
10 tasks
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

3 participants