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

openjdk8: replacing jre symlinking with copy #68382

Closed
wants to merge 1 commit into from

Conversation

d-goldin
Copy link
Contributor

@d-goldin d-goldin commented Sep 9, 2019

Motivation for this change

For space optimization reasons, the JRE was linked into the JDK from a
separate output. While this saves some space, it breaks certain
assumptions made in some software, expecting the JRE to reside within
the JDK tree and to be able to reach JDK libraries by traversing
up the folders and similar.

This approach should reduce the need for workarounds in jvm based
builds and other issues at the cost of some storage space.

JDK colosure size delta: +24%
JRE colosure size delta: +4% (this is likely for other reasons)

This addresses #37364
and might also supersede #68370

I tested this building jogl (removing the workaround) and hadoop.

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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @edwtjo
cc @NeQuissimus
cc @volth

For space optimization reasons, the JRE was linked into the JDK from a
separate output. While this saves some space, it breaks certain
assumptions made in some software, expecting the JRE to reside within
the JDK tree and to be able to reach JDK libraries by traversing
up the folders and similar.

This approach should reduce the need for workarounds in jvm based
builds and other issues at the cost of some storage space.

JDK colosure size delta: +24%
JRE colosure size delta: +4% (this is likely for other reasons)

This addresses NixOS#37364
and might also supersede NixOS#68370

I tested this building jogl (removing the workaround) and hadoop.
@lheckemann lheckemann added this to the 19.09 milestone Sep 10, 2019
@lopsided98
Copy link
Contributor

Was this introduced by #65247? I changed from using lndir to ln -s without realizing the problems it would cause, so it seems like the solution should just be to go back to using lndir, which should fix the problem without increasing the package size.

@d-goldin
Copy link
Contributor Author

@lopsided98: I did not bisect the error, so did missed this change. Just tried a state before the commit and it seems to compile fine. Closing then.

@d-goldin d-goldin closed this Sep 10, 2019
@d-goldin d-goldin deleted the openjdk8_copy_jre branch September 10, 2019 19:05
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