Package Details: java8-openjfx 8.u202-10

Git Clone URL: https://aur.archlinux.org/java8-openjfx.git (read-only, click to copy)
Package Base: java8-openjfx
Description: Java OpenJFX 8 client application platform (open-source implementation of JavaFX)
Upstream URL: https://wiki.openjdk.java.net/display/OpenJFX/Main
Keywords: java8-openjfx openjfx
Licenses: GPL
Provides: java-openjfx
Submitter: freswa
Maintainer: Rogach
Last Packager: Rogach
Votes: 13
Popularity: 0.106066
First Submitted: 2022-03-09 18:41 (UTC)
Last Updated: 2024-05-25 07:41 (UTC)

Required by (80)

Sources (11)

Latest Comments

1 2 3 4 5 6 .. 14 Next › Last »

serbuvlad commented on 2025-04-11 14:17 (UTC) (edited on 2025-04-11 14:19 (UTC) by serbuvlad)

I had a lot of FUN building this package!

Needed this for microchip-mplabx-bin.

Here's what worked for me:

  1. Download the tar.bz2 file manually (don't know what's up with the link), and modify the PKGBUILD to look for the file locally.
  2. Add danwood76's modifications
  3. Apply the following sed patches at the end of prepare() in PKGBUILD:
  # cmake 4.0 requires the cmake file to specify a minimum of at least 3.5
  sed -i '11s/3\.3/3.5/' modules/web/src/main/native/CMakeLists.txt
  sed -i '1s/2\.8\.12/3.5/' modules/web/src/main/native/Source/WTF/CMakeLists.txt
  sed -i '1s/2\.8\.12/3.5/' modules/web/src/main/native/Source/JavaScriptCore/CMakeLists.txt
  sed -i '1s/2\.8\.12/3.5/' modules/web/src/main/native/Source/WebCore/CMakeLists.txt

  # cmake can for some reason not find "Threads" without this
  sed -i '14i set(CMAKE_THREAD_LIBS_INIT "-lpthread") \
set(CMAKE_HAVE_THREADS_LIBRARY 1) \
set(CMAKE_USE_WIN32_THREADS_INIT 0) \
set(CMAKE_USE_PTHREADS_INIT 1) \
set(THREADS_PREFER_PTHREAD_FLAG ON)' modules/web/src/main/native/CMakeLists.txt

  # The HAVE(X) macro doesn't seem to work, or not always
  # These #if statements need to evaluate to true
  sed -i '70c #if 1' modules/web/src/main/native/Source/WTF/wtf/GregorianDateTime.cpp
  sed -i '131c #elif 1' modules/web/src/main/native/Source/WTF/wtf/DateMath.cpp
  find modules/web/src/main/native/ -name '*.[ch]*' | xargs -n1 sed -i '/HAVE(MACHINE_CONTEXT)/s/HAVE(MACHINE_CONTEXT)/1/'

@Rogach, could we get these changes incorporated into this package? I am willing to help with anything needed to get this package fixed: providing my changes as patch files if needed, providing a full git patch etc.

sl1pkn07 commented on 2025-03-20 20:46 (UTC) (edited on 2025-03-20 20:47 (UTC) by sl1pkn07)

curl: (22) The requested URL returned error: 403 https://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/8u202-ga.tar.bz2. but in browser download ok

aidonius commented on 2025-02-05 01:41 (UTC) (edited on 2025-02-05 01:42 (UTC) by aidonius)

Following danwood76's suggestions, I modified the pkgbuild and added the patch. I also skipped the checksum for the bz2 since it wasn't working. I was able to build the package correctly. Everything seems to be working as it should.

danwood76 commented on 2025-01-08 12:29 (UTC) (edited on 2025-01-08 12:33 (UTC) by danwood76)

Thanks for all the input from various users on here.

I have managed to create a PKGBUILD which incorporates the required changes and works without modifying anything on the system (so using the stock LDFLAGS in makepkg.conf).

Hopefully @Rogach can incorporate these changes into the AUR package.

One issue I didn't encounter was problems with the .bz2 package, so maybe there was a temporary issue with the download server at some point?

PKGBUILD diff:

diff --git a/PKGBUILD b/PKGBUILD
index 45443fe..783fb8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -40,6 +40,7 @@ makedepends=(
   python2
   qt5-base
   ruby
+  ruby-erb
   unzip
   webkit2gtk
 )
@@ -56,6 +57,7 @@ source=(
   java8-openjfx-include-iterator.patch
   java8-openjfx-no-check-jfxrt-jar.patch
   java8-openjfx-fix-java-version-check.patch
+  java8-openjfx-offlineasm-warnings-ruby27.patch
 )
 sha256sums=('813ed6bbe7669b5acae7908720b9e353771e854be75c57a323310d0b9271daff'
             'd1c2255893e5ec6268d7c92bb6539cde629d325872f26cffb5f1f616c9d5f30d'
@@ -67,7 +69,8 @@ sha256sums=('813ed6bbe7669b5acae7908720b9e353771e854be75c57a323310d0b9271daff'
             '3487eb180fff9866c8b8b08be45f13fa9e8edd04e5719bc867e59b09b81954b4'
             'bd69e8a3363f9b3ade50fb29d4c9e3d7e59b42472ae00d425d20ddcda720b919'
             '47822da975832551bc3b20b3d75891135314f89cfcb75f7212eece148902aea3'
-            '88ecba988b6e05580cecc09c37add8e375097619d9fa106d65c09edd993c3bc7')
+            '88ecba988b6e05580cecc09c37add8e375097619d9fa106d65c09edd993c3bc7'
+            'fcc5d944055df246dd9282e6093b015a448d8a6207fa7425c85d2562b7f5a596')

 prepare() {
   cd rt-${pkgver//./}-ga
@@ -82,6 +85,7 @@ prepare() {
   patch -Np1 -i ../java8-openjfx-include-iterator.patch
   patch -Np1 -i ../java8-openjfx-no-check-jfxrt-jar.patch
   patch -Np1 -i ../java8-openjfx-fix-java-version-check.patch
+  patch -Np1 -i ../java8-openjfx-offlineasm-warnings-ruby27.patch
 }

 build() {
@@ -91,6 +95,10 @@ build() {
   CFLAGS+=' -fcommon'
   # fix errors when compiling gstreamer-lite
   CFLAGS+=' -Wno-incompatible-pointer-types -Wno-int-conversion'
+  # Remove "-Wl,-z,pack-relative-relocs" from LDFLAGS
+  export LDFLAGS="${LDFLAGS//-Wl,-z,pack-relative-relocs}"
+  # Remove invalid symbols from LDFLAGS
+  export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's|[[:space:]][[:space:]]|[[:space:]]|g' -e 's|\n||g')"
   # build against ffmpeg4.4
   export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
   # ensure jdk 8 is used when building

And the java8-openjfx-offlineasm-warnings-ruby27.patch file:

From c7d19a492d97f9282a546831beb918e03315f6ef Mon Sep 17 00:00:00 2001
From: Adrian Perez de Castro <aperez@igalia.com>
Date: Wed, 15 Jan 2020 22:15:38 +0000
Subject: [PATCH] Offlineasm warnings with newer Ruby versions
 https://bugs.webkit.org/show_bug.cgi?id=206233

Reviewed by Yusuke Suzuki.

Avoid a warning about using Object#=~ on Annotation instances, which
has been deprecated in Ruby 2.7.

* offlineasm/parser.rb: Swap checks to prevent applying the =~ operator
to Annotation instances, which do not define it.


Canonical link: https://commits.webkit.org/219400@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
 Source/JavaScriptCore/ChangeLog            | 13 +++++++++++++
 Source/JavaScriptCore/offlineasm/parser.rb |  6 +++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git rt-8u202-ga.orig/modules/web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb rt-8u202-ga/modules/web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb
index 791c81a9868d..f14c873e2dbd 100644
--- rt-8u202-ga.orig/modules/web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb
+++ rt-8u202-ga/modules/web/src/main/native/Source/JavaScriptCore/offlineasm/parser.rb
@@ -628,9 +628,7 @@ def parseSequence(final, comment)
         firstCodeOrigin = @tokens[@idx].codeOrigin
         list = []
         loop {
-            if (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
-                break
-            elsif @tokens[@idx].is_a? Annotation
+            if @tokens[@idx].is_a? Annotation
                 # This is the only place where we can encounter a global
                 # annotation, and hence need to be able to distinguish between
                 # them.
@@ -644,6 +642,8 @@ def parseSequence(final, comment)
                 list << Instruction.new(codeOrigin, annotationOpcode, [], @tokens[@idx].string)
                 @annotation = nil
                 @idx += 2 # Consume the newline as well.
+            elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
+                break
             elsif @tokens[@idx] == "\n"
                 # ignore
                 @idx += 1

~edit~ Fixed the code blocks!

katsu034 commented on 2024-12-29 09:11 (UTC)

I overlooked ruby's "=~' syntax error. This fix works. erb is needed as opamp22 said. I installed ruby-erb package instead of using the gem command.

opamp22 commented on 2024-12-18 12:45 (UTC) (edited on 2024-12-19 13:22 (UTC) by opamp22)

This fix works, I had to apply the ruby patch. But ran into another issue that could be mistaken for the same error if you don't look closely.

<internal:/usr/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in require': cannot load such file -- erb (LoadError) Did you mean? drb

Task :web:compileNativeLinux FAILED

FAILURE: Build failed with an exception.

  • Where: Build file '/home/$USER/Downloads/java8-openjfx/src/rt-8u202-ga/build.gradle' line: 2583

  • What went wrong: Execution failed for task ':web:compileNativeLinux'.

    Process 'command 'perl'' finished with non-zero exit value 2

I fixed this by installing erb
gem install erb

and making sure my ruby verison was on the path
export PATH="$HOME/.local/share/gem/ruby/3.3.0/bin:$PATH"

katsu034 commented on 2024-12-01 14:18 (UTC) (edited on 2024-12-01 14:19 (UTC) by katsu034)

@polkip fix doesn't work for me either. build failed with

Execution failed for task ':web:compileNativeLinux'.
> Process 'command 'perl'' finished with non-zero exit value 2

grappas commented on 2024-11-23 22:53 (UTC)

@polkip : fix you provided doesn't work for me

polkip commented on 2024-10-17 17:48 (UTC) (edited on 2024-10-17 17:48 (UTC) by polkip)

For anyone else having issues installing this, I was able to get it to work with a few changes:

Change PKGBUILD to download the .gz archive instead of the .bz2

source=(
    https://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/${pkgver//./}-ga.tar.gz
    ...

rerun makepkg with the -e flag and then run updpkgsums. Afterwards, use the following LDFLAGS in /etc/makepkg.conf and it should build without issue.

LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now"

Additionally, if you encounter an invalid syntax error for Ruby's '=~' operator while compiling JavaScriptCore, applying this patch to the offending file will fix it: https://src.fedoraproject.org/rpms/qt5-qtwebkit/blob/rawhide/f/webkit-offlineasm-warnings-ruby27.patch

achyyy commented on 2024-08-29 12:28 (UTC) (edited on 2024-08-31 19:37 (UTC) by achyyy)

After using "yay -S --mflags --skipinteg java8-openjfx" the problem comes down to extracting 8u202-ga.tar.bz2 file.

EDIT: Installing "https://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/8u202-ga.tar.bz2" solved it i think, it now seen as installed.

EDIT 2: It still does not work.

EDIT3: Tried to recover the 8u202-ga.tar.bz2 with bzip2recover but it says "block 243 runs from 465536083 to 466352176 (incomplete)" I think I cant download the 8u202-ga.tar.bz2 file or its corrrupted.

EDIT4(last... maybe?): After finding an old file of https://hg.openjdk.java.net/openjfx/8u-dev/rt/archive/8u202-ga.tar.bz2 on Wayback Machine, it gets stuck at gradle errors.