termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.15k stars 3.02k forks source link

[Bug]: Java 17 needs updating to support backports by OpenJDK #21627

Closed ascopes closed 2 weeks ago

ascopes commented 2 weeks ago

Problem description

As part of Java 23's release, the -proc:full compiler flag has been added to deal with the new defaults for annotation processing.

OpenJDK has also ported this change back to Java 11, 17, and 21 but it appears that Java 17 has not been re-released on Termux with this change yet.

See https://bugs.openjdk.org/browse/JDK-8308245 for comms.

It looks like Termux just needs to rerun their build of Java 17 to pull this in.

What steps will reproduce the bug?

cat > Main.java <<'EOF'
public class Main {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
EOF

pkg in openjdk-17

javac -proc:full Main.java

What is the expected behavior?

Compilation should succeed.

In reality it fails due to an unsupported javac flag "-proc:full"

System information

✗ termux-info
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=4408
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.danyael.xyz/termux/termux-main stable main
Updatable packages:
ca-certificates-java/stable 1:2024.09.24 all [upgradable from: 1:2024.07.02]
ca-certificates/stable 1:2024.09.24 all [upgradable from: 1:2024.07.02]
coreutils/stable 9.5-3 aarch64 [upgradable from: 9.5-2]
liblzma/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
xz-utils/stable 5.6.3 aarch64 [upgradable from: 5.6.2]
termux-tools version:
1.43.5
Android version:
14
Kernel build information:
Linux localhost 6.1.57-android14-11-o-g26041213ac6c #1 SMP PREEMPT Sat Jul 13 04:26:41 UTC 2024 aarch64 Android
Device manufacturer:
OnePlus
Device model:
CPH2581
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.styling versionCode:1000
com.termux.api versionCode:51
licy183 commented 2 weeks ago

Cherry-picking https://github.com/openjdk/jdk17u/commit/561f956db2abd8908b8b2b3dca10bac1a1e0bfb7 and https://github.com/openjdk/jdk17u/commit/6d8febb7847f60a6caa7e867a15150a78356c8ec should fix this. I'll do it later.