I’m having trouble getting Apache NetBeans to build on Launchpad using the new core24
platforms keyword. It worked for years using core18
with the following:
architectures:
- build-on: amd64
run-on: [amd64, arm64, armhf, i386]
I’d like to build it just once with core24
as I did with core18
, but it seems that’s no longer possible. Below are each of my attempts to get it working.
Attempt 1
After discovering that there is in fact support for build-for: [all]
in snapcraft
and on Launchpad for core24
, I tried the following:
platforms:
all:
build-on: [amd64]
build-for: [all]
The build was successful, but the snap was rejected before being uploaded to the store:
Rejected. Automated review found 1 errors and 0 warnings.
found binaries for architecture ‘all’: netbeans/ide/bin/nativeexecution/Linux-aarch64/killall netbeans/ide/bin/nativeexecution/Linux-aarch64/process_start netbeans/ide/bin/nativeexecution/Linux-aarch64/pty … netbeans/profiler/lib/deployed/jdk16/solaris-sparcv9/libprofilerinterface.so
Apache NetBeans includes pre-compiled native tools and libraries for a dozen or more platforms and architectures that it uses locally and in remote debugging and profiling. Yet NetBeans and its snap are architecture independent and run on any system with a Java Development Kit.
Attempt 2
If I can’t build it just once, I would prefer to build it for all three platforms on amd64
, which is the fastest of the three architectures. So I tried the following:
platforms:
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [amd64]
build-for: [arm64]
armhf:
build-on: [amd64]
build-for: [armhf]
This build failed with the message:
Multiple builds match the current platform: ‘amd64’, ‘arm64’, and ‘armhf’. Recommended resolution: Check the “–platform” and “–build-for” parameters.
Attempt 3
This time I tried building for each architecture on the same architecture:
platforms:
amd64:
arm64:
armhf:
But when I try to build this snap for just amd64
, for example, it failed immediately with a Launchpad internal error:
Launchpad encountered an internal error during the following operation: requesting builds of strictly-netbeans. It was logged with id OOPS-3493581347cf2eea5f78cbe46e4ef456. Sorry for the inconvenience.
and the snap page on Launchpad shows:
Failed build request - a moment ago (‘arm64’ is not a supported platform for ‘core24’.)
This is a known Launchpad issue reported twice:
- Snap builds: (‘<arch>’ is not a supported platform for ‘core24’.) if ‘platforms:’ a superset
- Launchpad internal error when parsing platforms in snapcraft.yaml
Attempt 4
So this time I made everything explicit with the following:
platforms:
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [arm64]
build-for: [arm64]
armhf:
build-on: [armhf]
build-for: [armhf]
and I think it worked (at least for amd64
, while the other two show “Automated review not yet completed”). The build times are:
amd64
- 18m 20sarm64
- 34m 20sarmhf
- 32m 39s
So now I’m building three times and on two relatively slow architectures, all to produce equivalent snap packages that can work anywhere.
Is there some alternative I’m missing?