Trying to solve the old problem with the launch of the application Qt version 5.11
my snapcraft
name: managetime
version: "0.1.0"
summary: timer
description: |
Application for time management
confinement: strict
architectures: [amd64]
apps:
managetime:
command: bin/ProjectTimer
plugs: [home, unity7, x11, opengl, pulseaudio, wayland]
environment:
XDG_RUNTIME_DIR: /run/user/1000
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/etc/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d
# XKB config
XKB_CONFIG_ROOT: $SNAP/usr/share/X11/xkb
# Qt Platform to Wayland
#QT_QPA_PLATFORM: wayland
QT_QPA_PLATFORM: xcb
QTCHOOSER_NO_GLOBAL_DIR: 1
QT_SELECT: snappy-qt5
# Qt Modules
LD_LIBRARY_PATH: $SNAP/Qt/5.11.0/gcc_64/lib:$LD_LIBRARY_PATH
QT_PLUGIN_PATH: $SNAP/Qt/5.11.0/gcc_64/plugins
QML2_IMPORT_PATH: $QML2_IMPORT_PATH:$SNAP/Qt/5.11.0/gcc_64/qml
QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/Qt/5.11.0/gcc_64/plugins/platforms/
# XDG Config
XDG_CONFIG_DIRS: $SNAP/etc/xdg:$SNAP/usr/xdg:$XDG_CONFIG_DIRS
XDG_DATA_DIRS: $SNAP/usr/share:$XDG_DATA_DIRS
# Font Config and themes
FONTCONFIG_PATH: $SNAP/etc/fonts/conf.d
FONTCONFIG_FILE: $SNAP/etc/fonts/fonts.conf
# Tell libGL where to find the drivers
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$ARCH/dri
parts:
managetime:
plugin: dump
source: scripts
source-type: local
build-attributes:
- keep-execstack
#- no-system-libraries
integration:
plugin: nil
stage-packages:
- libc-bin
- libc6
- libclutter-1.0-0
- libxkbcommon0
- libx11-xcb1
- ttf-ubuntu-font-family
- dmz-cursor-theme
- libglib2.0-0
- light-themes
- shared-mime-info
- libgdk-pixbuf2.0-0
- libsqlite0
- libsqlite3-0
- libgl1-mesa-dev
If I do not use no-system-libraries, then when I try to start the application, I see an error message
Cannot mix incompatible Qt library (version 0x50b01) with this library (version 0x50b00)
This is because the snap package collects the Qt libraries from the system.
In fact, they are not needed, since I am already copying those that will be needed.
If I use no-system-libraries I see error
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), linuxfb (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), minimal (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), minimalegl (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), offscreen (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), vnc (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), wayland-egl (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), wayland (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), wayland-xcomposite-egl (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), wayland-xcomposite-glx (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), webgl (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), xcb (from /snap/managetime/x1/Qt/5.11.0/gcc_64/plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Tell me plz how to do solve these errors? And what is the best way to do it?
Thx.