question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am on Jammy Ubuntu, I create an AppImage with appimage-builder --recipe AppImageBuilder.yml

my AppImageBuilder.yml is :

# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script: |
  # remove any existent binaries
  rm -rf AppDir | true

  # compile and install binaries into AppDir
  cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  make install DESTDIR=AppDir
AppDir:
  path: ./AppDir
  app_info:
    id: francetv
    name: FranceTV
    icon: france-tv
    version: '1.0'
    exec: usr/bin/FranceTV
    exec_args: $@
  runtime:
    env:
      # Disable webengine sandboxing
      QTWEBENGINE_DISABLE_SANDBOX: 0
      QT_QPA_PLATFORM: xcb
  apt:
    arch: amd64
    allow_unauthenticated: true
    sources:
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy main restricted
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy universe
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy-updates universe
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy multiverse
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
      - sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ jammy-backports main
          restricted universe multiverse
      - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security main restricted
      - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security universe
      - sourceline: deb http://security.ubuntu.com/ubuntu jammy-security multiverse
    include:
      - libxkbcommon0
      - libxkbcommon-x11-0
      - libxcb-icccm4
      - libxcb-xkb1
      - libxcb-render-util0
      - libxcb-randr0
      - libxcb-keysyms1
      - libxcb-xinerama0
      - libxcb-image0
      - kwayland-data
      - kwin-wayland-backend-drm
      - kwin-wayland-backend-fbdev
      - kwin-wayland-backend-virtual
      - kwin-wayland-backend-wayland 
      - kwin-wayland-backend-x11
      - libqt6webengine6-data
      - libqt6widgets6
      - libqt6core6
      - libqcoro6core0
      - libqt6core5compat6
      - libqt6webenginecore6
      - libqt6webenginecore6
      - libqt6svg6
      - libqt6gui6
      - libqt6webview6
      - libqt6webenginewidgets6
      - libqt6webenginecore6
      - libqt6webenginecore6-bin
      - libqt6webenginequick6
      - libqt6network6
      - qt6-base-dev
      - libqt6waylandclient6
      - libqt6waylandcompositor6
      - libqt6waylandeglclienthwintegration6
      - libqt6waylandeglcompositorhwintegration6
      - qt6-wayland
    exclude: []
  files:
    include: []
    exclude:
      - usr/share/man
      - usr/share/doc/*/README.*
      - usr/share/doc/*/changelog.*
      - usr/share/doc/*/NEWS.*
      - usr/share/doc/*/TODO.*
AppImage:
  arch: x86_64
  update-information: guess
  sign-key: None

In my system Jammy the appimage works correctly but in other linux (x11 or wayland) i have this error :

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

It’s a bug or It’s from me ?

when i try to debug : qDebug() << "PluginPath is : " << QLibraryInfo::location(QLibraryInfo::PluginsPath); the result is : PluginPath is : "/tmp/.mount_Francex0mlxO/usr/lib/x86_64-linux-gnu/qt6/plugins" its the correct path

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Paulluxcommented, Apr 4, 2022

My projet is here : https://github.com/Paullux/FranceTV The releases are here : https://github.com/Paullux/FranceTV/releases

for more explain :

i created a qt6.conf what i put in $APPDIR/usr/bin :

[Paths]
Prefix = ../..
Libraries = usr/lib/x86_64-linux-gnu
LibraryExecutables = usr/lib/qt6/libexec
Binaries = usr/bin
Plugins = usr/lib/x86_64-linux-gnu/qt6/plugins
Qml2Imports = usr/lib/x86_64-linux-gnu/qt6/qml
Data = usr/share/qt6
Translations = usr/share/qt6/translations

in my CMakeLists.txt to install qt6.conf i made changement :

if (UNIX AND NOT APPLE)
    install(TARGETS FranceTV
            RUNTIME DESTINATION bin)
    install(FILES qt6.conf DESTINATION "bin/")
    install(FILES FranceTV.desktop DESTINATION "share/applications")
    install(FILES images/france-tv-2.svg DESTINATION "share/icons/hicolor/scalable/apps/")
    install(FILES images/france-tv-2.png DESTINATION "share/icons/hicolor/256x256/apps/")
    install(FILES images/france-tv-2.ico DESTINATION "share/icons/hicolor/256x256/apps/")
endif()

i change the script in my AppImageBuilder.yml to create symbolics links :

# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script: |
  # remove any existent binaries
  rm -rf AppDir | true
  # compile and install binaries into AppDir
  cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
  make install DESTDIR=AppDir
  
  # link plugins
  mkdir -p $APPDIR/usr/lib/x86_64-linux-gnu/qt6/plugins
  mkdir -p $APPDIR/usr/bin
  cd AppDir/usr/bin
  ln -s ../../usr/lib/x86_64-linux-gnu/qt6/plugins .
  cd ../..
  
  # link ressource and translations
  mkdir -p $APPDIR/usr/share/qt6/resources
  mkdir -p $APPDIR/usr/share/qt6/translations
  ln -s usr/share/qt6/resources .
  ln -s usr/share/qt6/translations .
  cd ..

After this the AppImage is working

0reactions
azubietacommented, Apr 5, 2022

Will add this to appimage-builder qt helper! Thanks a lot for the input 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Qt 6.2 Known Issues
Qt Version Overview New Features Qt 5.0 Qt 5.0.0 • Qt 5.0.1 Release New Features in Qt 5.0 Qt 5.1 Qt 5.1 Release New Features...
Read more >
Qt6 applications not working after Linux update
I updated my packages and after update, applications working with Qt6 are not opening with this error: Cannot mix incompatible Qt library ......
Read more >
qt6 - PySide6: AlignCenter not working for ...
The data in the table cells is not centering. It used to before but now all of a sudden it doesn't anymore, and...
Read more >
RSS feeds do not work with qt6 · Issue #16879 · qbittorrent ...
qBittorrent & operating system versions qBittorrent: 4.4.2 x64 OS: Arch Linux Qt: 6.2.4 libtorrent-rasterbar: 2.0.5.0 Boost: 1.78.0 OpenSSL: ...
Read more >
qt6-tools: does not build and link with system litehtml
version of litehtml (0.5+git20211028) as included in src:qt6-tools. A patch is then also required due issues with Qt CMake code (trying
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found