[PATCH] gnu: Set JAVA_HOME for all Java development kits.

  • Open
  • quality assurance status badge
Details
3 participants
  • Pierre Neidhardt
  • Christopher Baines
  • Roel Janssen
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 2 Apr 2020 10:10
(address . guix-patches@gnu.org)
20200402081017.28866-1-mail@ambrevar.xyz
* gnu/packages/java.scm (icedtea-6, icedtea-7, openjdk9)[native-search-paths]:
Set JAVA_HOME to "jre".
This fixes issues for which the Java tooling could not find Jars,
e.g. tools.jar.
---
gnu/packages/java.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 4d305aac49..ca6c64fc1e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1078,6 +1078,10 @@ machine.")))
(sha256
(base32
"0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "JAVA_HOME")
+ (files '("jre")))))
(home-page "http://icedtea.classpath.org")
(synopsis "Java development kit")
(description
@@ -1620,6 +1624,10 @@ bootstrapping purposes.")
("lcms" ,lcms)
("zlib" ,zlib)
("gtk" ,gtk+-2)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "JAVA_HOME")
+ (files '("jre")))))
(home-page "http://icedtea.classpath.org")
(synopsis "Java development kit")
(description
@@ -1923,6 +1931,10 @@ new Date();"))
("unzip" ,unzip)
("which" ,which)
("zip" ,zip)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "JAVA_HOME")
+ (files '("jre")))))
(home-page "https://openjdk.java.net/projects/jdk9/")
(synopsis "Java development kit")
(description
--
2.25.1
P
P
Pierre Neidhardt wrote on 2 Apr 2020 10:28
Re: bug#40387: Acknowledgement ([PATCH] gnu: Set JAVA_HOME for all Java development kits.)
(address . 40387@debbugs.gnu.org)(name . Roel Janssen)(address . roel@gnu.org)
87zhbu9tqa.fsf@ambrevar.xyz
I cannot test this patch unfortunately, build icedtea-8 fails for me
with


Toggle snippet (12 lines)
INFO: ZIP_DEBUGINFO_FILES=1
echo Generating precompiled header precompiled.hpp.gch
Generating precompiled header precompiled.hpp.gch
mkdir -p .
/gnu/store/x3jx25cd3q363mr7nbgzrhrv1vza6cf7-gcc-7.4.0/bin/g++ -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/prims -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/precompiled -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/cpu/x86/vm -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/os_cpu/linux_x86/vm -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/os/linux/vm -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"25.161-b12\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"nixbld\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea 3.7.0\"" -DDISTRIBUTION_ID="\"Custom build\"" -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -fno-strict-aliasing -g -fno-omit-frame-pointer -O3 -DVM_LITTLE_ENDIAN -D_LP64=1 -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -g -O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -c -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header /tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch
In file included from /tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:315:0:
/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp:250:2: fatal error: can't write PCH file: No space left on device
};
^
compilation terminated.

Even though I do have enough space and memory left.
Unsure what's going on.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6Foj0ACgkQm9z0l6S7
zH/aTQf/ZGpSM3zt9D1lBn0ayrkYM1NrDobzZPRyiKE+jtYeTNQtNX9Q3aBE7A+K
GJGQtCpWcQZGhoLqdlfRQhTEQ4yquLkfn2lsjZFxvgyakMRkli4VsyZ3RC/oZuKj
CTBeCU/66t5E3mNROqQz6IcitgEuom/xRW6W33P8TGCi2Ce8M6hwyPtKF2bfF2um
otuF8GuUCurgOcGJajmGNKjtMYZWWjjteAODDDNC3Q9ZOATrlFlQ03WCdjwGQq8R
4AwvKQf0b0agFEJSDATTbncN0RiPdXEKtNOIC8dicjN0SJWY064OVGVQwQuWSkx+
xXl6oRVNW1QEhQKnI3lmDqpfm84+9Q==
=Kt36
-----END PGP SIGNATURE-----

R
R
Roel Janssen wrote on 2 Apr 2020 10:56
9e3d44f966ddc66c4c1cfcd8928381a351e96a06.camel@gnu.org
On Thu, 2020-04-02 at 10:28 +0200, Pierre Neidhardt wrote:
Toggle quote (50 lines)
> I cannot test this patch unfortunately, build icedtea-8 fails for me
> with
>
>
> --8<---------------cut here---------------start------------->8---
> INFO: ZIP_DEBUGINFO_FILES=1
> echo Generating precompiled header precompiled.hpp.gch
> Generating precompiled header precompiled.hpp.gch
> mkdir -p .
> /gnu/store/x3jx25cd3q363mr7nbgzrhrv1vza6cf7-gcc-7.4.0/bin/g++ -DLINUX
> -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/tmp/guix-build-icedtea-3.7.0.drv-
> 0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/prims -I/tmp/guix-build-icedtea-
> 3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm -I/tmp/guix-build-
> icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/share/vm/precompiled
> -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-
> 2.6.13/openjdk/hotspot/src/cpu/x86/vm -I/tmp/guix-build-icedtea-3.7.0.drv-
> 0/icedtea-2.6.13/openjdk/hotspot/src/os_cpu/linux_x86/vm -I/tmp/guix-build-
> icedtea-3.7.0.drv-0/icedtea-2.6.13/openjdk/hotspot/src/os/linux/vm
> -I/tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-
> 2.6.13/openjdk/hotspot/src/os/posix/vm -I../generated
> -DHOTSPOT_RELEASE_VERSION="\"25.161-b12\""
> -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"nixbld\""
> -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\""
> -DDERIVATIVE_ID="\"IcedTea 3.7.0\"" -DDISTRIBUTION_ID="\"Custom build\"" -
> DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
> -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64
> -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions
> -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -fno-strict-
> aliasing -g -fno-omit-frame-pointer -O3 -DVM_LITTLE_ENDIAN -D_LP64=1 -
> Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -g
> -O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -c -MMD -MP
> -MF ../generated/dependencies/precompiled.hpp.gch.d -fpch-deps -x c++-header
> /tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-
> 2.6.13/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp -o
> precompiled.hpp.gch
> In file included from /tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-
> 2.6.13/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:315:0:
> /tmp/guix-build-icedtea-3.7.0.drv-0/icedtea-
> 2.6.13/openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/paralle
> lScavengeHeap.hpp:250:2: fatal error: can't write PCH file: No space left on
> device
> };
> ^
> compilation terminated.
> --8<---------------cut here---------------end--------------->8---
>
> Even though I do have enough space and memory left.
> Unsure what's going on.
>

Is your /tmp a separate partition, and full at the time this build fails?

Kind regards,
Roel Janssen
P
P
Pierre Neidhardt wrote on 2 Apr 2020 11:03
87d08qi7ip.fsf@ambrevar.xyz
/tmp is a separate partition but it's a tmpfs, it uses my virtual
memory which is largely free (5GiB+).

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6Fqm4ACgkQm9z0l6S7
zH9HAAf/WF1oFhFq1bBbcX7lA5BWV09xuUaACM22wCM62LjP0CI1GrGW0e7lRm8Z
z10zmDhCF9lcfH244MJCtLnhYRy+sZ2Tv9TmsQGu/iUX921rkqdcGzHA8Kdwbluu
gQ2dUryNDs5h5KPm/f06Cix8DmNxcRFM4aw8bPgz3LIN5slUXa7SAURiY+e1/2UT
u7GvvGIJP5eALGgfKIXevzU0gyF8xmpMtGeOxx+TmKYdBui9a80FiA65jZ62pLiP
N9IWuc1cMoDaTmczyC7OE6crDFuufvMW0YgWNlUujq6YpkgUDxQmiYCC/4hfy9tc
bBcrqjoxiz00Bojwaj4pVIlmMPagfA==
=kzjA
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 18 Dec 2020 12:17
Re: [bug#40387] [PATCH] gnu: Set JAVA_HOME for all Java development kits.
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 40387@debbugs.gnu.org)
874kkj2wj4.fsf@cbaines.net
Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (5 lines)
> * gnu/packages/java.scm (icedtea-6, icedtea-7, openjdk9)[native-search-paths]:
> Set JAVA_HOME to "jre".
> This fixes issues for which the Java tooling could not find Jars,
> e.g. tools.jar.

Which tools have you observed not to work? I tried running javac and I
got the help output at least.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKkBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl/cj9BfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfPOg/4i9dYiAQ9chXoZzYMxFhw88+jTwULEg8N
2ekLQvrQd9+QNPr/jlBSRWqiAD9cZ57R0ak0VTsG+LQEr8rgAMXkQuUItcXk7TDJ
Pn4j7fkmWfTma/EtYb4Px56UVygC5LwYEAYdr9DoVCsBJM5zfyZtdJK8fpBSrLKr
hWjkmeq0u+Q8MQJ1GhwLGngIH0o4Pzt/00i+wFQ+bQ7YT0V/AYZ2lq5EAxC9lBce
yX9G+S9GvxZEHMNVN/Wq1Ks5PM3kFlrUsb2yzwFByrzNv1EgirEPVXTBUYfE1As8
0oTWovv6u3BNDr7xLF1HxS/S4p82y2/JVJEdjSgaZesBBsaHVzXfjeTRJwh2c/fv
N6sO4qlhPOo4NSR1Bb2qb/a/VyuGF32d/LkGNdt7iCQ1W0Mw9r5NQmBBXgwP42R5
UiHq2c/NRlEOaPL0sQC0s0kytw4HOkpjfdW+TBq0hsiue92E2cDaBqWnMn1NGGF2
Wrt0fxeQAOji/Exq9CjiPyv32Cy83yIyMAU5L3jkLXT70z2AhgV34952bIX03rew
RBAlcbTeEy2bOBCLgs8c7nDF2cH2efuRSr7LqazLvllPZ3NsCDU8XBP9oOmF+RVo
Y2tHYq2+J+/5atDbn8S/wafA5EjVjCEI2BVe/PMZiUkIqPG9JE2jpYmK3zkUA/WO
gPAO2M7BSA==
=oVJm
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 18 Dec 2020 13:31
(name . Christopher Baines)(address . mail@cbaines.net)(address . 40387@debbugs.gnu.org)
87h7ojgusm.fsf@ambrevar.xyz
Sorry, I forgot, I've moved on since then.
Maybe it was for some Clojure thing.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQFGBAEBCAAwFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl/coRkSHG1haWxAYW1i
cmV2YXIueHl6AAoJEJvc9Jeku8x/92IH/3Q+L23AeOGyIEK4nsgh+LZyrXTbA5sN
xx6NtT5iFHmrWwvAHONQovPR3mseh/0rr0HYBMauHAsD6pTJKO+u58UhKCQBdxVL
wdrUQyLL5w2s9aXbwgV0yLQm9CnOpfG7/ak0GfG+WDlPaOtNyH98bFnQUSMk7HX3
Zoa/GcZSyunE6wvhjOvO0JpO7X8Lmn3rZlre5NOkZCXoVXt0rnDEKZV1Yruydrti
02T87hrLvVp40g3DfxhKAYWX5oPQ1GPXKTG0wToN7l01miEcWTs1NtfMCtZD93+2
cUZsmbIkRrAkNNo//9sMbLVMmckc0g4CQnM74b1hfPGh0MYiss7hd3Q=
=Ghi1
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 40387@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40387
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch