balena-os / balena-supervisor

Balena Supervisor: balena's agent on devices.
https://balena.io
Other
149 stars 63 forks source link

Currently v16 can not be built in an emulated environment #2356

Open splitice opened 3 months ago

splitice commented 3 months ago

This is due to https://gitlab.com/qemu-project/qemu/-/issues/1729

If you try and build for armv7 on x64 you will encounter this. v14 will build fine.

Also note: https://github.com/npm/cli/issues/5743

pipex commented 3 weeks ago

Hey @splitice, sorry for the delayed response and thanks for reporting this. We have recently realized of this problem when trying to build a new version of https://github.com/balena-io-modules/node-systemd/pull/11.

While this issue does not affect the publishing of new supervisor releases in the short term, as these are not built using emulation, it will affect us in the future. Since it doesn't seem that qemu will fix the issue soon enough, it is likely that we'll move the supervisor docker image from alpine (musl) to debian (libc) sometime in the next few months to deal with this.

splitice commented 1 day ago

@pipex It may be worth testing a new version of QEMU, supposedly the issue is fixed.

https://gitlab.com/qemu-project/qemu/-/issues/1729

I would be happy to do so if you could push a qemu build at https://github.com/balena-io/qemu/ compatible with balena-cli

pipex commented 1 day ago

I'll discuss internally about updating the qemu fork, but it will probably take some time.

If you want to test emulated builds, you can do it directly with Docker with docker build --platform <target> -f Dockerfile.template -t balena-supervisor .

This assumes that docker has updated their version of qemu too. I'll investigate that later

pipex commented 1 day ago

It seems docker has yet to update qemu https://docs.docker.com/desktop/release-notes/