Summary: | dev-java/ant: 1.10.9-launch.patch - Warning: Unable to determine tools.jar location. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | Current packages | Assignee: | Java team <java> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | alex, einfair, gentoo, gentoo, gentoobugs, jlhamm, redblade7, xaviermiller |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=682156 https://bugs.gentoo.org/show_bug.cgi?id=730456 https://github.com/gentoo/gentoo/pull/39126 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 865393 | ||
Bug Blocks: |
Description
Dennis Schridde
2019-03-31 13:47:25 UTC
(In reply to Dennis Schridde from comment #0) > # ant -version > Warning: Unable to determine tools.jar location. > If build fails because sun.* classes could not be found, > Make sure you are using a JDK, not JRE as your user/system VM. > and that you have java-config version 2.0.30 or above installed. > Apache Ant(TM) version 1.10.5 compiled on February 4 2019 > > > This confuses app-office/libreoffice-6.2.2.2's ./configure: > checking whether Ant is >= 1.6.0... ./configure: line 39234: test: determine > because are have 1: integer expression expected Bug #682156 contains a patch to fix this, which I consider to be an independent issue. openjdk11 is unsupported now and useflag is masked for a reason. I advise to avoid using it as system vm if you unmasked the flag. Absolutely no work was done to support it in gentoo unfortunately, and not sure when we gonna do it. I’ll leave this open but don’t expect a quick fix for it. Since OpenJDK 11 is no longer masked, what's the status on this bug? Should such warning be printed to stderr instead? Then apps should not see it when running configure You may be able to workaround this issue by setting: ANT_RESPECT_JAVA_HOME=y in your env. Anyhow, seems to me that javea-11 should be excluded from the warning, like apple-jdk-bin. Even better if that warning was removed FYI, in addition to libreoffice, these does not build for me with java-11 as default VM and USE=java : sys-libs/db-5.3.28-r2 sys-devel/gettext-0.19.8.1 app-emulation/virtualbox-5.2.32 sci-mathematics/octave-4.2.2 net-misc/tigervnc (In reply to Joakim Tjernlund from comment #5) > You may be able to workaround this issue by setting: > ANT_RESPECT_JAVA_HOME=y > in your env. This worked for me. (In reply to Joakim Tjernlund from comment #5) > You may be able to workaround this issue by setting: > ANT_RESPECT_JAVA_HOME=y > in your env. This worked for me. I've tracked down the problem and will see if I can get a patch in for 1.10.8. The /usr/bin/ant script has been patched by gentoo to check for $(java-config -f) != apple-jdk-bin* and warn if tools.jar is not found. Tools.jar is not part of the JDK as of version 9 so this check should probably just go away. I added patches to https://bugs.gentoo.org/730456, it just removed the warning. I guess we could try to check for jdk11 but this warning was added by gentoo, not upstream, so I don't think we really need it. *** Bug 865393 has been marked as a duplicate of this bug. *** any progress? have that at 2024-02-29: $ JAVA_HOME=/opt/openjdk-bin-17.0.6_p10/ ant -version Warning: Unable to determine tools.jar location. If build fails because sun.* classes could not be found, Make sure you are using a JDK, not JRE as your user/system VM. and that you have java-config version 2.0.30 or above installed. Apache Ant(TM) version 1.10.9 compiled on July 14 2022 (In reply to Einstok Fair from comment #12) > any progress? have that at 2024-02-29: > [...] waiting for bug #922766. are you getting that error also with the new version? (In reply to Einstok Fair from comment #12) > any progress? have that at 2024-02-29: > > $ JAVA_HOME=/opt/openjdk-bin-17.0.6_p10/ ant -version What is the purpose of running that command? Does the warning cause any problem? Summary adjusted. (In reply to Volkmar W. Pogatzki from comment #14) > (In reply to Einstok Fair from comment #12) > > any progress? have that at 2024-02-29: > > > > $ JAVA_HOME=/opt/openjdk-bin-17.0.6_p10/ ant -version > > What is the purpose of running that command? Does the warning cause any > problem? I believe it's to demonstrate that the spurious warning is still there. From bug #865393: "tools.jar has been removed from JDK 9+ and ant versions from 1.10.x on fully support this--therefore this warning is spurious for installations where JDK 9 and above are being utilized. If the warning needs to stay in because some developers are still using JDK 8 and below, then at the very least there needs to be a check for the correct version of the JDK ant is using and suppress the warning if it detects JDK 9 and above." (In reply to James L. Hammons from comment #16) > [...] > "tools.jar has been removed from JDK 9+ and ant versions from 1.10.x on > fully support this--therefore this warning is spurious for installations > where JDK 9 and above are being utilized. > > If the warning needs to stay in because some developers are still using JDK > 8 and below, then at the very least there needs to be a check for the > correct version of the JDK ant is using and suppress the warning if it > detects JDK 9 and above." If that warning caused a problem (does it?) it should imho be restricted to JDK:1.8. Not sure if the patch mentioned in https://bugs.gentoo.org/865393#c1 would do that. Having a proper PR for ${FILESDIR}/1.10.9-launch.patch would be nice. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86a8ea387628d018bf36113a3a316ec2cd3b4784 commit 86a8ea387628d018bf36113a3a316ec2cd3b4784 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2024-10-27 08:46:34 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-10-27 17:38:15 +0000 dev-java/ant-core: treeclean #938306 Bug: https://bugs.gentoo.org/938306 Bug: https://bugs.gentoo.org/682136 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> dev-java/ant-core/ant-core-1.10.14.ebuild | 26 -------------------------- dev-java/ant-core/metadata.xml | 13 ------------- 2 files changed, 39 deletions(-) |