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.
/cc @sergiusens , @zyga-snapd