Invalid architecture specified in the manifest: ppc64


#1

I’m trying to build a snap for chezmoi which uses goreleaser’s support for Snapcraft to build snaps for multiple architectures and publish them.

When attempting to publish the snaps I get the error:

Snapcraft Packages: failed to publish artifacts: failed to push dist/chezmoi_1.4.2_linux_ppc64.snap package: Preparing to push 'chezmoi_1.4.2_linux_ppc64.snap'.
After pushing, an attempt will be made to release to 'stable'
Pushing 'chezmoi_1.4.2_linux_ppc64.snap' [===============================] 100%
Processing...|                                                                 
Error while processing...
The store was unable to accept this snap.
  - architectures: Invalid architecture specified in the manifest: ppc64.

Should I use a different architecture to ppc64? Searching this forum indicates that ppc64 that other snaps are using ppc64, for example the blog post on Kata Containers explicitly mentions ppc64.

I searched the source code for github.com/snapcore/snapcraft and github.com/snapcore/snapd but couldn’t find the error string Invalid architecture specified so I’m not sure where the error is coming from.

Any help appreciated. Useful links:
Goreleaser’s Snapcraft Support
The snapcraft section of chezmoi's .goreleaser.yaml

Note that I tried to include more links to useful information in this message but “new users are only allowed to post two links per message” :cry:.


#2

I’m pretty sure the recognized name for powerpc 64-bit little endian in snaps is ppc64le but note that go refers to it as ppc64el. I’m not sure that there’s support for big endian (i.e. ppc64) in the snap ecosystem.


#3

Thanks very much for the response :slight_smile:.

I tried disabling the ppc64 build and using replacements in Goreleaser’s Snapcraft support to change architecture names. Specifically, I tried:

replacements:
  ppc64el: ppc64le

and

replacements:
  ppc64le: ppc64el

In both cases I got the Invalid architecture specified error.

I then disabled both the ppc64 and ppc64le architectures in the build and got a further Invalid architecture specified error with arm this time.

Finally, I disabled all three architectures (ppc64, ppc64le, and arm) and was able to successfully upload all other snaps, although not publish them because I’m waiting for classic confinement to be approved.

It looks like Goreleaser’s Snapcraft support needs a couple of extra options. I’ll follow up with the Goreleaser folk.


#4

Additionally, the correct specifier for snapcraft.yaml ARM support (32-bit at least) is armhf, and if you want 64-bit ARMv8 you need to specify arm64.


#5

Thanks again @ijohnson. Once Request classic confinement for chezmoi is approved I’ll run a separate Goreleaser invocation to build snaps, which should work around the issues raised in this topic. Thank you!