Hello,
I’ve a snap for arm and building it with snapcraft (classic ubuntu) on a rpi (arm) is working absolutely fine. Though building is taking a while on rpi and I’d also like to automate my build. That’s the reason why I’d like to build my arm snap on amd64.
I’ve studied the different post in the forum and the documentation. It sounds easy by just defining the architecture and running snapcraft. Though when I do this, I get a snap which is marked as arm (…_armhf.snap) but it is not running and contains x86_64 packages. Also during the build process I just see deb package updates againsta amd64 and not arm.
I am not really sure what the right approach is over here. Did I miss something? Do I need to mark all my stage-packages, like described in here: Stage-Packages with --target-arch? Shouldn’t snapcraft pick this up automatically.
Here is a bit of my snapcraft.yaml:
...
base: core
architectures:
- build-on: amd64
run-on: armhf
grade: stable
confinement: strict
...
parts:
some-part:
plugin: python
python-version: python3
source: .
stage-packages:
- libdbus-1-dev
- libglib2.0-dev
- libc6
build-packages:
- gcc
- gfortran
- python-dev
- libblas3
- liblapack3
- libopenblas-dev
- liblapack-dev
- cython
...
another-part:
source: ./bla
plugin: autotools
override-build: |
snapcraftctl build
sudo ldconfig
configflags:
- --disable-root-check
build-packages:
- autoconf
- automake
- libtool
- libcppunit-dev
- libcppunit-1.13-0v5
- uuid-dev
- pkg-config
I have run snapcraft (3.3) on Ubuntu 18.04 and I want to build for arm Ubuntu Core 16 (for rpi).
Would be great if you could advice me on what’s the best approach here.
Thanks a lot and best regards,
Florian