Fatal: Could not initialize GLX
I'm trying to port my project https://github.com/AlbrechtL/welle.io/ to go-appimage with Qt6. It seems that some libraries or modules inside the AppImage are missing.
welle.io AppImage output (the warnings and fatal messages shouldn't be there)
/20240901_a89f1b80_Linux_welle-io-x86_64.AppImage
2024-09-01T23:43:00.704 Debug: main: Set language "de_DE"
2024-09-01T23:43:00.767 Warning: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
2024-09-01T23:43:00.783 Debug: Audio: Current sound output "Built-in Audio Analog Stereo"
2024-09-01T23:43:01.162 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-09-01T23:43:01.166 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-09-01T23:43:01.170 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-09-01T23:43:01.175 Fatal: Could not initialize GLX
Abgebrochen (Speicherabzug geschrieben)
Inside the AppImage build logs 10_Create AppImage.txt I found the following messages that may be related.
2024-09-01T21:31:28.1975151Z ERROR patchelf --print-rpath /home/runner/work/welle.io/Qt/6.7.2/gcc_64/plugins/audio/: stat: No such file or directory
2024-09-01T21:31:28.1976412Z : exit status 1
2024-09-01T21:31:28.1977524Z 2024/09/01 21:31:28 Perhaps it is not dynamically linked, or perhaps it is a script. Continuing...
This is the successor issue of https://github.com/probonopd/go-appimage/issues/300.
I'm using the following GitHub Actions workflow: https://github.com/AlbrechtL/welle.io/blob/0999d28f88f88587c21364dd2bf4942318ae91c2/.github/workflows/linux.yml
Thanks for analyzing this @AlbrechtL. Searching the web for qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat did not turn up an obvious solution. So we need to find out which files are missing when this happens, and deploy those files. Maybe running it with strace can give a hint?
Here you go strace.log
Tons of No such file or directory e.g.
openat(AT_FDCWD, "/tmp/.mount_202409epkPPL/usr/bin/../../home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/../../../../../../../../lib/x86_64-linux-gnu/./../../home/runner/work/welle.io/Qt/6.7.2/gcc_64/qml/QtCharts/libGLX_indirect.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
Indeed libGLX_indirect.so.0 seems to be the (first) culprit. The other libraries in the logfile with ENOENT are found at the end, but this one is not. So it seems that if something GLX related (I still need to find out what exactly) gets deployed, then libGLX_indirect.so.0 also needs to get deployed.
Are you getting the error Fatal: Could not initialize GLX only in a Wayland session or also in a X11 session?
Is there any Qt plugin with "glx" in its name that gets deployed into a subdirectory of your AppDir (which we could use as a trigger to also deploy libGLX_indirect.so.0 whenever that Qt plugin gets deployed?
Are you getting the error Fatal: Could not initialize GLX only in a Wayland session or also in a X11 session?
Yes.
Is there any Qt plugin with "glx" in its name that gets deployed into a subdirectory of your AppDir (which we could use as a trigger to also deploy libGLX_indirect.so.0 whenever that Qt plugin gets deployed?
I don't know what you mean. My feeling from the other warnings is that some Qt plugins are missing. Inside my local Qt6 installation I found the following plugins:
#~/Qt/6.7.2/gcc_64/plugins/xcbglintegrations$ ls
libqxcb-egl-integration.so libqxcb-glx-integration.so
I am looking for something that gets deployed into your AppDir which we could use as an indication that we also need to deploy libGLX_indirect.so.0 . (Possibly it is libqxcb-glx-integration.so indeed.)
For this it would be helpful if you could run
grep -r 'Could not initialize GLX' ./Your.AppDir
after having run appimagetool [-s] deploy on it.
Also, what happens if you export QT_XCB_GL_INTEGRATION=none and then run the AppRun script?
Here, libqxcb-glx-integration.so (probably) gets deployed to the AppDir.
https://github.com/probonopd/go-appimage/blob/70b3d607370fd5fc8a48e818e3dc39f3997e2170/src/appimagetool/appdirtool.go#L1331-L1343
But apparently this does not trigger libGLX_indirect.so.0 to also be deployed.
What does ldd ~/Qt/6.7.2/gcc_64/plugins/xcbglintegration/libqxcb-glx-integration.so say?
Regarding grep
Add added the grep command as well as a find appdir/ command into the build chain here: https://github.com/AlbrechtL/welle.io/commit/6434cecae17e845c2c8bc25fd9c879e248209715
grep output is
grep: ./appdir/home/runner/work/welle.io/Qt/6.7.2/gcc_64/plugins/xcbglintegrations/libqxcb-glx-integration.so: binary file matches
Full AppImage generation log including the appdir/ content: 10_Create AppImage.txt
Regarding QT_XCB_GL_INTEGRATION=none
The error picture is different but it crashes as well :-(.
$ QT_XCB_GL_INTEGRATION=none ./20240903_9124d1a2_Linux_welle-io-x86_64.AppImage
2024-09-14T11:08:12.438 Warning: Could not find the Qt platform plugin "wayland" in ""
2024-09-14T11:08:12.509 Debug: main: Platform name "xcb"
2024-09-14T11:08:12.509 Debug: main: Set language "de_DE"
2024-09-14T11:08:12.543 Warning: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
2024-09-14T11:08:12.549 Debug: Audio: Current sound output "Jabra EVOLVE 30 II Analog Stereo"
2024-09-14T11:08:12.823 Debug: Used input device: 0
2024-09-14T11:08:12.824 Debug: main: Set language "de_DE"
2024-09-14T11:08:12.825 Debug: Used input device: 2
2024-09-14T11:08:12.826 Debug: Apply settings initially
2024-09-14T11:08:12.826 Debug: RadioController: Close device
2024-09-14T11:08:12.826 Info: InputFactory:Input device:auto
2024-09-14T11:08:12.828 Info: Airspy: Open airspy
2024-09-14T11:08:12.834 Info: Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND(-5)
2024-09-14T11:08:12.835 Info: RTL_SDR: Open rtl-sdr
2024-09-14T11:08:12.841 Info: RTL_SDR: No devices found
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libairspySupport.so)
dlopen() failed: /tmp/.mount_202409FCFonj/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libairspySupport.so)
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libbladeRFSupport.so)
dlopen() failed: libbladeRF.so.2: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libHackRFSupport.so)
dlopen() failed: libhackrf.so.0: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libremoteSupport.so)
dlopen() failed: libavahi-common.so.3: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/librtlsdrSupport.so)
dlopen() failed: librtlsdr.so.2: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libuhdSupport.so)
dlopen() failed: libuhd.so.4.6.0: Kann die Shared-Object-Datei nicht öffnen
2024-09-14T11:08:12.850 Info: SoapySDR: No usable SDR device found
2024-09-14T11:08:12.851 Debug: RadioController: AGC on
2024-09-14T11:08:12.851 Debug: RadioController: Play: "Gebe zuletzt gehörten Sender wieder" "d391" on channel "11D"
2024-09-14T11:08:12.851 Debug: Audio: Volume 1
2024-09-14T11:08:12.851 Debug: RadioController: Radio device is not ready or does not exist.
2024-09-14T11:08:12.851 Debug: RadioController: Tune to channel "11D" -> 222.064 MHz
2024-09-14T11:08:12.900 Info: New Receiver Options: TII: 0 disable coarse corr: 0 freqsync: CorrelatePRS fft placement: StrongestPeak
2024-09-14T11:08:12.900 Info: OFDM-processor:restart
2024-09-14T11:08:12.912 Debug: Used input device: 0
2024-09-14T11:08:12.931 Debug: os: linux
2024-09-14T11:08:12.931 Debug: desktopAvailableWidth: 3840
2024-09-14T11:08:12.931 Debug: desktopAvailableHeight: 1080
2024-09-14T11:08:12.931 Debug: orientation: 2
2024-09-14T11:08:12.931 Debug: devicePixelRatio: 1
2024-09-14T11:08:12.931 Debug: pixelDensity: 3.611320754716981
2024-09-14T11:08:12.931 Debug: Creating component: qrc:/QML/RadioView.qml
2024-09-14T11:08:12.944 Debug: Creating component: qrc:/QML/MotView.qml
2024-09-14T11:08:12.966 Warning: qrc:/QML/components/ViewBaseFrame.qml:57:9: QML MenuItem: Created graphical object was not placed in the graphics scene.
2024-09-14T11:08:12.966 Debug: Creating component: qrc:/QML/expertviews/RawRecorder.qml
2024-09-14T11:08:12.976 Debug: Creating component: qrc:/QML/expertviews/SpectrumGraph.qml
2024-09-14T11:08:13.033 Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
2024-09-14T11:08:13.033 Warning: QRhiGles2: Failed to create temporary context
2024-09-14T11:08:13.033 Warning: QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
2024-09-14T11:08:13.037 Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
2024-09-14T11:08:13.037 Warning: QRhiGles2: Failed to create context
2024-09-14T11:08:13.037 Warning: Failed to create RHI (backend 2)
2024-09-14T11:08:13.037 Fatal: Failed to initialize graphics backend for OpenGL.
Abgebrochen (Speicherabzug geschrieben)
Regarding ldd ~/Qt/6.7.2/gcc_64/plugins/xcbglintegration/libqxcb-glx-integration.so
The output is
linux-vdso.so.1 (0x00007fff3e77e000)
libQt6XcbQpa.so.6 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libQt6XcbQpa.so.6 (0x00007f2cd6dc8000)
libxcb-glx.so.0 => /lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f2cd6d9d000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2cd6d98000)
libQt6Gui.so.6 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libQt6Gui.so.6 (0x00007f2cd6200000)
libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f2cd6d11000)
libQt6Core.so.6 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libQt6Core.so.6 (0x00007f2cd5a00000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f2cd6cc8000)
libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007f2cd6cbd000)
libxcb-cursor.so.0 => /lib/x86_64-linux-gnu/libxcb-cursor.so.0 (0x00007f2cd5600000)
libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007f2cd6cb6000)
libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007f2cd6cb0000)
libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007f2cd6ca9000)
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007f2cd6c96000)
libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007f2cd6c8f000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f2cd6c8a000)
libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f2cd6c80000)
libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f2cd6c76000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f2cd6c65000)
libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f2cd6c60000)
libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007f2cd6c42000)
libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f2cd6c3d000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f2cd58c0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2cd6c38000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f2cd6c0c000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2cd5200000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2cd6119000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2cd60f9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2cd4e00000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f2cd54c6000)
libgthread-2.0.so.0 => /lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f2cd6c05000)
libEGL.so.1 => /lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f2cd60e6000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f2cd5876000)
libQt6DBus.so.6 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libQt6DBus.so.6 (0x00007f2cd5137000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2cd585a000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f2cd506f000)
libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f2cd4d48000)
libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f2cd5826000)
libicui18n.so.73 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libicui18n.so.73 (0x00007f2cd4800000)
libicuuc.so.73 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libicuuc.so.73 (0x00007f2cd4400000)
libicudata.so.73 => /home/runner/work/welle.io/Qt/6.7.2/gcc_64/lib/libicudata.so.73 (0x00007f2cd2400000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2cd5821000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2cd6e95000)
libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007f2cd5818000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f2cd5812000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f2cd580a000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f2cd5450000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f2cd503e000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f2cd5447000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f2cd4cfa000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f2cd4cbf000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f2cd5439000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f2cd4ca7000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f2cd4be0000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f2cd4bbd000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f2cd542c000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f2cd4b92000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f2cd4731000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f2cd4b72000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f2cd5033000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f2cd42c2000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f2cd470b000)
Most likely unrelated, but SoapySDR::loadModule seems to look in an absolute path, this of course won't work in an AppImage. Is this something you can change in your code? Would be best to look up the path of the main binary, and then construct the path to the SoapySDR modules based on that.
The reason why libGLX_indirect.so.0 does not get deployed is that seemingly libqxcb-glx-integration.so does not depend on it. So what does? Can you please run grep -r libGLX_indirect.so.0 appdir/?
Most likely unrelated, but
SoapySDR::loadModuleseems to look in an absolute path, this of course won't work in an AppImage. Is this something you can change in your code? Would be best to look up the path of the main binary, and then construct the path to the SoapySDR modules based on that.
I didn't hard code this library. I just link it dynamically like all other shared libraries. Maybe inside the SoapySDR shared library there are some hard coded absolute paths.
Can you please run
grep -r libGLX_indirect.so.0 appdir/?
Nothing found.
What happens if you manually copy libGLX_indirect.so.0 into appdir/usr/lib/?
Do you have a chance to upload your AppDir priori to and after running appimagetool somewhere? I think I'll need to have a deep look at this...
The app startes a little bit further but crashes again. It seems that more libraries are missing.
Key error messages
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
Full log:
~/temp$ ./welle.io-1.0-x86_64.AppImage
2024-09-29T11:39:29.682 Warning: Could not find the Qt platform plugin "wayland" in ""
2024-09-29T11:39:29.755 Debug: main: Platform name "xcb"
2024-09-29T11:39:29.755 Debug: main: Set language "de_DE"
2024-09-29T11:39:29.785 Warning: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
2024-09-29T11:39:29.791 Debug: Audio: Current sound output "Jabra EVOLVE 30 II Analog Stereo"
MESA-LOADER: failed to open radeonsi: /usr/lib/dri/radeonsi_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
2024-09-29T11:39:30.089 Warning: QGLXContext: Failed to create dummy context
2024-09-29T11:39:30.174 Debug: Used input device: 0
2024-09-29T11:39:30.175 Debug: main: Set language "de_DE"
2024-09-29T11:39:30.178 Debug: Used input device: 2
2024-09-29T11:39:30.179 Debug: Apply settings initially
2024-09-29T11:39:30.179 Debug: RadioController: Close device
2024-09-29T11:39:30.179 Info: InputFactory:Input device:auto
2024-09-29T11:39:30.181 Info: Airspy: Open airspy
2024-09-29T11:39:30.190 Info: Airspy: airpsy_open () failed: AIRSPY_ERROR_NOT_FOUND(-5)
2024-09-29T11:39:30.192 Info: RTL_SDR: Open rtl-sdr
2024-09-29T11:39:30.200 Info: RTL_SDR: No devices found
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libbladeRFSupport.so)
dlopen() failed: libbladeRF.so.2: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libHackRFSupport.so)
dlopen() failed: libhackrf.so.0: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libremoteSupport.so)
dlopen() failed: libavahi-common.so.3: Kann die Shared-Object-Datei nicht öffnen
[ERROR] SoapySDR::loadModule(/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libuhdSupport.so)
dlopen() failed: libuhd.so.4.6.0: Kann die Shared-Object-Datei nicht öffnen
2024-09-29T11:39:30.231 Info: SoapySDR: No usable SDR device found
2024-09-29T11:39:30.233 Debug: RadioController: AGC on
2024-09-29T11:39:30.233 Debug: Audio: Volume 1
2024-09-29T11:39:30.233 Debug: RadioController: Play: "Gebe zuletzt gehörten Sender wieder" "d391" on channel "11D"
2024-09-29T11:39:30.233 Debug: RadioController: Radio device is not ready or does not exist.
2024-09-29T11:39:30.233 Debug: RadioController: Tune to channel "11D" -> 222.064 MHz
2024-09-29T11:39:30.284 Info: New Receiver Options: TII: 0 disable coarse corr: 0 freqsync: CorrelatePRS fft placement: StrongestPeak
2024-09-29T11:39:30.284 Info: OFDM-processor:restart
2024-09-29T11:39:30.288 Debug: Used input device: 0
2024-09-29T11:39:30.305 Debug: os: linux
2024-09-29T11:39:30.305 Debug: desktopAvailableWidth: 3840
2024-09-29T11:39:30.305 Debug: desktopAvailableHeight: 1080
2024-09-29T11:39:30.305 Debug: orientation: 2
2024-09-29T11:39:30.305 Debug: devicePixelRatio: 1
2024-09-29T11:39:30.305 Debug: pixelDensity: 3.611320754716981
2024-09-29T11:39:30.305 Debug: Creating component: qrc:/QML/RadioView.qml
2024-09-29T11:39:30.327 Debug: Creating component: qrc:/QML/MotView.qml
2024-09-29T11:39:30.361 Warning: qrc:/QML/components/ViewBaseFrame.qml:57:9: QML MenuItem: Created graphical object was not placed in the graphics scene.
2024-09-29T11:39:30.363 Debug: Creating component: qrc:/QML/expertviews/RawRecorder.qml
2024-09-29T11:39:30.382 Debug: Creating component: qrc:/QML/expertviews/SpectrumGraph.qml
2024-09-29T11:39:30.435 Warning: QRhiGles2: Failed to create temporary context
2024-09-29T11:39:30.440 Warning: QRhiGles2: Failed to create context
2024-09-29T11:39:30.440 Warning: Failed to create RHI (backend 2)
2024-09-29T11:39:30.440 Fatal: Failed to initialize graphics backend for OpenGL.
Abgebrochen (Speicherabzug geschrieben)
What can of worms did we open here ;-/
Where are the missing libraries located on your build/host system?
Both build and host systems is Ubuntu. The libraries are located here e.g. /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so
Any new here? How can I help to find the issue?
Uh, these files seem to be specific to the GPU, which probably means that we'd have to bundle all of /usr/lib/x86_64-linux-gnu/dri. Most likely they don't show up with ldd but are loaded dynamically somehow. You could try to copy all files from inside that directory to your <AppDir>/usr/lib/x86_64-linux-gnu/ directory (NOT dri/) and see what happens.
Pretty much the same picture (see below). Commit to copy the libraries: https://github.com/AlbrechtL/welle.io/commit/6f57d2889abae7e1828de65fe0084b3b2a3196eb
./20241106_6f57d288_Linux_welle-io-x86_64.AppImage
2024-11-06T10:03:16.491 Warning: Could not find the Qt platform plugin "wayland" in ""
2024-11-06T10:03:17.041 Debug: main: Platform name "xcb"
2024-11-06T10:03:17.041 Debug: main: Set language "de_DE"
2024-11-06T10:03:17.092 Warning: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
2024-11-06T10:03:17.106 Debug: Audio: Current sound output "Built-in Audio Analog Stereo"
2024-11-06T10:03:17.478 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-11-06T10:03:17.482 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-11-06T10:03:17.486 Warning: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::NoProfile)
2024-11-06T10:03:17.490 Fatal: Could not initialize GLX
Abgebrochen (Speicherabzug geschrieben)
and with QT_XCB_GL_INTEGRATION=none
$ QT_XCB_GL_INTEGRATION=none ./20241106_6f57d288_Linux_welle-io-x86_64.AppImage
2024-11-06T10:04:47.948 Warning: Could not find the Qt platform plugin "wayland" in ""
2024-11-06T10:04:48.057 Debug: main: Platform name "xcb"
2024-11-06T10:04:48.057 Debug: main: Set language "de_DE"
2024-11-06T10:04:48.101 Warning: No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.
2024-11-06T10:04:48.116 Debug: Audio: Current sound output "Built-in Audio Analog Stereo"
2024-11-06T10:04:48.558 Debug: Used input device: 0
2024-11-06T10:04:48.560 Debug: main: Set language "de_DE"
2024-11-06T10:04:48.591 Debug: Used input device: 5
2024-11-06T10:04:48.591 Debug: Apply settings initially
2024-11-06T10:04:48.591 Debug: RAWFile path: /home/albrecht/src/20241015_welle-io-record_UK.iq
2024-11-06T10:04:48.592 Debug: RAWFile format set to: auto
2024-11-06T10:04:48.592 Debug: RadioController: Close device
2024-11-06T10:04:48.592 Debug: RadioController: AGC on
2024-11-06T10:04:48.593 Info: RAWFilePeriod =8000
2024-11-06T10:04:48.593 Debug: Audio: Volume 1
2024-11-06T10:04:48.633 Debug: os: linux
2024-11-06T10:04:48.633 Debug: desktopAvailableWidth: 3840
2024-11-06T10:04:48.633 Debug: desktopAvailableHeight: 1200
2024-11-06T10:04:48.633 Debug: orientation: 2
2024-11-06T10:04:48.633 Debug: devicePixelRatio: 1
2024-11-06T10:04:48.634 Debug: pixelDensity: 5.665634674922599
2024-11-06T10:04:48.634 Debug: Creating component: qrc:/QML/RadioView.qml
2024-11-06T10:04:48.669 Debug: Creating component: qrc:/QML/expertviews/SpectrumGraph.qml
2024-11-06T10:04:48.767 Debug: Creating component: qrc:/QML/expertviews/ServiceDetails.qml
2024-11-06T10:04:48.777 Debug: Creating component: qrc:/QML/MotView.qml
2024-11-06T10:04:48.786 Warning: qrc:/QML/components/ViewBaseFrame.qml:57:9: QML MenuItem: Created graphical object was not placed in the graphics scene.
2024-11-06T10:04:48.806 Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
2024-11-06T10:04:48.806 Warning: QRhiGles2: Failed to create temporary context
2024-11-06T10:04:48.806 Warning: QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
2024-11-06T10:04:48.816 Warning: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
2024-11-06T10:04:48.816 Warning: QRhiGles2: Failed to create context
2024-11-06T10:04:48.816 Warning: Failed to create RHI (backend 2)
2024-11-06T10:04:48.816 Fatal: Failed to initialize graphics backend for OpenGL.
Abgebrochen (Speicherabzug geschrieben)
Are you running appimagetool -s deploy (note the -s)?
Yes, see:
# Create AppImage
./appimagetool-*.AppImage -s deploy ./appdir/usr/share/applications/*.desktop # Bundle EVERYTHING
cp /usr/lib/x86_64-linux-gnu/dri/* appdir/usr/lib/x86_64-linux-gnu/ # Copy some additional libs to AppImage. See https://github.com/probonopd/go-appimage/issues/301 for details
find appdir/
VERSION=1.0 ./appimagetool-*.AppImage ./appdir # turn AppDir into AppImage
Source: https://github.com/AlbrechtL/welle.io/blob/6f57d2889abae7e1828de65fe0084b3b2a3196eb/.github/workflows/linux.yml#L72-L76
@AlbrechtL does the AppImage there work for you?
- https://github.com/AppImage/AppImageSpec/issues/36#issuecomment-2480826803
Yes, much better!
I just did a short smoke test, basic functions are there, but still a few libs are missing. But I think this can be fixed easily in @Samueru-sama shell script (https://github.com/AppImage/AppImageSpec/issues/36#issuecomment-2480826803). But the AppImage is huge 151 MB the working older once was ~60 MB.
$ ./welle.io-2.5-1-x86_64.AppImage
2024-11-17T21:01:39.791 Debug: main: Platform name "wayland"
2024-11-17T21:01:39.793 Debug: main: Set language "de_DE"
2024-11-17T21:01:40.043 Debug: Audio: Current sound output "Built-in Audio Analog Stereo"
2024-11-17T21:01:40.470 Debug: Used input device: 0
2024-11-17T21:01:40.472 Debug: main: Set language "de_DE"
2024-11-17T21:01:40.494 Debug: Used input device: 5
2024-11-17T21:01:40.494 Debug: Apply settings initially
2024-11-17T21:01:40.494 Debug: RAWFile path: /home/albrecht/src/20241015_welle-io-record_UK.iq
2024-11-17T21:01:40.494 Debug: RAWFile format set to: auto
2024-11-17T21:01:40.494 Debug: RadioController: Close device
2024-11-17T21:01:40.495 Debug: RadioController: AGC on
2024-11-17T21:01:40.495 Info: RAWFilePeriod =8000
2024-11-17T21:01:40.495 Debug: Audio: Volume 1
2024-11-17T21:01:40.526 Debug: os: linux
2024-11-17T21:01:40.526 Debug: desktopAvailableWidth: 3840
2024-11-17T21:01:40.526 Debug: desktopAvailableHeight: 1200
2024-11-17T21:01:40.526 Debug: orientation: 2
2024-11-17T21:01:40.526 Debug: devicePixelRatio: 1
2024-11-17T21:01:40.526 Debug: pixelDensity: 5.665634674922599
2024-11-17T21:01:40.527 Debug: Creating component: qrc:/QML/RadioView.qml
2024-11-17T21:01:40.548 Debug: Creating component: qrc:/QML/expertviews/SpectrumGraph.qml
2024-11-17T21:01:40.557 Debug: Error:qrc:/QML/expertviews/SpectrumGraph.qml:44 Type WSpectrum unavailable
qrc:/QML/components/WSpectrum.qml:27 Cannot load library /tmp/.mount_welle.BjfDJm/shared/lib/qt6/qml/QtCharts/libqtchartsqml2plugin.so: libQt6ChartsQml.so.6: cannot open shared object file: No such file or directory
[...]
As far as I can see, the key factor to get it working is the usage of https://github.com/VHSgunzo/sharun.
...and possibly the use of __EGL_VENDOR_LIBRARY_DIRS.
I just did a short smoke test, basic functions are there, but still a few libs are missing. But I think this can be fixed easily in @Samueru-sama shell script (https://github.com/AppImage/AppImageSpec/issues/36#issuecomment-2480826803). But the AppImage is huge 151 MB the working older once was ~60 MB.
There isn't much that can be done, the size is similar to my OBS Studio appimage, which is also a Qt application with all the libs including the gpu libs included, also I had to copy the entire qt6/qml dir to the appdir which is outside the plugins dir, first time I needed to do this.
You can try to build on alpine, since I normally use Artix linux instead for my appimages.
EDIT: Also statically link some dependencies if possible, for example stuff like ffmpeg reduces the size of the appimage a lot if it is statically linked instead of copying all the ffmpeg libs.
EDIT2: Btw on my script I noticed something that could be improved, this part:
# Prepare sharun
ln ./sharun ./AppRun
./sharun -g
change it to ln -s ./bin/welle-io ./AppRun, that way /proc/self/exe becomes welle-io and it will also find any files if it has relative paths already, which I found was needed in the OBS AppImage since the obs binary looks for ../lib/obs to find its plugins.
I'm building the welle.io AppImage via GitHub Actions (see: https://github.com/AlbrechtL/welle.io/blob/master/.github/workflows/linux.yml).
Yesterday I heard the first time from sharun and I don't know what I have to do. Most likely we have to stay with Ubuntu because many different actions (e.g. jurplel/install-qt-action@v4 which I'm using to get Qt) requires Ubuntu.
What would be the recommended steps to get a working AppImage?
What would be the recommended steps to get a working AppImage?
sharun is very flexible, you just give the path to the binaries you want to bundle using the lib4bin script and it handles the rest, it already finds and sets all the needed env variables on its own.
However note that in order to get the GL libs you have to simulate some display since those are dlopened and won't be picked up by ldd or similar means, run the lib4bin script with the -e flag and on my script I used xvfb-run to simulate the display.
If you can't do that then it would be doing a local run on ubuntu to see what libs end up being bundle and then on the deploy script the missing libs get added manually (likely be to tedious) and lib4bin is ran without -e which means it will just ldd to find the libs, since sharun works after the fact, after you are done copying all the needed libs you just have to ./sharun -g and it will generate a file in ./shared/lib that contains every single directory with libraries which will be passed down to the ld-*.so when in use, the rest is just running appimagetool to turn the AppDir into an AppImage.
@Samueru-sama Thanks for the explanation. I tried add lib4bin into my actions workflow but I missed something, obviously. The welle AppImage complains that a library is missing that is definitely found by sharun.
The important workflow lines are https://github.com/AlbrechtL/welle.io/blob/f1cdf832598430bf38c0bed28d96943e596dbf76/.github/workflows/linux.yml#L77-L96
Can I ask you for help to get it working?
@AlbrechtL not sure if this applies to Welle, but for PrusaSlicer I had to do this when using lib4bin and sharun
https://github.com/probonopd/PrusaSlicer/blob/77e83610734372d7d7d490bca2ecc28f14f37d48/.github/workflows/build.yml#L148-L153
I am still new to this stuff myself, so @Samueru-sama knows a lot more than me about this.
@Samueru-sama Thanks for the explanation. I tried add
lib4bininto my actions workflow but I missed something, obviously. The welle AppImage complains that a library is missing that is definitely found bysharun.The important workflow lines are https://github.com/AlbrechtL/welle.io/blob/f1cdf832598430bf38c0bed28d96943e596dbf76/.github/workflows/linux.yml#L77-L96
Can I ask you for help to get it working?
Don't use go-appimagetool to deploy if lib4bin is going to be used.
lib4bin recently had several features added that make it easier to deploy.
use ./lib4bin -p -v -r -s -e -k where the -k means hooks, lib4bin will do stuff like copy the /usr/share/glvnd when it finds the lib that needs it and so on.
sharun also works as the AppRun and will set all the needed env variables on its own. just run ln ./sharun ./AppRun.
@AlbrechtL I did the needed changes here.
However it is not working, it is missing a lot of libraries including the all the Qt plugins, which I have previously deployed the plugins manually, but lib4bin usually gets most of the plugins on its own as well and I deploy them manually just to cover stuff like the wayland plugins that don't get dlopened since xvfb-run simulates an x11 environment.
Does the application actually work in the ubuntu runner that is being built on? I noticed that a home/runner/work/welle.io/Qt/6.8.0/gcc_64/lib/ dir gets deployed in the AppDir, which I assume it is because you are getting Qt6 from outside the distro package manager, does that Qt6 install actually have everything that the application needs including the Qt plugins?
@probonopd Thanks for answering!
not sure if this applies to Welle, but for PrusaSlicer I had to do this when using lib4bin and sharun
Wow, a lot of custom steps to get the PrusaSlicer AppImage working!
@Samueru-sama Thanks for your work to fix the welle.io build workflow!
Does the application actually work in the ubuntu runner that is being built on? I noticed that a home/runner/work/welle.io/Qt/6.8.0/gcc_64/lib/ dir gets deployed in the AppDir, which I assume it is because you are getting Qt6 from outside the distro package manager[...],
Correct, the Qt packages are installed via https://github.com/miurahr/aqtinstall/ because I want to use the latest Qt libraries.
[...], does that Qt6 install actually have everything that the application needs including the Qt plugins?
Regarding Qt I would say yes. Honestly, I never tried it but I use official Qt Installer for development and this installer and aqtinstall are using the exact same packages.