JDK-8191446 : [Linux] Build and deliver the libav media stubs for openjfx build
  • Type: Bug
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-11-17
  • Updated: 2019-04-05
  • Resolved: 2018-01-25
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.
Other
openjfx11Fixed
Related Reports
Blocks :  
Relates :  
Description
The open build of JavaFX for Linux compiles and links against the currently installed version of libabformat, and as such, will only run against that version.

The closed build will create stub .so files for several different versions. We do this by compiling and linking against pre-built binaries that we host on an internal server.

In order to enable building a version of FX for Linux that will run on multiple versions of Linux we need to either make the prebuilt binaries available via maven central (which is what we used to do for three of the WebKit libraries), or we need some other solution.
Comments
http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/3361ad25093b
25-01-2018

The build changes look good. All my testing looks good. +1
25-01-2018

This fix adds two boolean flags ("BUILD_LIBAV_STUBS" and "BUILD_WORKING_LIBAV") to build.gradle to support building the libav stubs in support of running on multiple Linux systems that may have different versions of libav. BUILD_LIBAV_STUBS is intended to build a distribution that will run on multiple versions of Linux and BUILD_WORKING_LIBAV is only intended for developers to test their code locally without needing an installed libav; most developers will not ever need to use BUILD_WORKING_LIBAV option. BUILD_LIBAV_STUBS is valid on Linux platform when -PCOMPILE_MEDIA=true is specified and it will produce multiple libav stubs, however compiled libavcodec.so and libavformat.so libraries will not contain any codecs to run media. System will require libavcodec56 and libavformat56 or equivalent for media to work. Note: libavcodec-dev and libavformat-dev are no longer required with BUILD_LIBAV_STUBS. BUILD_WORKING_LIBAV is valid on Linux platform when -PCOMPILE_MEDIA=true and -PBUILD_LIBAV_STUBS=true are specified and it will produce multiple libav stubs and working libavcodec.so and libavformat.so libraries which can be used to test media stack. These libraries will only contain required codecs to run media. This optimization is done to reduce build time and in most cases developers do not need to compile libavcodec and libavformat with codecs required to run media, since our stack will be using libavcodec and libavformat installed with system. LD_LIBRARY_PATH needs to be set to point to pre-build libavcodec and libavformat, which can be found at rt/modules/javafx.media/build/native/linux/libav/libav-{X}/lib or rt/modules/javafx.media/build/native/linux/libavffmpeg/libav-{X}/lib or rt/modules/javafx.media/build/native/linux/ffmpeg/ffmpeg-{X}/lib with {X} being major version of libavcodec such as 56 or 57.
20-01-2018

http://cr.openjdk.java.net/~almatvee/8191446/webrev.01/ Updated gradle.properties.template and copyright year for both files.
20-01-2018

Please review the following: http://cr.openjdk.java.net/~almatvee/8191446/webrev.00 Reviewers: kcr Added support for building libav stubs.
19-01-2018

12/4/2017: Pending discussion with Kevin this week
04-12-2017