Currently support for java is pinned to java 8 because in 11 they removed wsimport. Need to add to the tree a package that provides wsimport and add it as BDEPEND. See also https://bugs.gentoo.org/832166 The error still exists in virtualbox-7.0.2
(In reply to Viorel from comment #0) > Currently support for java is pinned to java 8 because in 11 they removed > wsimport. Need to add to the tree a package that provides wsimport and add > it as BDEPEND. > [...] If you need help when packaging those dependencies ping me on #gentoo-java in libera.chat
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a11f1f4701706742d6114104cbf4da827714026f commit a11f1f4701706742d6114104cbf4da827714026f Author: Viorel Munteanu <ceamac@gentoo.org> AuthorDate: 2024-07-26 14:36:43 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2024-07-26 14:58:47 +0000 app-emulation/virtualbox: add 7.1.0_beta1 This is a beta version, add unkeyworded. Branch 7.1 uses QT6. Cannot build the docs because: - this uses https://github.com/dita-ot/dita-ot (not yet packaged) to build the docs - dita-ot needs java 17 - java 17 lacks wsimport and virtualbox does not compile without it, and I wouldn't want to require both java 1.8 and java 17. For now mask the doc USE flag. If built with certain CFLAGS, does not start (xpcom errors). Do not respect user CFLAGS until I figure out a fix. Python 3.12 and python 3.13 still crash. Bug: https://bugs.gentoo.org/878299 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> app-emulation/virtualbox/Manifest | 3 +- .../virtualbox/virtualbox-7.1.0_beta1.ebuild | 732 +++++++++++++++++++++ 2 files changed, 734 insertions(+), 1 deletion(-)
(In reply to Volkmar W. Pogatzki from comment #1) > > [...] > > If you need help when packaging those dependencies ping me on #gentoo-java > in libera.chat Or try the pre-compiled jar from https://repo1.maven.org/maven2/com/sun/xml/ws/jaxws-tools/4.0.2/
I will try that, thanks.
Small update here. After installing dev-java/jaxws-ri-bin (not in tree) and dev-java/jaxws-api and after adding all needed jars to classpath, I get compile errors. So we're still stuck at java 1.8. I'll attach the log and I'll open an issue upstream.
Created attachment 903042 [details] java errors with openjdk-bin-11
(In reply to Viorel Munteanu from comment #5) > Small update here. > > After installing dev-java/jaxws-ri-bin (not in tree) and dev-java/jaxws-api > and after adding all needed jars to classpath, I get compile errors. > > So we're still stuck at java 1.8. > > I'll attach the log and I'll open an issue upstream. i'd like to see the ebuild. what branch is it? needs not be a PR.
I kind of hacked the Makefile by hand, but I can create a PR later and I'll ping you when done.
(In reply to Viorel Munteanu from comment #8) > I kind of hacked the Makefile by hand, but I can create a PR later and I'll > ping you when done. what is the build system here which triggers javac with '-source 9 -target 9'? is it aware of "$(java-pkg_get-source)" and "$(java-pkg_get-target)"?
It's a Makefile: if defined(VBOX_JAVA_VERSION) && $(VBOX_JAVA_VERSION) >= 110000 VBOX_JAVAC_OPTS = -encoding UTF-8 -source 9 -target 9 -Xlint:unchecked else if defined(VBOX_JAVA_VERSION) && $(VBOX_JAVA_VERSION) >= 90000 VBOX_JAVAC_OPTS = -encoding UTF-8 -source 6 -target 6 -Xlint:unchecked else VBOX_JAVAC_OPTS = -encoding UTF-8 -source 1.5 -target 1.5 -Xlint:unchecked endif I'll try to replace this with what you said, maybe it works. Thanks!
Their logic is clear: Java 11 dropped support for 1.5 [1] Java 17 dropped support for 1.6 Java 21 dropped support for 1.7 Java 21 still supports 1.8 and throws warnings it might be dropped in a future version Best i guess, would be to set VBOX_JAVAC_OPTS with "$(java-pkg_get-source)" and "$(java-pkg_get-target)" regardless what VBOX_JAVA_VERSION and put >=virtual/jre-1.8:* and >=virtual/jre-1.8:* In Gentoo we set -source and -target to the lowest version which is supported by the openjdk versions in the tree. Another idea: Patch that Makefile to not trigger javac and compare what I did in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1ddc1263008cc3a468688c1c166e9867d789d3f [1]https://marc.info/?l=gentoo-dev&m=161838633318104&w=2