purejava / appindicator-gtk3-java

Java bindings for appindicator
MIT License
10 stars 0 forks source link

JDK 22 support for libappindicator-gtk3-java-full and libayatana-appindicator-java-full #37

Closed purejava closed 8 months ago

purejava commented 9 months ago

Please agree to the following

Summary

Bindings need to be creatad newly via jextract

Motivation

Java 22 will be released by the end of the month. These bindings have already been successfully generated with Java 22 for the minimal variant.

Nevertheless, using jextract fails for the other two variants due to a bug in jextract.

The generated bindings contain a lot of dumped in locations like the following, that make it impossible to compile the code:

purejava/appindicator/sigevent.java:        sigevent.union (unnamed at /usr/include/bits/types/sigevent_t.h:28:5).layout().withName("_sigev_un")
purejava/appindicator/sigevent.java:    public static class union (unnamed at /usr/include/bits/types/sigevent_t.h:28:5) {
purejava/appindicator/sigevent.java:        union (unnamed at /usr/include/bits/types/sigevent_t.h:28:5)() {
purejava/appindicator/sigevent.java:            sigevent.union (unnamed at /usr/include/bits/types/sigevent_t.h:28:5).struct (unnamed at /usr/include/bits/types/sigevent_t.h:36:2).layout().withName("_sigev_thread")
purejava/appindicator/sigevent.java:        ).withName("union (unnamed at /usr/include/bits/types/sigevent_t.h:28:5)");
purejava/appindicator/sigevent.java:        public static class struct (unnamed at /usr/include/bits/types/sigevent_t.h:36:2) {
purejava/appindicator/sigevent.java:            struct (unnamed at /usr/include/bits/types/sigevent_t.h:36:2)() {
purejava/appindicator/sigevent.java:            ).withName("struct (unnamed at /usr/include/bits/types/sigevent_t.h:36:2)");
purejava/appindicator/__mbstate_t.java:        __mbstate_t.union (unnamed at /usr/include/bits/types/__mbstate_t.h:16:3).layout().withName("__value")
purejava/appindicator/__mbstate_t.java:    public static class union (unnamed at /usr/include/bits/types/__mbstate_t.h:16:3) {
purejava/appindicator/__mbstate_t.java:        union (unnamed at /usr/include/bits/types/__mbstate_t.h:16:3)() {
purejava/appindicator/__mbstate_t.java:        ).withName("union (unnamed at /usr/include/bits/types/__mbstate_t.h:16:3)");
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_LINK_MAX = 0
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_MAX_CANON = 1
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_MAX_INPUT = 2
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_NAME_MAX = 3
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_PATH_MAX = 4
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_PIPE_BUF = 5
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_CHOWN_RESTRICTED = 6
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_NO_TRUNC = 7
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_VDISABLE = 8
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_SYNC_IO = 9
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_ASYNC_IO = 10
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_PRIO_IO = 11
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_SOCK_MAXBUF = 12
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_FILESIZEBITS = 13
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_REC_INCR_XFER_SIZE = 14
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_REC_MAX_XFER_SIZE = 15
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_REC_MIN_XFER_SIZE = 16
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_REC_XFER_ALIGN = 17
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_ALLOC_SIZE_MIN = 18
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_SYMLINK_MAX = 19
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:24:1)._PC_2_SYMLINKS = 20
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_ARG_MAX = 0
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_CHILD_MAX = 1
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_CLK_TCK = 2
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_NGROUPS_MAX = 3
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_OPEN_MAX = 4
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_STREAM_MAX = 5
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_TZNAME_MAX = 6
purejava/appindicator/app_indicator_h_14.java:     * enum enum (unnamed at /usr/include/bits/confname.h:71:1)._SC_JOB_CONTROL = 7

Considered Alternatives

No response

Anything else?

The bindings for minimal were generated on Java 22 with jextract 22 JDK version 22-ea+28-2271 clang version 18.1.0rc (http://git.linaro.org/toolchain/jenkins-scripts.git 09f505cadfbe9987730e641398ab9a2ca0cdb67f).

purejava commented 8 months ago

The bindings for libappindicator-gtk3-java-full and libayatana-appindicator-java-full can be generated with jextract, when the tool was compiled with clang+llvm-13.0.1 before. Nevertheless, this requires an additional package installed for building: yay -S ncurses5-compat-libs.

Done with cfa3c3cba8976433f22dab5302d53fa4940d3868 and 7b89573f831dd63830d3f93fef4ad5ba56263ba7.