You are not logged in.

#1 2024-10-16 23:43:18

tiagomneves
Member
Registered: 2024-10-16
Posts: 3

Openjfx needs manual intervention

Hello there,

First time coming to you with a problem. I need openjfx for a project but for the first time, yay asks me for a manual intervention.
I checked everything to my capabilties but can't figure what what can I do.


(...)
> Task :graphics:ccLinuxFontFreetype FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':graphics:ccLinuxFontFreetype'.
> java.util.concurrent.ExecutionException: org.gradle.process.internal.ExecException: Process 'command 'gcc'' finished with non-zero exit value 1

(...)

==> ERROR: An error occured in build().
    Cancelling...
 -> failed to comply: java-openjfx-exit status 4

I have freetype2 installed, already tried installing an older version of openjfx and I'm not sure how to do install the package manually.

I'm not sure if this is the right place for this kind of question, but would be grateful if someone could help

Best regards

Offline

#2 2024-10-17 07:27:02

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,477
Website

Re: Openjfx needs manual intervention

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2024-10-17 08:13:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,038

Re: Openjfx needs manual intervention

There are (atleast) 5 openjfx packages in aur, which one are you trying to build ?

Does building with makepkg give the same error ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2024-10-17 09:20:51

cryptearth
Member
Registered: 2024-02-03
Posts: 1,087

Re: Openjfx needs manual intervention

also: what java version do you have installed? since java9 java has changed quite a lot and old stuff might be no longer compatible with newer ones
also: FX was a neat idea to replace swing - yet it was it which got cancled and thrown out and so swing won anyway - so using it always required some manual steps
I would use FX only if my project wouldn't be doable otherwise - although following MVC the ui should be completely interchangeable and thereby shouldn't matter if cli, awt, swing or fx

Offline

#5 2024-10-17 10:22:37

tiagomneves
Member
Registered: 2024-10-16
Posts: 3

Re: Openjfx needs manual intervention

Sorry for not giving full description of the problem.

java --version
java 23 2024-09-17
Java(TM) SE Runtime Environment (build 23+37-2369)
Java HotSpot(TM) 64-Bit Server VM (build 23+37-2369, mixed mode, sharing)

• The package I am trying to build is https://aur.archlinux.org/packages/java-openjfx (v. 22.0.2 on AUR). When searching for the package using 'yay -Ss java-openjfx' it does have a warning that is out of date since the 15th of October though.
• Didn't occur to me doing a makepkg, so I went to check on tutorials on how to do it properly and got the PKGBUILD from the AUR but it still didn't work, even after updating the version to 23.0.1
• I only need javaFX as a library to have the Pair structure. Of course there is workarounds but I want to learn how to solve this problem anyways so I can solve it independently next time this happens on a package.

Thank you in advance

Offline

#6 2024-10-17 10:38:45

cryptearth
Member
Registered: 2024-02-03
Posts: 1,087

Re: Openjfx needs manual intervention

you mean javafx.util.Pair<K,V>? use standard java.util.HashMap<K,V> or write your own helper class
dragging along fx just for a simple helper is not just a bad idea but completely wrong!

Offline

#7 2024-10-17 13:25:49

tiagomneves
Member
Registered: 2024-10-16
Posts: 3

Re: Openjfx needs manual intervention

Thank you, it works if I use it as a HashMap. I still have doubts on how to solve the problem installing a package that needs manual intervention, but that's not a priority rn.

All the best, chefe

Offline

#8 2024-10-17 14:59:33

loqs
Member
Registered: 2014-03-06
Posts: 18,130

Re: Openjfx needs manual intervention

Diff of quick and dirty changes to java-openjfx that allowed it to build locally:

diff --git a/PKGBUILD b/PKGBUILD
index 063a67d..f12acae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -45,6 +45,7 @@ makedepends=(
   python
   qt5-base
   ruby
+  ruby-erb
   unzip
   webkit2gtk
   zip
@@ -86,6 +87,7 @@ build() {
   # Workaround for situation where the linker treats whitespace as arguments
   export LDFLAGS="${LDFLAGS//+([[:space:]]|[[:blank:]])/ }"
 
+  CFLAGS+=' -Wno-incompatible-pointer-types'
   gradle zips
 }
 

Please in future include at least the actual build failure in the output; in this case:

> Task :graphics:nativeFont
/build/java-openjfx/src/jfx22u-22.0.2-4/modules/javafx.graphics/src/main/native-font/freetype.c: In function ‘Java_com_sun_javafx_font_freetype_OSFreetype_getBitmapData’:
/build/java-openjfx/src/jfx22u-22.0.2-4/modules/javafx.graphics/src/main/native-font/freetype.c:387:21: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  387 |     if (bitmap.rows > INT_MAX / bitmap.pitch) return NULL;
      |                     ^
/build/java-openjfx/src/jfx22u-22.0.2-4/modules/javafx.graphics/src/main/native-font/freetype.c: In function ‘checkSize’:
/build/java-openjfx/src/jfx22u-22.0.2-4/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));
      |                                 ^
/build/java-openjfx/src/jfx22u-22.0.2-4/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.

* What went wrong:
Execution failed for task ':graphics:ccLinuxFontFreetype'.
> java.util.concurrent.ExecutionException: org.gradle.process.internal.ExecException: Process 'command 'gcc'' finished with non-zero exit value 1

* 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 1m 3s
24 actionable tasks: 24 executed

You can find the issue mentioned along with the suggested fix in https://aur.archlinux.org/packages/java … ent-976279

Offline

Board footer

Powered by FluxBB