FS#79844 - [kodi] recent jre-openjdk causes FTBFS

Attached to Project: Arch Linux
Opened by John (graysky) - Tuesday, 03 October 2023, 20:27 GMT
Last edited by Toolybird (Toolybird) - Friday, 06 October 2023, 07:02 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ike Devolder (BlackEagle)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I am not sure the precise nature of the issue, but the recent update to jre-openjdk causes a build failure when building kodi-nexus-git. Complete build log is attached.

According to https://javaalmanac.io/bytecode/versions/ the class file version 65 would match jre/jdk 21 and as class files should be backward compatible (i.e. run on newer JREs) might mean that this jre / java is too old (not too new).

I am not sure if this is a packaging issue or a problem upstream. I *think* the last-known-good package was version 20.0.2.u9-3 but can investigate this when I have a bit more time.


Error:

Caught: BUG! exception in phase 'semantic analysis' in source unit '/build/kodi-nexus-git/src/xbmc/tools/codegenerator/Generator.groovy' Unsupported class file major version 65
BUG! exception in phase 'semantic analysis' in source unit '/build/kodi-nexus-git/src/xbmc/tools/codegenerator/Generator.groovy' Unsupported class file major version 65
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
[ 96%] Building CXX object build/network/httprequesthandler/CMakeFiles/network_httprequesthandlers.dir/HTTPRequestHandlerUtils.cpp.o
make[2]: *** [build/swig/CMakeFiles/python_binding.dir/build.make:112: build/swig/AddonModuleXbmcwsgi.i.cpp] Error 1
make[2]: *** Waiting for unfinished jobs....

Additional info:
* package version(s) jre-openjdk 21.u35-3
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 06 October 2023, 07:02 GMT
Reason for closing:  Fixed
Additional comments about closing:  kodi 20.2-4
Comment by Toolybird (Toolybird) - Tuesday, 03 October 2023, 20:53 GMT
This clearly looks like an upstream kodi issue. Does "kodi" in the main repo still build?
Comment by loqs (loqs) - Tuesday, 03 October 2023, 21:27 GMT
> Does "kodi" in the main repo still build?
No.

What if groovy was built from source using jdk 21 rather than unpacking upstream's built tarball?
Comment by loqs (loqs) - Wednesday, 04 October 2023, 13:02 GMT
As the issue appears to be groovy being incompatible with Java 21 I would suggest adding that limit to groovy [1]. kodi can also be fixed by adding a version limit to its PKGBUILD [2].

[1] PKGBUILD.diff.groovy
[2] PKGBUILD.diff.kodi
Comment by John (graysky) - Wednesday, 04 October 2023, 18:42 GMT
Good call, loqs. Modifying kodi's PKGBUILD as you recommended did indeed fix the build for me. I also see that Antonio Rojas incorporated this change into 20.2-4. It is probably OK to close this ticket now. Thank you for your insights into these as always.

Loading...