Unable to load library mounted using "bind-file" in "layout"

Hello there,

i am getting issue while loading second library in my SNAP

My snapcraft.yaml file looks like below:


name: .xx

confinement: strict
base: core20


apps:
app1:
daemon: oneshot
command: bin/bin1

app2:
command: bin/bin2

layout:
/usr/lib/x1.so:
bind-file: $SNAP/usr/lib/x1.so
/usr/lib/x2.so:
bind-file: $SNAP/usr/lib/x2.so


Issue is that i am unable to load library “x2.so” in my code using dlopen ("/usr/lib/x2.so , “)
I am able to successfully load library “x1.so” in my code using dlopen (”/usr/lib/x2.so , ")
I am not sure what i am missing in this . Any information regarding this will be helpful.

Note - If i use confinement as “classic” then i can successfully load library “x2.so” using dlopen("/snap/xx/current/usr/lib/x2.so", ) .

Thank you in advance

This issue is fixed by adding below dependency in stage package : libmbim-glib-dev .
Sorry for inconvenience . No other task needed for this issue .
Thank you !!