Conversation
|
very cool, September release and we're basically ready?! :D |
There was a problem hiding this comment.
ls is not meant to be used in scripts. Use find.
There was a problem hiding this comment.
Please use pkg-config --libs for all these libs such that it will continue to work.
There was a problem hiding this comment.
Inside a nix-shell, my best guess at what you mean doesn't seem to work for most of the libs being used (fontconfig is the only one it likes, apparently):
[nix-shell:/tmp/jdk/8]$ pkg-config --libs fontconfig Xinerama cups Xrandr magic
Package Xinerama was not found in the pkg-config search path.
Perhaps you should add the directory containing `Xinerama.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Xinerama' found
Package cups was not found in the pkg-config search path.
Perhaps you should add the directory containing `cups.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cups' found
Package Xrandr was not found in the pkg-config search path.
Perhaps you should add the directory containing `Xrandr.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Xrandr' found
Package magic was not found in the pkg-config search path.
Perhaps you should add the directory containing `magic.pc'
to the PKG_CONFIG_PATH environment variable
No package 'magic' found
Can you explain further? (I'm a Java guy mostly, not too familiar with C build tools and conventions.)
There was a problem hiding this comment.
@0xABAB was removed from the NixOS organisation for being too helpful from what I can see. :')
Let me see if I help...
/usr/lib/x86_64-linux-gnu/pkgconfig/xinerama.pc is in Debian unstable amd64. If the nix packaging doesn't have such file, that would seem surprising to me at least. If there really is no such file, then that should ideally be filed as a bug.
Just add a # FIXME replace with pkg-config call once <referred issue> is fixed` and call it done is my recommendation.
There was a problem hiding this comment.
Does this mean you haven't tested this with a real application? I.e., that it shows attractive fonts.
There was a problem hiding this comment.
policytool and jconsole are both GUI apps that are part of the JDK, and the fonts looked fine to me in them. I have not tested any other apps yet, but certainly will before removing the "WIP" from the title. :)
There was a problem hiding this comment.
I prefer to see subshell instead of a bashism.
There was a problem hiding this comment.
There are less powerful versions of eval that are safer to use in this case.
There was a problem hiding this comment.
Use the + version of find, not ;.
There was a problem hiding this comment.
I don't see any variants of eval in the bash manpage ... ?
There was a problem hiding this comment.
Can't this be done upstream?
There was a problem hiding this comment.
Maybe for 10 -- I'm sure the window for this sort of change for 9 is closed by now though.
|
This is going in the right direction. |
|
1st round of |
|
The cleanup commit conflicts with 3cb745d. It'll be trivial to resolve, just waiting for what I assume is the resulting mass-rebuild to happen before rebasing on top of it. :) |
as recommended by 0xABAB in NixOS#27194
this starts with copy of 8.nix and just updates hashes and replaces 8 with 9. it also tweaks the version handling because we aren't dealing with an update version yet.
fix-java-home: surrounding code changed slightly swing-use-gtk-jdk9: location of the file being patched changed due to modularization read-truststore-from-env: the code that handles the trustStore was refactored out into a helper class in upstream commit http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/904861872c0e adlc_updater: this isn't present anymore
this requires that we switch to configureFlagsArray to deal with
whitespace
the errors being suppressed are show below:
* For target support_native_java.desktop_libawt_xawt_awt_Robot.o:
/tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c: In function 'isXCompositeDisplay':
/tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c:152:50: error: embedded '\0' in format
[-Werror=format-contains-nul]
snprintf(NET_WM_CM_Sn, sizeof(NET_WM_CM_Sn), "_NET_WM_CM_S%d\0", screenNumber);
^
/tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c:152:50: error: embedded '\0' in format
[-Werror=format-contains-nul]
cc1: all warnings being treated as errors
* For target support_native_jdk.hotspot.agent_libsa_ps_core.o:
/tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c: In function 'read_exec_segments':
/tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c:834:7: error: ignoring return value of 'pread', declared
with attribute warn_unused_result [-Werror=unused-result]
pread(ph->core->exec_fd, interp_name, exec_php->p_filesz, exec_php->p_offset);
^
cc1: all warnings being treated as errors
* separate jdk and jre images are now present under build/*/images * samples have been removed (JEP 298) -- TODO that JEP says demos will be gone too, but it seems some are still present? * bina directory is no longer present
in particular, the name of the config option for headless has changed, per https://bugs.openjdk.java.net/browse/JDK-8163102
the code being patched here seems to have changed substantially or perhaps even disappeared altogether. need to investigate whether these patches are still relevant.
|
I am merging this in, we can improve it later. |
|
Sorry for letting it sit so long! |
* openjdk 8: code cleanup as recommended by 0xABAB in #27194 * openjdk 9: init at ea build 176 this starts with copy of 8.nix and just updates hashes and replaces 8 with 9. it also tweaks the version handling because we aren't dealing with an update version yet. * openjdk 9: adapt patches from openjdk 8 fix-java-home: surrounding code changed slightly swing-use-gtk-jdk9: location of the file being patched changed due to modularization read-truststore-from-env: the code that handles the trustStore was refactored out into a helper class in upstream commit http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/904861872c0e adlc_updater: this isn't present anymore * openjdk 9: make two more warnings-as-errors non-fatal this requires that we switch to configureFlagsArray to deal with whitespace the errors being suppressed are show below: * For target support_native_java.desktop_libawt_xawt_awt_Robot.o: /tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c: In function 'isXCompositeDisplay': /tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c:152:50: error: embedded '\0' in format [-Werror=format-contains-nul] snprintf(NET_WM_CM_Sn, sizeof(NET_WM_CM_Sn), "_NET_WM_CM_S%d\0", screenNumber); ^ /tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c:152:50: error: embedded '\0' in format [-Werror=format-contains-nul] cc1: all warnings being treated as errors * For target support_native_jdk.hotspot.agent_libsa_ps_core.o: /tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c: In function 'read_exec_segments': /tmp/nix-build-openjdk-9ea-b176.drv-0/jdk9-jdk-9+176/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c:834:7: error: ignoring return value of 'pread', declared with attribute warn_unused_result [-Werror=unused-result] pread(ph->core->exec_fd, interp_name, exec_php->p_filesz, exec_php->p_offset); ^ cc1: all warnings being treated as errors * openjdk 9: ea+176 -> ea+180 * openjdk 9: TODO disable infinality patches, at least to start the code being patched here seems to have changed substantially or perhaps even disappeared altogether. need to investigate whether these patches are still relevant. * openjdk 9: update installPhase for modularization * separate jdk and jre images are now present under build/*/images * samples have been removed (JEP 298) -- TODO that JEP says demos will be gone too, but it seems some are still present? * bina directory is no longer present * openjdk 9: TODO handle *.pf files or purge this code completely * openjdk 9: update minimal jre components in particular, the name of the config option for headless has changed, per https://bugs.openjdk.java.net/browse/JDK-8163102 * TODO about echo -n vs printWords, #27427 (cherry picked from commit 02fe120)
Motivation for this change
Start figuring out how to build it before it's officially released. :)
Things done
minimal(jre9_headless)*.pfsymlink fix is still necessary(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)(no tests for jdk ... would be nice to write some, but I think that's better done separately)Tested compilation of all pkgs that depend on this change usingnix-shell -p nox --run "nox-review wip"./result/bin/)My current branch has all the gory details of my false starts, etc., and of course will need to some
rebase -iing before being merged. It does build though --./result/bin/java -versionand./result/bin/jshellboth work. :)