I get the same error if I include lib/x86_64-linux-gnu in stage-packages: and bind to that.
Question
How do I prevent that error ?
I could perhaps include lib/x86_64-linux-gnu in stage-packages:, bind to that and delete lib/x86_64-linux-gnu/webkit2gtk-4.0 but then lib/x86_64-linux-gnu would be included twice in two different locations.
the extension will set up that layout and a matching LD_LIBRARY_PATH entry on its own through the automatically added desktop-launch command-chain script, you should not need to apply any layout for gnome-platform dirs …
Problem is that a lot of the .dll have dllmaps in .dll.config files that references either /usr/lib/... or just a target, and then when I run the snapd app I get errors like:
Mono: DllImport error loading library ‘/snap/timedatecalculator/x1/usr/lib/libgobject-2.0.so.0.so’: ‘/snap/timedatecalculator/x1/usr/lib/libgobject-2.0.so.0.so: cannot open shared object file: No such file or directory’.