JDK-8094633 : [Linux] JavaFX Media does not run on Ubuntu 14.04
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 8u5
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-07-11
  • Updated: 2016-01-20
  • Resolved: 2014-07-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u40Fixed
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
On Linux, JDK 8 includes a native JavaFX media library, libjfxmedia.so, that is built with libav-53 -- that is, the libavcodec53 and libavformat53 packages -- so this package is required to run JavaFX media applications. See http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html

Newer distributions of Linux, such as Ubuntu 14.04 and Debian Jessie, include libav-54. There are incompatible changes in libav-54 such that JavaFX media fails to run with that version of the library.

RT-35770 is a request to include support for running on libav-54 and libav-55 as well as libav-53. At a minimum we must add libav-54 support (while maintaining libav-53 support) in order to for FX 8 to be supported on Ubuntu 14.04.
Comments
http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/df28c1bdf2e1
28-07-2014

I have tested the open build by deleting rt-closed dir. Actually this is checked for absence/emptiness in the makefile for the library. So it's all ok.
25-07-2014

One minor comment about the build.gradle changes as it affects an openjfx build (e.g., not a closed build). In the following: args("CC=${mediaProperties.compiler}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", - "BASE_NAME=avplugin", "LIBAV_DIR=${project.ext.LIBAV}") + "BASE_NAME=avplugin") This changes existing behavior in that formerly, LIBAV_DIR would be set to the empty string whereas in your patch it is not set. Unless you are certain that they are equivalent (have you tested an open build?), a safer change might be: args("CC=${mediaProperties.compiler}", "OUTPUT_DIR=${nativeOutputDir}", "BUILD_TYPE=${buildType}", - "BASE_NAME=avplugin", "LIBAV_DIR=${project.ext.LIBAV}") + "BASE_NAME=avplugin", "LIBAV_DIR=") Either way is fine with me as long as you have thought about it. +1
24-07-2014

Approved.
24-07-2014

Please review the following: http://cr.openjdk.java.net/~stayer/RT-37914/webrev.00/ Reviewers: kcr, amatvee
24-07-2014

Thanks for your tips and help.
22-07-2014

No I'm not yet. I haven't sent the notice. Thanks for the feedback anyways.
22-07-2014

Then you have to wait for this bug to be fixed in 8u40. Or you can take a dependent issue (RT-37256) patch and build openjdk yourself. This one is in progress. So little tolerance. Or you can build libav-0.8.x yourself by taking sources from here http://libav.org/download.html#release_0.8 which is essentially libav-53.
22-07-2014

libavutil51 is no longer in 14.04 repositories, there is libavutil52 and I cannot find package for 14.04 anywhere. libavcodec53 and libavformat53 aren't in the repositories either, but they can be downloaded from launchpad compiled for 14.04, I can't find libavutil51.
22-07-2014

Absence of libgstreamer-lite.so is fine. There are special linker flags that make ld.so being able to find it in run time. So disregard it. But libavutil.so.51 is necessary. Kevin. We should probably add libavutil to the dependencies list as an explicit dependency.
22-07-2014

Thank you. I see the following dependencies are missing: libgstreamer-lite.so => not found libavutil.so.51 => not found libavutil.so.51 => not found This should help Kirill understand what is going on. (our messages crossed...I see that Kirill already replied)
22-07-2014

Well. That explains. You're missing libavutil. It was probably not installed automatically. It usually has to when you install libavformat. So just install libavutil.
22-07-2014

My bad :) Actuall output ldd /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libavplugin.so linux-vdso.so.1 => (0x00007fffee1fe000) libgstreamer-lite.so => not found libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f1497565000) libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f1497363000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f149715b000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1496e52000) libavcodec.so.53 => /usr/lib/x86_64-linux-gnu/libavcodec.so.53 (0x00007f14960bf000) libavformat.so.53 => /usr/lib/x86_64-linux-gnu/libavformat.so.53 (0x00007f1495db6000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1495b97000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f14957d1000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f14955c9000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f149538a000) libavutil.so.51 => not found libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1 (0x00007f1494fab000) libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f1494adb000) libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f14948ae000) libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007f149466e000) libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007f1494454000) libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007f149423b000) libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libschroedinger-1.0.so.0 (0x00007f1493f77000) libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1 (0x00007f1493d68000) libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007f1493b52000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f149384c000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1493632000) libavutil.so.51 => not found libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007f1493374000) libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f1493163000) /lib64/ld-linux-x86-64.so.2 (0x00007f14979ef000) libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f1492f5a000) liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f1492cd7000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1492ad3000) libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f1492854000) libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f149263f000) libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f14923fd000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f14921f7000)
22-07-2014

Then your jre_home isn't pointing to the right place. That, too, was intended to be replaced with the actual location of your JRE, possibly /usr/java/jdk1.8.0/jre but possibly somewhere else. You need to find it on your system. Starting with "which java" might help.
22-07-2014

Didn't notice that either :) . Output: ldd: jre_home/lib/i386/libavplugin.so: No such file or directory ldd: jre_home/lib/amd64/libavplugin.so: No such file or directory
22-07-2014

Correction: it needs to be "i386" not "i586" for a 32-bit system.
22-07-2014

Metod: You misunderstood Kirill's request. You should replace "{amd64|i586}" with *either* "amd64" or "i586" depending on your architecture (64 versus 32 bit).
22-07-2014

webrev: http://cr.openjdk.java.net/~stayer/RT-37914/webrev.00/
22-07-2014

The following was reported as RT-37988 : [from Metod Rybar] I think it's the same issue as mentioned in RT-21768 only on Ubuntu 14.04. Currently supported libs were updated to newer versions. I described my problem here https://stackoverflow.com/questions/24848752/javafx-mp3-playback-ubuntu-14-04 . It would be great if it were fixed or if there is some workaround. Thanks
22-07-2014

Metod can you please provide the output of the following command: $ ldd jre_home/lib/{amd64|i586}/libavplugin.so If it can't find path to libavcodec.so.53 and libavformat.so.53 then you should export LD_LIBRARY_PATH and point it to the directory where the libs are located.
22-07-2014