Comment 1 for bug 1723945

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

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:
  foo:
    command: with_snap_arch_triplet <actual command>

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.