Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917446 - www-servers/tomcat-{9.0.83,9.0.84}: failed with jdk:{1.8,11} (compile phase) - apache-tomcat-9.0.84-src/build.xml:93: Java version 17 or newer is required
Summary: www-servers/tomcat-{9.0.83,9.0.84}: failed with jdk:{1.8,11} (compile phase) ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-16 16:47 UTC by Ștefan Talpalaru
Modified: 2024-01-13 08:10 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,428.60 KB, text/plain)
2023-11-22 16:30 UTC, Volkmar W. Pogatzki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ștefan Talpalaru 2023-11-16 16:47:47 UTC
BUILD FAILED
/var/tmp/portage/www-servers/tomcat-9.0.83/work/apache-tomcat-9.0.83-src/build.xml:93: Java version 17 or newer is required (1.8.0_252 is installed)


Reproducible: Always
Comment 1 Volkmar W. Pogatzki 2023-11-22 16:30:38 UTC
Created attachment 875331 [details]
build log

Confirmed.

GENTOO_VM=openjdk-8  CLASSPATH="" JAVA_HOME="/usr/lib64/openjdk-8"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="javac"


Setting project property: tomcat.pool -> /var/tmp/portage/www-servers/tomcat-9.0.83/work/apache-tomcat-9.0.83-src/output/jdbc-pool
Setting project property: tomcat.xreflect -> /var/tmp/portage/www-servers/tomcat-9.0.83/work/apache-tomcat-9.0.83-src/output/xreflect
Setting project property: compile.release -> 8
Setting project property: min.java.version -> 8
Setting project property: build.java.version -> 17
Comment 2 Volkmar W. Pogatzki 2023-11-22 16:50:27 UTC
And, very similar for 8.5.96:

Setting project property: compile.release -> 8
Setting project property: min.java.version -> 8
Setting project property: build.java.version -> 11
Comment 3 Miroslav Šulc gentoo-dev 2023-12-15 07:17:19 UTC
that'd be weird if they would change the supported versions for a tomcat slot during the development. they still claim on their website lower supported versions:
https://tomcat.apache.org/whichversion.html

but what we can try is to build using a newer version but still create lower version bytecode, that is increase version in DEPEND but keep RDEPEND as it is.
Comment 4 Timo Gurr 2024-01-08 13:54:25 UTC
(In reply to Miroslav Šulc from comment #3)
> that'd be weird if they would change the supported versions for a tomcat
> slot during the development. they still claim on their website lower
> supported versions:
> https://tomcat.apache.org/whichversion.html
The commit for the 9.0.x branch is https://github.com/apache/tomcat/commit/0602353aa2ed3c2c9a594c3914482c8be3358a6e "funnily" their comment even states <!-- Keep in sync with webapps/docs/tomcat-docs.xsl --> which apparently still reads 11 instead of 17: https://github.com/apache/tomcat/blob/9.0.x/webapps/docs/tomcat-docs.xsl#L41

After reverting the commit in question build fails with

/var/tmp/portage/www-servers/tomcat-9.0.84/work/apache-tomcat-9.0.84-src/build.xml:3211: java.lang.UnsupportedClassVersionError: aQute/bnd/ant/TestTask has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

So probably the reason was that the updated bundled bnd version 7.0.0 (https://github.com/apache/tomcat/commit/1ea0defa99b2fab44f7fcba9add55f24c0c5f5cc) was compiled with a more recent java version. Highly annoying.
Comment 5 Larry the Git Cow gentoo-dev 2024-01-13 08:10:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6eaf9430b9559d1e56e08f7df6161da59d99d63

commit c6eaf9430b9559d1e56e08f7df6161da59d99d63
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2024-01-13 08:10:01 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2024-01-13 08:10:23 +0000

    www-servers/tomcat: adjusted min java versions needed for compilation
    
    Closes: https://bugs.gentoo.org/917446
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 .../tomcat/{tomcat-10.1.16.ebuild => tomcat-10.1.16-r1.ebuild}        | 4 ++--
 .../tomcat/{tomcat-10.1.18.ebuild => tomcat-10.1.17-r1.ebuild}        | 2 +-
 .../tomcat/{tomcat-10.1.17.ebuild => tomcat-10.1.18-r1.ebuild}        | 4 ++--
 www-servers/tomcat/{tomcat-8.5.96.ebuild => tomcat-8.5.96-r1.ebuild}  | 4 ++--
 www-servers/tomcat/{tomcat-8.5.98.ebuild => tomcat-8.5.97-r1.ebuild}  | 2 +-
 www-servers/tomcat/{tomcat-8.5.97.ebuild => tomcat-8.5.98-r1.ebuild}  | 4 ++--
 www-servers/tomcat/{tomcat-9.0.83.ebuild => tomcat-9.0.83-r1.ebuild}  | 4 ++--
 www-servers/tomcat/{tomcat-9.0.85.ebuild => tomcat-9.0.84-r1.ebuild}  | 2 +-
 www-servers/tomcat/{tomcat-9.0.84.ebuild => tomcat-9.0.85-r1.ebuild}  | 4 ++--
 9 files changed, 15 insertions(+), 15 deletions(-)