Snapd defines SNAP_ARCH with deb architectures instead of triplets. Without it defining triplets for you, you cannot use LD_LIBRARY_PATH the way you're doing it now, since the snapcraft-defined stuff is evaluated too late. You can use a remote part as well as a wrapper to get close.
Build the part in question `after: [snap-arch-triplet-generator]`. Then if you make your app look something like this:
Your command will get $SNAP_ARCH_TRIPLET defined. Note that this will not apply to the `environment` keyword as that's consumed by snapd, but if you create a wrapper for your <actual command> you can set the LD_LIBRARY_PATH there.
That's the best we can do from Snapcraft. I'm going to move this issue over to snapd to see what they think.
Snapd defines SNAP_ARCH with deb architectures instead of triplets. Without it defining triplets for you, you cannot use LD_LIBRARY_PATH the way you're doing it now, since the snapcraft-defined stuff is evaluated too late. You can use a remote part as well as a wrapper to get close.
Build the part in question `after: [snap-arch- triplet- generator] `. Then if you make your app look something like this:
app: arch_triplet <actual command>
foo:
command: with_snap_
Your command will get $SNAP_ARCH_TRIPLET defined. Note that this will not apply to the `environment` keyword as that's consumed by snapd, but if you create a wrapper for your <actual command> you can set the LD_LIBRARY_PATH there.
That's the best we can do from Snapcraft. I'm going to move this issue over to snapd to see what they think.