Thanks! This did the job.
It’s already pretty clear now. Still some questions for the learning effect:
Snapcraft will search for the libraries given in the snapcraft.yaml or the libraries used in my code? So why couldn’t it find the libpsm then, but it could find lapack. Both of them are not at the “default” location.
So this means the warning is not even so important if I know that I have set the correct LD_LIBRARY_PATH for runtime?
I don’t have the feeling for this structure yet. Are the directories just copied from one to another and they keep the paths? How can you otherwise know where to link to in $SNAP if you can’t look it up in the VM?
Makes me wonder why the layout-approach didn’t work. Is it only for runtime?