openjfx is missing native libraries for webkit and media

Bug #1877000 reported by Prajna Sariputra
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
openjfx (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Unassigned

Bug Description

[Impact]
OpenJFX's media and webkit native libraries are missing from amd64 builds in Focal and Groovy. This is a regression from Bionic.

This prevents applications that depend on these libraries from working correctly.

[Test Case]
The libjfxmedia.so and libjfxwebkit.so should be present in the libopenjfx-jni binary for all archs.

One can see in the amd64 package listing for Focal [1,2] and Groovy [3,4] that libjfxmedia.so and libjfxwebkit.so are only available on arm64, armhf, ppc64el, and s390x.

[1] https://packages.ubuntu.com/search?searchon=contents&keywords=libjfxmedia.so&mode=exactfilename&suite=focal&arch=any
[2] https://packages.ubuntu.com/search?searchon=contents&keywords=libjfxwebkit.so&mode=exactfilename&suite=focal&arch=any
[3] https://packages.ubuntu.com/search?searchon=contents&keywords=libjfxmedia.so&mode=exactfilename&suite=groovy&arch=any
[4] https://packages.ubuntu.com/search?searchon=contents&keywords=libjfxwebkit.so&mode=exactfilename&suite=groovy&arch=any

Another possible test case is running pdfsam in the console to split a PDF file (after pdfsam bug 1887142 is fixed) and look if errors as:
Caused by: java.lang.UnsatisfiedLinkError: no jfxmedia in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
show up in the stdout. A sound should be played if everything works.

[Regression Potential]
Enabling the native libraries will allow applications to use them again.
* This can trigger errors in applications that hidden by the fact that there were no native libraries to use.
* This can cause applications that use OpenJFX to fail to run or crash during runtime.
It is unlikely that autopkgtest will detect such errors given that OpenJFX _did_ migrate when the native libraries were missing (and that should have caused errors).

[Other Info]

[Original Report]
I'm trying to run BlueJ on Ubuntu 20.04 (fresh install), while the main app runs the editor refuses to start, looking at its logs apparently it can't find jfxwebkit. So I tried to search for it, and apparently it is present in the other architectures for Focal as well as all architectures in Eoan, Bionic and Xenial in the libopenjfx-jni package, but not for Focal amd64. The version of openjfx I have is 11.0.7+0-2ubuntu1. I have also attached BlueJ's log for reference.

Revision history for this message
Prajna Sariputra (putr4-s) wrote :
tags: added: amd64 focal
Revision history for this message
Jardi Martinez (jardiamj) wrote :

I am having this exact same issue, BlueJ was working find up until I upgraded to 20.04. This is the relevant part in the log:

Exception in thread "JavaFX Application Thread" java.lang.UnsatisfiedLinkError: no jfxwebkit in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]

I need BlueJ for my class work. In the meantime is there any work around I could employ so I can keep on using Bluej?

Thanks.

Revision history for this message
Jardi Martinez (jardiamj) wrote :

I found my work around this issue by downloading and installing the previous version of the libopenjfx-jni package (11.0.2+1-1). I can't pinpoint what was done in the current version that gets rid of jfxwebkit.

Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjfx (Ubuntu):
status: New → Confirmed
Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

The issue has to deal with how the package is build. Both arch-dependent and arch-independent packages are built for amd64 now. However, the build rule for arch-independent messes up the build for arch-dependent (i.e. the part that libjniwebkit belongs to).

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

This is a debdiff to fix this issue by not overwriting the build.gradle file when building arch-independent packages alongside the arch-dependent packages. It has been tested in sbuild building both the arch-dependent and arch-independent packages for Focal.

Mathew Hodson (mhodson)
tags: added: unmetdeps
Changed in openjfx (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you report the bug to Debian since it seems it's coming from there?

Revision history for this message
Prajna Sariputra (putr4-s) wrote :

If the bug is indeed from Debian then their version of libopenjfx-jni would also not have libjfxwebkit.so, right? So I checked the file list in their stable, testing and unstable versions of libopenjfx-jni and they do have libjfxwebkit.so in there for amd64, the package file sizes make sense too (they are similar for all architectures, unlike in Focal where amd64 has a very small package size compared to the others present).

Here's where I checked the Debian package file list for reference: https://packages.debian.org/unstable/amd64/libopenjfx-jni/filelist

Revision history for this message
Saikrishna Arcot (saiarcot895) wrote :

Debian isn't affected because they build any arch-independent packages separately from arch-dependent packages. Ubuntu, on the other hand, builds arch-independent packages along with the amd64 build. This combination is messing up the build for openjfx because of how the rules are defined.

Revision history for this message
Steffen K. (sk-gobuki) wrote :

I can confirm this bug and that debian is not affected. I installed the debian package (also had to install libjpeg62-turbo) as a workaround and now the file libjfxwebview.so is there and javafx applications with WebView do work. IMO this should be marked as very important, show stopper or something, since it probably affects most of all JavaFX applications, which is very unfortunate for an LTS release.

Revision history for this message
Gustavo Carneiro (gugabyte) wrote :

[ubuntu 20.04 lts] I confirm this bug as well when running .jar files.

Revision history for this message
ronny (ronny-standtke) wrote :

I just run into this issue while trying out Scenic View, a quite important debug tool for JavaFX developers, see here: https://github.com/JonathanGiles/scenic-view
I would be glad if we could use Ubuntu for JavaFX development. Switching back to Debian 10 for now...

Revision history for this message
Stephen Hodgson (hodgson536) wrote :

I have also just encountered this error and have so far been unable to find a work around for it.

Is there any news on when this will be looked at?

Revision history for this message
Carlo Luzi (carlo-luzi) wrote :

I have work around this bug using a different OpenJFX distribution:

- Download JavaFX Linux SDK from Gluon ( https://gluonhq.com/products/javafx/ )
- Place the archive content in a suitable location (ex. /home/ubuntu/javafx-sdk-11.0.2/)
- Assuming the Java program is packed in a .jar file, start it from command line specifying the Gluon JavaFX library:

java --module-path /home/ubuntu/javafx-sdk-11.0.2/lib --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.web,javafx.swing -jar yourprogram.jar

This is a base recipe, your mileage may vary.

summary: - libjfxwebkit not present in the package for Focal amd64
+ openjdk is missing native libraries for webkit and media
description: updated
tags: added: groovy
summary: - openjdk is missing native libraries for webkit and media
+ openjfx is missing native libraries for webkit and media
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjfx - 11.0.7+0-5ubuntu1

---------------
openjfx (11.0.7+0-5ubuntu1) groovy; urgency=low

  * Merge from Debian unstable. Dropped python2 dependency.
  * debian/rules: when building arch and indep packages simultaneously (as
    done in Ubuntu builders) the file gradle.properties copied in
    override_dh_auto_configure-arch will be overwritten by
    override_dh_auto_configure-indep preventing native libraries for media
    and webkit from being build. (LP: #1877000)
  * Remove/revert patch to force NUM_COMPILE_THREADS=1.

openjfx (11.0.7+0-5) unstable; urgency=medium

  * Team upload.
  * Mark GST_API symbols as external. Closes: #969260.
  * Fix jsmin stream handling with Python 3.

openjfx (11.0.7+0-4) unstable; urgency=medium

  * Team upload.
  * Force NUM_COMPILE_THREADS=1

openjfx (11.0.7+0-3) unstable; urgency=medium

  * Team upload.
  * Build-depend on python3 (Closes: #937202, #967185)

openjfx (11.0.7+0-2ubuntu1) focal; urgency=medium

  * Merge with Debian; remaining changes:
    - Build using python2.

openjfx (11.0.7+0-2) unstable; urgency=medium

  * Disable the Gradle version check when building only the arch all package
    (Closes: #956585)
  * Enable the WebKit JIT on arm64

openjfx (11.0.7+0-1) unstable; urgency=medium

  * New upstream release
    - Refreshed the patches
    - Build depend on antlr4 instead of antlr3
    - Fixed the compatibility with the version of Gradle in Debian
  * Standards-Version updated to 4.5.0

 -- Tiago Stürmer Daitx <email address hidden> Tue, 22 Sep 2020 21:05:26 +0000

Changed in openjfx (Ubuntu):
status: Confirmed → Fix Released
Changed in openjfx (Ubuntu Focal):
status: New → Confirmed
importance: Undecided → Medium
description: updated
Revision history for this message
Robie Basak (racb) wrote :

SRU review: why is this being fixed with a backport from Debian of unrelated changes, contrary to SRU policy? Or if this is necessary and all the changes are relevant to fix this bug, then please explain.

Changed in openjfx (Ubuntu Focal):
status: Confirmed → Incomplete
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Robie, I updated my submission to strip all unrelated changes. Thanks for the heads up.

Changed in openjfx (Ubuntu Focal):
status: Incomplete → Confirmed
Mathew Hodson (mhodson)
tags: added: regression-release
tags: added: packaging
removed: unmetdeps
Revision history for this message
Thomas Schweikle (tps) wrote :

It is not fixed as of 13th, Oct. 2020. Same as before. pdfsam basic crashes while trying to load libraries from openjfx. Regardless it is installed or not. There are missing libraries. And it turns out missin are those from openjfx.

Revision history for this message
Thomas Schweikle (tps) wrote :

Solved by upgrading to pdfsam 4.1.4

tags: added: fr-757
Revision history for this message
Paul Gotch (paulg-chiark) wrote :

It would be really useful if this fix was back ported in to focal, the packages from groovy don't install on focal as they require a newer version of libc than is in focal.

I came across this bug while trying to use O365Interative authentication for davmail and it basically blocks this usage of that package until this is fixed.

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

The fix is waiting for review [1]. Now that Groovy is out someone should be looking at it soon.

[1] https://launchpad.net/ubuntu/focal/+queue?queue_state=1&queue_text=openjfx

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Prajna, or anyone else affected,

Accepted openjfx into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openjfx/11.0.7+0-2ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openjfx (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Saikrishna Arcot (saiarcot895), while doing a verification on this bug I saw your patch, I apologize for not noticing it while I was fixing this, so I could use it and acknowledge your work - and save me the trouble of figuring it out myself.

I verified that openjfx 11.0.7+0-2ubuntu2 in focal-proposed fixes the issue. The previously missing media libs are now in place:
$ comm -3 <(dpkg-deb -c libopenjfx-jni_11.0.7+0-2ubuntu1_amd64.deb | cut -c49- | sort) <(dpkg-deb -c libopenjfx-jni_11.0.7+0-2ubuntu2_amd64.deb | cut -c49- | sort)
 ./usr/lib/x86_64-linux-gnu/jni/libavplugin.so
 ./usr/lib/x86_64-linux-gnu/jni/libfxplugins.so
 ./usr/lib/x86_64-linux-gnu/jni/libgstreamer-lite.so
 ./usr/lib/x86_64-linux-gnu/jni/libjfxmedia.so
 ./usr/lib/x86_64-linux-gnu/jni/libjfxwebkit.so

and installing the libopenjfx-java/-jni binaries fixes PDFSam: it no longer gives a warning about missing jfxmedia in the library path and a sound does play after completing an action.

tags: added: verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Prajna Sariputra (putr4-s) wrote :

I just tested BlueJ again with openjfx 11.0.7+0-2ubuntu2 from focal-proposed, and indeed it works as expected now too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjfx - 11.0.7+0-2ubuntu2

---------------
openjfx (11.0.7+0-2ubuntu2) focal; urgency=medium

  * debian/rules: when building arch and indep packages simultaneously (as
    done in Ubuntu builders) the file gradle.properties copied in
    override_dh_auto_configure-arch was being overwritten by
    override_dh_auto_configure-indep preventing native libraries for media
    and webkit from being build. (LP: #1877000)

 -- Tiago Stürmer Daitx <email address hidden> Tue, 22 Sep 2020 20:50:23 +0000

Changed in openjfx (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for openjfx has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.