In previous posts (e.g. Snap crashes when using intel graphics), it has been noted that using no-patchelf
may fix a problem seen by classic snaps where they may crash on startup. In some of the discussions in those posts, there are vague comments like “there are some caveats” (e.g. Problems after switching to classic confinement), but I haven’t found a clear description of the consequences of using no-patchelf
. For the specific case that affects the cmake snap, no-patchelf
appears to help by preventing the build-id from being stripped out of the libgl1-mesa-dri
library. Before I commit to using no-patchelf
though, I would like to understand what else I’m disabling by adding that build attribute and whether it will negatively impact the cmake snap.
-
@sergiusens You seem best placed to provide this info, can you clarify what
no-patchelf
will do? - @popey You’ve made comments about the caveats too, please feel free to chime in with details.
- @cjp256 Pinging you since you found the workaround discussed here.
Note that for snaps using the snapcraft-desktop-helpers, it is not so straightforward to limit the no-patchelf
attribute to specific libraries, so it may get applied more broadly to other libraries that might not otherwise need it. See my naive, simple way that appears to fix the problem for the cmake snap, but it will affect many libraries, not just the problematic libgl1-mesa-dri
library.