Repository navigation
App with gstreamer built on Ubuntu 20.04 does not run #15
Description
I am trying to package a software on Ubuntu 20.04. So far, building the AppImage worked fine, but the new software release now depends on gstreamer and I cannot make it work.
I'm using a supposedly standard linux-deploy command:
EXTRA_QT_PLUGINS=xcb linuxdeploy-x86_64.AppImage --appdir AppDir/ -e ... --icon-file=... --desktop-file=... --plugin qt --plugin gstreamer --output=appimage
When I try to run this AppImage on anything (Ubuntu 22.04, Mint 20.03), I get this output (list is actually much longer, probably for all plugins):
(gst-plugin-scanner:97177): GStreamer-WARNING **: 16:09:05.572: Failed to load plugin '/tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcamerabin.so': /tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcamerabin.so: undefined symbol: gst_encoding_container_profile_get_profiles
(gst-plugin-scanner:97178): GStreamer-WARNING **: 16:09:05.585: Failed to load plugin '/tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcdparanoia.so': /tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcdparanoia.so: undefined symbol: gst_audio_cd_src_get_type
(gst-plugin-scanner:97179): GStreamer-WARNING **: 16:09:05.598: Failed to load plugin '/tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstchromaprint.so': /tmp/.mount_imagemvUlwpv/usr/lib/libchromaprint.so.1: undefined symbol: av_rdft_calc, version LIBAVCODEC_58
(gst-plugin-scanner:97180): GStreamer-WARNING **: 16:09:05.615: Failed to load plugin '/tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstclosedcaption.so': /lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined symbol: g_module_open_full
(gst-plugin-scanner:97181): GStreamer-WARNING **: 16:09:05.626: Failed to load plugin '/tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcoloreffects.so': /tmp/.mount_imagemvUlwpv/usr/lib/gstreamer-1.0/libgstcoloreffects.so: undefined symbol: gst_video_filter_get_type
In order to trace this error, I extracted the AppImage. "usr/lib/gstreamer-1.0" contains lots of .so files for plugins and there are gst libraries in "usr/lib":
squashfs-root/usr/lib$ ls libgst*
libgstadaptivedemux-1.0.so.0 libgstaudio-1.0.so.0 libgstbasecamerabinsrc-1.0.so.0 libgstfft-1.0.so.0 libgstmpegts-1.0.so.0 libgstphotography-1.0.so.0 libgstrtp-1.0.so.0 libgstsdp-1.0.so.0 libgstvideo-1.0.so.0
libgstallocators-1.0.so.0 libgstbadaudio-1.0.so.0 libgstcodecparsers-1.0.so.0 libgstgl-1.0.so.0 libgstnet-1.0.so.0 libgstreamer-1.0.so.0 libgstrtsp-1.0.so.0 libgsttag-1.0.so.0 libgstwayland-1.0.so.0
libgstapp-1.0.so.0 libgstbase-1.0.so.0 libgstcontroller-1.0.so.0 libgstisoff-1.0.so.0 libgstpbutils-1.0.so.0 libgstriff-1.0.so.0 libgstsctp-1.0.so.0 libgsturidownloader-1.0.so.0 libgstwebrtc-1.0.so.0
As the first error said that it was missing the symbol gst_encoding_container_profile_get_profiles, I searched for that and found it here:
squashfs-root/usr/lib$ nm -gD libgstpbutils-1.0.so.0 |grep gst_encoding_container_profile_get_profiles
00000000000189c0 T gst_encoding_container_profile_get_profiles
Thus, it looks like it should be there.
If I build the same AppImage on "Ubuntu 22.04", everything works (I cannot test on Mint20.03 because of the older libc). I compared the directory trees of both AppImages, but there were no suspicious differences.
Any idea what I could try next? I'm completely stuck.
PS: list of installed gstreamer packages on Ubuntu 20.04:
$ apt list --installed | grep gstreamer
gir1.2-gstreamer-1.0/focal,now 1.16.2-2 amd64 [installed,automatic]
gstreamer1.0-alsa/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed,automatic]
gstreamer1.0-clutter-3.0/focal,now 3.0.27-1 amd64 [installed,automatic]
gstreamer1.0-gl/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed,automatic]
gstreamer1.0-gtk3/focal-updates,focal-security,now 1.16.2-1ubuntu2.1 amd64 [installed,automatic]
gstreamer1.0-packagekit/focal-updates,focal-security,now 1.1.13-2ubuntu1.1 amd64 [installed,automatic]
gstreamer1.0-plugins-bad/focal,now 1.16.2-2.1ubuntu1 amd64 [installed]
gstreamer1.0-plugins-base-apps/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed,automatic]
gstreamer1.0-plugins-base/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed]
gstreamer1.0-plugins-good/focal-updates,focal-security,now 1.16.2-1ubuntu2.1 amd64 [installed]
gstreamer1.0-pulseaudio/focal-updates,focal-security,now 1.16.2-1ubuntu2.1 amd64 [installed,automatic]
gstreamer1.0-tools/focal,now 1.16.2-2 amd64 [installed,automatic]
gstreamer1.0-x/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed,automatic]
libgstreamer-gl1.0-0/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed,automatic]
libgstreamer-opencv1.0-0/focal,now 1.16.2-2.1ubuntu1 amd64 [installed,auto-removable]
libgstreamer-plugins-bad1.0-0/focal,now 1.16.2-2.1ubuntu1 amd64 [installed]
libgstreamer-plugins-base1.0-0/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed]
libgstreamer-plugins-base1.0-dev/focal-updates,focal-security,now 1.16.2-4ubuntu0.1 amd64 [installed]
libgstreamer-plugins-good1.0-0/focal-updates,focal-security,now 1.16.2-1ubuntu2.1 amd64 [installed]
libgstreamer-plugins-good1.0-dev/focal-updates,focal-security,now 1.16.2-1ubuntu2.1 amd64 [installed]
libgstreamer1.0-0/focal,now 1.16.2-2 amd64 [installed,automatic]
libgstreamer1.0-dev/focal,now 1.16.2-2 amd64 [installed,automatic]
Activity
[-]App with gstreamer build on Ubuntu 20.04 does not run[/-][+]App with gstreamer built on Ubuntu 20.04 does not run[/+]TheAssassin commentedon Jun 14, 2022
Way more relevant than your package versions would be the versions of this plugin (check the Git commit hash of the time you downloaded it) and linuxdeploy (
./linuxdeploy*.AppImage --version).Probably not an issue of this plugin, but linuxdeploy. The inclusion of GLib was changed recently. Should be fixed by updating linuxdeploy.
farindk commentedon Jun 14, 2022
I first tried with an old version of the linuxdeploy tools (main tool and plugins) from about Nov. 2021 and as that did not work (same error as now), I just downloaded new versions of linuxdeploy and this plugin today. The error did not change.
Everything except the gstreamer plugins works fine.
farindk commentedon Jun 14, 2022
TheAssassin commentedon Jun 14, 2022
This
lsdoesn't tell me anything. I provided instructions how to gather a proper version number for linuxdeploy itself above.This plugin calls back into linuxdeploy, therefire the version of linuxdeploy is the most relevant information right now.
farindk commentedon Jun 14, 2022
linuxdeploy-plugin-gstreamer commit: 12e0e98
TheAssassin commentedon Jun 14, 2022
libgio-2.0should be contained in the AppImage, but it is not for some reason... see https://github.com/AppImage/pkg2appimage/blob/master/excludelist#L91-L99.Please run
ldconfig -p | ag libgio-2.0 | awk '{print $4}', then add each of them like-l <path>to the linuxdeploy command and re-run.Note for self: we should have a way in linuxdeploy to log the current excludelist.
farindk commentedon Jun 14, 2022
Thanks. I changed it and now the missing libgio-2.0 is gone. However, all the other errors remain:
Now, for example
libgstclosedcaption.sofails ongst_aggregator_simple_get_next_timewhich I found inlibgstbase-1.0.so.0, which is packaged:Then, I checked the dependencies of
libgstbase-1.0.so.0:and libgstreamer, libgobject, libglib, libgmodule, libffi, libpcre are also packaged.
farindk commentedon Jun 14, 2022
Here is the full error list, but it is not very interesting as it is always the same kind of error:
error.txt
farindk commentedon Jun 14, 2022
I have stripped down the program to the minimum to reproduce the error.
The repository is here: https://github.com/farindk/capture
There is a script that builds everything: https://github.com/farindk/capture/blob/1137d1aff40f7bcadc851b43ebbea817f3cd2224/scripts/create-appimages.sh
Here is the AppImage built with the script above on Ubuntu 20.04 that gives the gstreamer plugin errors like above:
https://github.com/farindk/capture/releases/tag/v1.0
The build log is also attached to the release.
Note: it might be required that a (USB) camera is attached when running the program because only then it tries to load the gstreamer plugins.
Any hint would be very appreciated.
martinrotter commentedon Sep 7, 2022
Having same problems.
yuriymacdev commentedon Sep 15, 2022
Same issue.
@farindk have you had any success with this?
farindk commentedon Sep 16, 2022
@yuriymacdev No success so far, but I didn't track whether there were any changes to the AppImage tools since June. I had to switch off camera support for Linux because of this.
@TheAssassin Please don't be confused about the
libgioissue above. Thelibgioproblem was another issue that seems unrelated to the gstreamer problem. The problem is easy to produce with the minimal code in the repository mentioned above.yuriymacdev commentedon Sep 16, 2022
Thanks @farindk.
For what it's worth, when built on Ubuntu 22 there's no such problem (but if done this way, the software wouldn't run on Ubuntu 20 and below), so could be some kind of versioning issue.