Hello,
When building the snap on my Macbook M1 laptop for an arm64 architecture, the variable “$CRAFT_ARCH_TRIPLET_BUILD_FOR” value is “aarch64-linux-gnu”.
But when building it through the github action “https://github.com/snapcore/action-build/tree/v1/”, the variable value is “x86_64-linux-gnu”.
This leads to an inconsistency when setting up the env variable “LD_LIBRARY_PATH:” to point to the correct staged libraries… making ffmpeg arguing about missing libraries in my raspberry if installing the snap that was builded with the github action.
This is my snapcraft.yaml:
name: rackety-nuc-script
summary: firmware for rackety nucs
description: firmware that lets nucs connect to the rackety network and record videos
version: 1.0.0
base: core22
grade: stable
confinement: strict
architectures:
- build-on: [amd64, arm64]
build-for: [arm64]
- build-on: [amd64, arm64]
build-for: [amd64]
plugs:
ffmpeg-2204:
interface: content
target: ffmpeg-platform
default-provider: ffmpeg-2204
parts:
rackety-nuc-script:
plugin: python
source: .
stage-packages:
- libxcb-randr0-dev
- libxcb-xtest0-dev
- libxcb-xinerama0-dev
- libxcb-shape0-dev
- libxcb-xkb-dev
- libgl1-mesa-dev
- libxcb1
- libxcb-shm0
- libxcb-xfixes0
- libasound2
- libcaca0
- libv4l-0
- libva-dev
- libfontconfig1
- libvpx-dev
- libvpx7
- libwebpmux3
- librsvg2-2
- librsvg2-dev
- librsvg2-common
- libglu1-mesa
- libopenjp2-7
- freeglut3
- libspeex-dev
- libtheora0
- libtwolame-dev
- libpulse-dev
- libpulse0
- libraw1394-dev
- libxcursor-dev
- libxinerama-dev
- libxrandr-dev
- libxkbcommon-dev
- libarchive-dev
- libmpg123-0
- libsamplerate-dev
- libgomp1
apps:
rackety-nuc-script:
environment:
PATH: $SNAP/ffmpeg-platform/usr/bin:$PATH
LD_LIBRARY_PATH: $SNAP/ffmpeg-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$LD_LIBRARY_PATH:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio
command: bin/rackety-nuc-script
plugs:
- network
- network-observe
daemon: simple