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

jdk11_webkit: init #216611

Closed
wants to merge 3 commits into from
Closed

Conversation

nazarewk
Copy link
Member

@nazarewk nazarewk commented Feb 16, 2023

Description of changes
  1. adds webkit-enabled openjfx11 option

loosely inspired by #205059

Things done

This is still work-in-progress as I failed to build it.

  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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
  • Fits CONTRIBUTING.md.

@nazarewk
Copy link
Member Author

nazarewk commented Feb 16, 2023

Currently stuck at:

openjfx-modular-sdk> Build file '/build/source/build.gradle' line: 4031
openjfx-modular-sdk> * What went wrong:
openjfx-modular-sdk> A problem occurred evaluating root project 'source'.
openjfx-modular-sdk> > Could not resolve all files for configuration ':web:icu'.
openjfx-modular-sdk>    > Could not resolve :icu4c-71_1-data-bin-l.
openjfx-modular-sdk>      Required by:
openjfx-modular-sdk>          project :web
openjfx-modular-sdk>       > Could not resolve :icu4c-71_1-data-bin-l.
openjfx-modular-sdk>          > Could not get resource 'https://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/icu4c-71_1-data-bin-l.zip'.
openjfx-modular-sdk>             > Could not HEAD 'https://download.eclipse.org/eclipse/updates/4.6/R-4.6.3-201703010400/plugins/icu4c-71_1-data-bin-l.zip'.
openjfx-modular-sdk>                > download.eclipse.org: Temporary failure in name resolution
openjfx-modular-sdk>       > Could not resolve :icu4c-71_1-data-bin-l.
openjfx-modular-sdk>          > Could not get resource 'https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-data-bin-l.zip'.
openjfx-modular-sdk>             > Could not HEAD 'https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-data-bin-l.zip'.
openjfx-modular-sdk>                > github.com: Temporary failure in name resolution

The file is available for download at https://github.com/unicode-org/icu/releases/tag/release-71-1 , not sure how to make Gradle accept it?

links:

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Feb 16, 2023
@ofborg ofborg bot requested a review from abbradar February 16, 2023 08:25
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 labels Feb 16, 2023
@nazarewk
Copy link
Member Author

Somebody on Element suggested using fetchurl to get the ZIP and replace it's usage with file://${icu4c-src}.

Sadly I don't know Gradle (or any other Java packaging) to know how to replace the lines responsible https://github.com/openjdk/jfx11u/blob/11.0.19%2B0/build.gradle#L3949-L3950

@nazarewk
Copy link
Member Author

Note: I've run the Xiaomi Unlock tool on another system VM and it doesn't work anymore so I won't be pushing forward with enabling the Webkit in JavaFX so feel free to take over.

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Feb 28, 2023
@t-gebauer
Copy link
Contributor

t-gebauer commented Mar 23, 2023

Related issue: libjfxwebkit.so missing in jdk #162064

This should probably target staging: #206643 has already made some of the same changes there.

Personally, I am not sure about adding a separate jdk11_webkit package, but we should definitely fix openjfx.override { withWebKit = true; }

@t-gebauer
Copy link
Contributor

t-gebauer commented Mar 24, 2023

I got it to build successfully.

  1. Local file dependency (Grade - File dependencies)
--replace 'icu name: "icu4c-''${icuFileVersion}-data-bin-l", ext: "zip"' 'icu files("${icuBinLZip}")'
  1. But it is not enough, we also need to preserve the original file name (well, at least part of it ), because of a glob in a make file: icu4c-*.zip.
<=====--------> 41% EXECUTING [5m 58s]> :web:compileNativeLinux[ 29%] Built target data_as_asm
[ 29%] Generating ../../../icu/data/icudt71l.dat
java.io.FileNotFoundException:  (No such file or directory)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111)
        at jdk.jartool/sun.tools.jar.Main.run(Main.java:388)
        at jdk.jartool/sun.tools.jar.Main.main(Main.java:1683)
make[2]: *** [Source/ThirdParty/icu/CMakeFiles/icudata.dir/build.make:78: icu/data/icudt71l.dat] Error 1
make[1]: *** [CMakeFiles/Makefile2:1227: Source/ThirdParty/icu/CMakeFiles/icudata.dir/all] Error 2
make: *** [Makefile:111: all] Error 2

Success (WebKit build took ~50 minutes):

$ ls -lh /nix/store/bxj2zrgjp4jzglxz2yxclklc0sd99lvf-openjfx-modular-sdk-17.0.6+3/modules_libs/javafx.web/
total 94M
-r-xr-xr-x 1 root root 94M Jan  1  1970 libjfxwebkit.so

@t-gebauer t-gebauer mentioned this pull request Mar 25, 2023
12 tasks
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@linsui
Copy link
Contributor

linsui commented May 9, 2024

Replaced by #300573.

@linsui linsui closed this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants