Package Details: java-openjfx-src 22.u30-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: openjfx
Licenses: GPL-2.0-only WITH Classpath-exception-2.0
Submitter: freswa
Maintainer: Freso
Last Packager: Freso
Votes: 5
Popularity: 1.30
First Submitted: 2023-10-08 20:20 (UTC)
Last Updated: 2024-04-05 23:30 (UTC)

Dependencies (25)

Required by (0)

Sources (3)

Pinned Comments

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 »

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.

sl1pkn07 commented on 2024-03-30 17:08 (UTC)

maybe disable lto? !lto in the options array

patlefort commented on 2024-03-30 01:21 (UTC)

Link error in clean container:

[100%] Linking CXX shared library ../../lib/libjfxwebkit.so
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
make[2]: *** [Source/WebKitLegacy/CMakeFiles/WebKitLegacy.dir/build.make:2269: lib/libjfxwebkit.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1062: Source/WebKitLegacy/CMakeFiles/WebKitLegacy.dir/all] Error 2
make: *** [Makefile:111: all] Error 2

sl1pkn07 commented on 2024-03-28 19:20 (UTC) (edited on 2024-03-28 19:22 (UTC) by sl1pkn07)

i think i found the problem. the problem may be is makepkg iself

in the makepkg.conf:

the line LDFLAGS= is separated in two lines: \ character, new line, and 10 spaces

LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
         -Wl,-z,pack-relative-relocs"

remove 9 spaces and the new line character (\n), wich correspond to the 9 "/usr/bin/ld: no se puede encontrar : No existe el fichero o el directorio (in english) fails, of them start build without problem. so can trim it with sed or directly in the makepkg.conf file for short to only one unique line

so, bad hack can be:

export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's|[[:space:]][[:space:]]|[[:space:]]|g' -e 's|\n||g')"

greetings