Package Details: java-openjfx 22.0.1.u7-1

Git Clone URL: https://aur.archlinux.org/java-openjfx.git (read-only, click to copy)
Package Base: java-openjfx
Description: Java OpenJFX client application platform (open-source implementation of JavaFX) - latest version
Upstream URL: https://wiki.openjdk.java.net/display/OpenJFX/Main
Keywords: javafx openjfx
Licenses: GPL-2.0-only WITH Classpath-exception-2.0
Provides: java-openjfx
Submitter: freswa
Maintainer: Freso (AutoUpdateBot)
Last Packager: Freso
Votes: 8
Popularity: 3.11
First Submitted: 2023-10-08 20:20 (UTC)
Last Updated: 2024-04-21 06:19 (UTC)

Dependencies (33)

Sources (3)

Pinned Comments

Freso commented on 2024-04-17 10:17 (UTC)

@aubin Just use the java21-openjfx package?

For everyone else, disabling the building of WebKit seems to unbreak the build (for me at least). I’m not sure how essential the WebKit parts are to JavaFX overall, so a bit wary about changing this part of the PKGBUILD here. For anyone who wants to try it out, you can grab the package from this branch: https://gitlab.archlinux.org/freso/java-openjfx/-/tree/java-openjfx-no-webkit

Freso commented on 2024-03-31 22:35 (UTC)

Patches etc. are very welcome at https://gitlab.archlinux.org/freso/java-openjfx if you have any suggestions for how to fix the package. :)

Latest Comments

1 2 3 Next › Last »

dreieck commented on 2024-06-02 18:10 (UTC)

Can you add java22-openjfx=${pkgver} to the provides array, so that the conflict with java-openjfx-bin can be resolved correctly?

Regards!

dreieck commented on 2024-06-02 16:01 (UTC) (edited on 2024-06-02 16:02 (UTC) by dreieck)

Please add to build()

  _FIXWERROR="-Wno-error=incompatible-pointer-types"
  CFLAGS+=" ${_FIXWERROR}"
  CXXFLAGS+=" ${_FIXWERROR}"
  export CFLAGS
  export CXXFLAGS

(or similar),
otherwise build fails with GCC 14.x with

/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c: In function ‘checkSize’:
/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c:523:33: error: initialization of ‘jbyte *’ {aka ‘signed char *’} from incompatible pointer type ‘jfloat *’ {aka ‘float *’} [-Wincompatible-pointer-types]
  523 |         jbyte* newPointCoords = (jfloat*)realloc(info->pointCoords, info->lenCoords * sizeof(jfloat));
      |                                 ^
/var/cache/makepkg/build/java-openjfx/src/jfx22u-22.0.1-7/modules/javafx.graphics/src/main/native-font/freetype.c:525:27: error: assignment to ‘jfloat *’ {aka ‘float *’} from incompatible pointer type ‘jbyte *’ {aka ‘signed char *’} [-Wincompatible-pointer-types]
  525 |         info->pointCoords = newPointCoords;
      |                           ^

> Task :graphics:ccLinuxFontFreetype FAILED

FAILURE: Build failed with an exception.

Regards and thanks for maintaining!

Freso commented on 2024-04-17 10:17 (UTC)

@aubin Just use the java21-openjfx package?

For everyone else, disabling the building of WebKit seems to unbreak the build (for me at least). I’m not sure how essential the WebKit parts are to JavaFX overall, so a bit wary about changing this part of the PKGBUILD here. For anyone who wants to try it out, you can grab the package from this branch: https://gitlab.archlinux.org/freso/java-openjfx/-/tree/java-openjfx-no-webkit

aubin commented on 2024-04-12 10:02 (UTC)

java21-openjfx is LTS, it's not out-of-date. Or maybe I 'm missing something, How can I stay with LTS Java ?

lllf commented on 2024-04-08 12:12 (UTC) (edited on 2024-04-08 14:27 (UTC) by lllf)

This package doesn't seem to work?

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloFX extends Application {

    @Override
    public void start(Stage stage) {
        String javaVersion = System.getProperty("java.version");
        String javafxVersion = System.getProperty("javafx.version");
        Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
        Scene scene = new Scene(new StackPane(l), 640, 480);
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch();
    }

}
$ javac --module-path=/usr/lib/jvm/java-22-openjdk/lib --add-modules=javafx.controls HelloFX.java
$ java --module-path=/usr/lib/jvm/java-22-openjdk/lib --add-modules=javafx.controls HelloFX
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package jdk.internal.jimage.decompressor in both module java.base and module jrt.fs

This exact error given here: https://stackoverflow.com/questions/42986287/runtimeexception-package-jdk-internal-jimage-decompressor-in-module-jrt-fs-and

Perhaps it just shouldn't be installed into the jvm folder?

jghodd commented on 2024-04-07 04:03 (UTC) (edited on 2024-04-07 04:16 (UTC) by jghodd)

Despite feeling like I'm talking to myself here, I have been doing some digging around and found all the unresolved functions in the source code itself. So the problem has to be something in the build files (make files, C/CPP/LD flags, gradle properties, etc). I'm getting pretty frustrated at this point after a dozen or so attempts to build this monster. To get to the error condition requires about 24 hours of building, during which my system cores are pegged to the max. I believe this may be the final link that's failing. I have decades of experience developing software, but this is massive and has far too many build files to even start getting your head around unless you maintain it. Can somebody who knows how this code/build is structured please figure out why this last or near last link is failing? The errors I posted below pretty much define what's failing.

Edit: whoever wants this package, you can download the binary here: https://archlinux.pkgs.org/rolling/chaotic-aur-x86_64/java-openjfx-22.u30-1-x86_64.pkg.tar.zst.html

jghodd commented on 2024-04-05 05:16 (UTC) (edited on 2024-04-05 05:27 (UTC) by jghodd)

I noticed that everything the build wasn't able to resolve comes from the Sun Microsystems java API. Any chance Oracle's jdk is needed to build this vs. openjdk? I know...stupid question, but I can't think of anything else that might provide the library needed to resolve the link. I could imagine that these functions might be provided by the jre/jdk, but apparently they're not. What else should be needed for this?

Freso commented on 2024-03-31 22:35 (UTC)

Patches etc. are very welcome at https://gitlab.archlinux.org/freso/java-openjfx if you have any suggestions for how to fix the package. :)

jghodd commented on 2024-03-31 17:52 (UTC)

After making sure my build environment was set to jdk21, I got back to the original error which occurs when it tries to link whatever is produced by compileNativeJava. Can somebody push a binary for this, since it appears to be missing some dependency here - Sun Micro API from somewhere...


ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF8LockBase8lockSlowEv' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF8LockBase10unlockSlowEv' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF10fastMallocEj' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZN3WTF16fastZeroedMallocEj' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol '_ZNK3WTF10StringView23underlyingStringIsValidEv' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_addRangeImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseToEndImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_collapseToStartImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_containsNodeImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_deleteFromDocumentImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_dispose' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_emptyImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_extendImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getAnchorNodeImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getAnchorOffsetImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getBaseNodeImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getBaseOffsetImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getExtentNodeImpl' failed: symbol not defined
ld.lld: error: version script assignment of 'SUNWprivate_1.0' to symbol 'Java_com_sun_webkit_dom_DOMSelectionImpl_getExtentOffsetImpl' failed: symbol not defined
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

> Task :web:compileNativeLinux FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/distro/local/repository/java-openjfx/newbuild/java-openjfx/src/jfx22u-22-30/build.gradle' line: 3659

jghodd commented on 2024-03-30 19:22 (UTC) (edited on 2024-03-30 19:26 (UTC) by jghodd)

First, !lto is already set in options in PKGBUILD.

Still seeing the following error:


> Task :graphics:compileJava FAILED
You specified both --module-source-path and a sourcepath. These options are mutually exclusive. Ignoring sourcepath.
error: option --upgrade-module-path cannot be used together with --release
Usage: javac <options> <source files>
use --help for a list of possible options

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':graphics:compileJava'.
> Compilation failed with exit code 2; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
9 actionable tasks: 2 executed, 7 up-to-date
==> ERROR: A failure occurred in build().
    Aborting...

Still not able to build.

Edit: also, java-environment-openjdk is now the same version (22), so the line


java-environment-openjdk=$((${pkgver%%.*}-1))

is setting java-environment-openjdk to 21, which is out-of-date.