Cant make my snap Celluloid read /usr/libs

I Have recently snapped celluloid from source, and successfully staged all needed libraries including libblas, but when running and executing the snap, it never works and gives out the following error, tried snappy-debug but it doesnt give out anything --:

/snap/celluloid-snap/22/usr/local/bin/celluloid: error while loading shared libraries: libblas.so.3: cannot open shared object file: No such file or directory

I have staged the needed library and even tried using layouts but no success, i need some help regarding this issue. Here is the YAML :

Take a look at the prime directory in a local build, IIRC libblas lives in a subdirectory under usr/lib/… make sure to add that dir to your LD_LIBRARY_PATH…

will this be enough, under environment :

LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/blas

Whatever the exact dir name is you find in your local build, please check it there… I’m pretty sure it is not “blas” though …

its blas itself and it stopped producing that error after adding that but now it started for liblapack …

I’m still pretty sure it is not, but of a find prime/ -name '*libblas*' returned that dir in the local build env I can indeed not argue against this… I know for sure the dir was not named after the binary but after the blas source project name in the past…

yeah but it fixed for that issue, as i keep on fixing them, it always puts out some new one, i checked the json of the flatpak version, it was built and compiled with very few dependencies that are mentioned in the project’s github page, but i think snaps build structure is different and as such it needs more libs etc.

You can not compare the two, they are functionally completely different, the flatpak json might give you some hints, but that’s about it.

The only clean way to develop a snap is to simply iterate over local builds, use the hints the linter gives you for library dependencies and use the above find command for any of them that are not in the standard library path… this should be a 10min job in your local tree before your first upload…

Also note that a leading “$LD_LIBRARY_PATH:” will break things, you should remove this…

I can understand, removed that leading path…