Directly accessing a file from the core(read: base) snap?

Is it possible to directly access a file inside the core snap ? In my case I need to create a symlink of /snap/core/current/usr/lib/x86_64-linux-gnu/ inside my snap’s $SNAP_USER_COMMON and export that directory to LD_LIBRARY_PATH.

Currently I achieve a similar result by “staging” (as part of stage-packages) libffi-dev.

Perhaps I’m missing something, but why do you need to symlink? Isn’t the core snap usr/lib/(triplet) in the LD_LIBRARY_PATH already? Thus shouldn’t the library be found by whatever application is attempting to load it?

If core is your base, then that file will simply be /usr/lib/x86_64-linux-gnu/, and you should indeed be able to just use it.

Its complex, pypy3 binaries that the upstream provides are compiled on Raspbian, which has, so those binaries expect in library path but Ubuntu 16.04 has, so to work that around I create a symlink and add that location to LD_LIBRARY_PATH.

Sorry, you are right, it seems the problem was on my end, I was creating a symlink to /usr/lib/x86_64-linux-gnu/ which doesn’t exits on armhf.

1 Like