As you can see, it has $SNAP/home/ubuntu and even goes so far as having aarch64-linux-gnu in the paths.
This is making it hard to build for different architectures, as I need a snap per architecture, and for the home paths, it means that I got to make sure that every computer it’s built on has it. I am assuming the build service wont work either.
Any help to make these paths functional, but build computer agnostic would be fantastic!
Thats for the SNAPCRAFT_ARCH_TRIPLET, I will give that a whirl.
I’m confused as to the $SNAP/home as well, expecially since my resulting file will work once installed on a another system that doesn’t have those files in my home directory.
But if I remove that path, my commands dont find the libraries needed.
Meaning that it can’t find the elements it needs to run the camera.
The crucial bit is in GST_PLUGIN_PATH.
Without $SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0 it wont run, with it the camera starts up and works as it should.
This looks like it’s saving files into the snap using the path that they’re installed into during the build step. Specifically this means /home/ubuntu/mysnaps/snaps/parts/tis/install/usr. Try using override-build to move the files to the correct location:
parts:
tis:
...
override-build: |
snapcraftctl build
# the $SNAPCRAFT_PART_INSTALL is duplicated in the gstreamer-1.0 path,
# so move the files back to the correct location
mv $SNAPCRAFT_PART_INSTALL/$SNAPCRAFT_PART_INSTALL/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gstreamer-1.0/* $SNAPCRAFT_PART_INSTALL/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gstreamer-1.0/
# remove the remaining duplicated paths
rm -rf $SNAPCRAFT_PART_INSTALL/home