Dump latest qt libs

I managed to assemble a package, but after launching the application, it does not display the contents of the windows
here’s the launch log:

QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.hanoi-tower', please create it with 0700 permissions.
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Unrecognized OpenGL version
Unrecognized OpenGL version
QGLXContext: Failed to create dummy context
qrc:/main.qml:16: TypeError: Property 'launch' of object QQuickPage(0x5569fd4ccf40) is not a function
XmbTextListToTextProperty result code -2
Unrecognized OpenGL version
Unrecognized OpenGL version

name: hanoi-tower
version: '1.5snap'
summary: Deploy Qt Project
description: |
  The Hanoi Tower is one of the most popular puzzles of the 19th century. |
  Three bars are given, on one of which eight rings are strung, the rings differ in size and lie smaller on larger ones.|
  The problem is to transfer the pyramid from eight rings for the least number of moves to another rod.|
  At a time, only one ring is allowed to carry, and you can not put a larger ring on less.|

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

icon: snap/gui/icon.png

apps:
  hanoi-tower:
    command: bin/hanoi-towers

    plugs: [desktop, unity7, home, opengl, x11, wayland]
    environment:
      LD_LIBRARY_PATH: $SNAP/lib
      QML_IMPORT_PATH: $SNAP/qml
      QML2_IMPORT_PATH: $SNAP/qml
      QT_PLUGIN_PATH: $SNAP/plugins
      QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/plugins/platforms


parts:
  hanoi-tower:
    plugin: dump
    source: app/

    stage-packages:
      # Here for the plugins-- they're not linked in automatically.
      - libx11-xcb-dev
      - libglu1-mesa-dev
      - libxrender-dev
      - libxi-dev
      - libegl1-mesa
      - fontconfig


snap package

you are missing libgl1-mesa-dri in stage-packages …

also, do not use the -dev versions of packages in stage-packages (there is no point in shipping the headers inside the snap after building, -dev versions should be used in build-packages if you actually need them to build)

if you do not use one of the desktop wrappers (which automatically create necessary runtime dirs for you) you need to create your own wrapper to call mkdir and chmod for non-existing directories …

1 Like

thanks)
I’ll try to add libraries

not work ((
problem still is.

name: hanoi-tower
version: '1.5snap'
summary: Deploy Qt Project
description: |
  The Hanoi Tower is one of the most popular puzzles of the 19th century. |
  Three bars are given, on one of which eight rings are strung, the rings differ in size and lie smaller on larger ones.|
  The problem is to transfer the pyramid from eight rings for the least number of moves to another rod.|
  At a time, only one ring is allowed to carry, and you can not put a larger ring on less.|

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

icon: snap/gui/icon.png

apps:
  hanoi-tower:
    command: bin/hanoi-towers

    plugs: [desktop, unity7, home, opengl, x11, wayland]
    environment:
      LD_LIBRARY_PATH: $SNAP/lib
      QML_IMPORT_PATH: $SNAP/qml
      QML2_IMPORT_PATH: $SNAP/qml
      QT_PLUGIN_PATH: $SNAP/plugins
      QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/plugins/platforms


parts:
  hanoi-tower:
    plugin: dump
    source: app/

    stage-packages:
      # Here for the plugins-- they're not linked in automatically.
      - libx11-xcb1
      - libglu1-mesa
      - libxrender1
      - libxi6
      - libegl1-mesa
      - fontconfig
      - libgl1-mesa-dri


QStandardPaths: XDG_RUNTIME_DIR points to non-existing path '/run/user/1000/snap.hanoi-tower', please create it with 0700 permissions.
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
Unrecognized OpenGL version
Unrecognized OpenGL version
QGLXContext: Failed to create dummy context
qrc:/main.qml:16: TypeError: Property 'launch' of object QQuickPage(0x55912eb22ea0) is not a function
XmbTextListToTextProperty result code -2
Unrecognized OpenGL version
Unrecognized OpenGL version

@ogra just as an aside - when should I pencil in on my calendar for Qt six ?

you probably also want to append $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri/ to your LD_LIBRARY_PATH (this is the search path where the *_dri.so drivers from libgl1-mesa-dri are kept … i think there are more env vars you need to set (perhaps you should simply use a desktop-helper here to get all the vars in place)

1 Like

@attache i have no idea, i’m not using Qt much so i dont know when upstream will release Qt six

Still not working
I ran the packet on a machine with a map of Nvidea there everything is fine, but on a car with a map amd does not work
here is the contents of command-hanoi-tower.wrapper

#!/bin/sh
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/mesa-egl:$SNAP/usr/lib/x86_64-linux-gnu/mesa"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
exec "$SNAP/bin/hanoi-towers" "$@"

“does not work” is not very helpful, do you have a log with the errors when you run the app from commandline ?

It worked!
I mistakenly skipped the contents of the dri directory in LD_LIBRARY_PATH
thank you)

1 Like