If I install the snap package in the newly installed system, I see such errors:
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
QSoundEffect(pulseaudio): Error decoding source
QSoundEffect(pulseaudio): Error decoding source
Unrecognized OpenGL version
Unrecognized OpenGL version
But if I install the package in the system in which I built this package, I get such errors:
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: radeonsi_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
QSoundEffect(pulseaudio): Error decoding source
QSoundEffect(pulseaudio): Error decoding source
Buffer creation failed
Buffer creation failed
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
QOpenGLShaderProgram::uniformLocation(opacity): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation(qt_Matrix): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
QOpenGLShaderProgram::uniformLocation(fontScale): shader program is not linked
QOpenGLShaderProgram::uniformLocation(vecDelta): shader program is not linked
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
For me, the cause of these errors is completely unclear((
(though with binary nvidia drivers you want it to be /var/lib/snapd/lib/gl ā¦ which i think would require a wrapper to switch between free and closed driver)
I changed the parameter as you advised.
On VirtualBox I was able to run the application.
I have a graphic card(Radeon Vega 64, installed driver amdgpu-pro) on my computer, and it seems there is a new problem.
/usr/share/libdrm/amdgpu.ids: No such file or directory
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
/usr/share/libdrm/amdgpu.ids: No such file or directory
mesa: for the -simplifycfg-sink-common option: may only occur zero or one times!
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: radeonsi
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QSoundEffect(pulseaudio): Error decoding source
QSoundEffect(pulseaudio): Error decoding source
Buffer creation failed
Buffer creation failed
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
""
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShader: could not create shader
shader compilation failed:
I mean the libraries depended by radeonsi_dri.so, it is very common that a shared library depends on other shared libraries, to verify this you have to run the following commands:
which isnāt provided by the snap, note that in the runtime the snapped application canāt access libraries that arenāt bundled in the snap (with a few exceptions which are provided by the core snap, including the C runtime library).
Although the libtinfo.so.5 library does exist in the core snap (/snap/core/current/lib/x86_64-linux-gnu/libtinfo.so.5), it is possible that it isnāt in the snapdās whitelist of library access and thus isnāt available to the snap, please try to add libtinfo5 to the stage-packages and verify if it make the library loading work.
This is also a potential cause of the failure of loading the driver support library, please add libdrm-common to the stage-packages.
Note that it is likely that the library still canāt access the amdgpu.ids file since the staged file is rather located at $SNAP/usr/share/libdrm/amdgpu.ids instead of /usr/share/libdrm/amdgpu.ids, in this case you have to fix the problem via rebuilding DRM libraries with the proper DATAROOTDIR or PREFIX so that it can locate the required software resources, there are other experimental option to solve the problem as well, like sergiusens/snapcraft-preload: Use smart preloading in your snaps to avoid hard coded parts that wold fail security. and the Snap layouts - doc - snapcraft.io, though Iām not sure those are ideal or not.
Yes, your advice helped. Now the library is in the snap package
libtinfo.so.5 => /snap/managetime/x1/usr/lib/x86_64-linux-gnu/dri/../../../../lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f0882965000)
Could you explain what to do with this? I did not quite understand where and what should be setting. But $SNAP/usr/share/libdrm/amdgpu.ids is in the package.
The problem is that the library is hardcoded to look at /usr/share/libdrm/amdgpu.ids instead of $SNAP/usr/share/libdrm/amdgpu.ids during the configure phase (as /usr is the proper install prefix and /usr/share is the proper data lookup location for regular software in Ubuntu), you have to rebuild it with the proper resource paths to solve the problem.
In short, you have to rebuild libdrm as a new part with the --datarootdir set as $SNAP/share
No, it is about the software part called libdrm, instead of your target application.
You have to fetch libdrmās source package, extract it to parts/part_name/src using the override-pull scriptlet, and build it with the desirable plugin and configflags.
I understand you correctly, I need to unpack the package of libdrm-common to path $SNAP/share, and after that I collect the snap package?
Because now I just added this package to stage-packages.
Nope, you have to completely replace it with the version provided by the new part, as the staged Ubuntu libdrm package canāt fulfill the requirement.
The proper way should be using the applied/ubuntu/bionic branch(should be applied/ubuntu/bionic-updates instead, but it seems that the updates release pocket of the bionic suite isnāt available yet) of the libdrm package as the new partās source and build it with the custom configflags.
I can not understand why when I install this package on a virtualbox, then there are no such problems?
But amdgpu.ids is in the snap package and in the system (/usr/share/libdrm). This is strange.
I think that I know what the problem is, if I add after: [qt5], then this problem should be corrected.
Tell me please, for my configuration, where should I add after: [qt5] to get a package? This should be in parts?
Failed to get part information: Cannot find the definition for part 'qt5', required by part 'managetime'.
Remote parts are not supported with bases, so make sure that this part is defined in the `snapcraft.yaml`.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
An error occurred when trying to execute 'sudo -i snapcraft snap' with 'multipass': returned exit code 2.