ABI break in org.freedesktop.Platform.VAAPI.Intel//18.08 update

Cameron Gutman aicommander at gmail.com
Thu Feb 21 04:43:39 UTC 2019


My Flatpak package, com.moonlight_stream.Moonlight [0], is built using the
org.kde.Platform//5.12
runtime, which itself is built on org.freedesktop.Platform//18.08. I'm
using VAAPI acceleration
in my application which requires the
org.freedesktop.Platform.VAAPI.Intel//18.08 extension to
provide the Intel VAAPI driver.

Users noticed that my package broke in a recent 'flatpak update' and I
traced the cause to a new
build of org.freedesktop.Platform.VAAPI.Intel//18.08. This change [1]
upgraded the VAAPI driver
from version 2.2 to 2.3. The new driver appears to require a new version of
libva, which was also
committed [2] to the org.freedesktop.Platform//18.08 repo.

The breakage looks like the following:
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Trying to open
/usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/i965_drv_video.so
libva error:
/usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/i965_drv_video.so has no
function __vaDriverInit_1_0

Rolling back org.freedesktop.Platform.VAAPI.Intel//18.08 to the previous
build (06d7699cc740)
fixes the issue. Based on some digging, it looks like the latest build of
org.kde.Platform's
runtime platform, org.freedesktop.Platform, gets baked into the
org.kde.Platform during the
build process. As a result, I don't get the org.freedesktop.Platform
changes I need to use the
new version of org.freedesktop.Platform.VAAPI.Intel until the KDE runtime
maintainer decides
to build the runtime again.

$ ls
org.freedesktop.Platform/x86_64/18.08/active/files/lib/x86_64-linux-gnu/ |
grep libva
libva-drm.so.2
libva-drm.so.2.400.0
libva.so.2
libva.so.2.400.0
libva-wayland.so.2
libva-wayland.so.2.400.0
libva-x11.so.2
libva-x11.so.2.400.0

$ ls org.kde.Platform/x86_64/5.12/active/files/lib/x86_64-linux-gnu/ | grep
libva
libva-drm.so.2
libva-drm.so.2.100.0
libva.so.2
libva.so.2.100.0
libva-wayland.so.2
libva-wayland.so.2.100.0
libva-x11.so.2
libva-x11.so.2.100.0

If my theory is correct, the situation should resolve when the
org.kde.Sdk//5.12 build auto-
publishes. Unfortunately, I wasn't able to test that theory because
installing the test build
flatpakref causes flatpak (flatpak-1.2.3-2.fc29.x86_64) to assert:

$ flatpak install
https://dl.flathub.org/build-repo/133/org.kde.Sdk.flatpakref
**
flatpak:ERROR:app/flatpak-main.c:700:flatpak_run: assertion failed:
(success || error)
Aborted (core dumped)

I would like to avoid this happening again in the future, if possible. I
did not expect that
the FreeDesktop team would break the ABI with their runtime plugins without
changing the runtime
version. Was my expectation wrong or was did this change break the runtime
version contract?

Is it possible for these "intermediate" runtimes like org.kde.Platform to
share the files with
the runtime they depend on, so they are updated as the base runtime changes
without needing a
new build?

Regards,
Cameron

[0]: https://github.com/flathub/com.moonlight_stream.Moonlight
[1]:
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/commit/2403d056fef00585bff66389f3b040a74ad8b0e6
[2]:
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/commit/ded3364f80e621492a16e0cfb6b4ad0e051199b4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20190220/e52d7708/attachment.html>


More information about the Flatpak mailing list