Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
splitice opened this issue Jul 18, 2024 · 7 comments
Open

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

splitice opened this issue Jul 18, 2024 · 7 comments

Comments

@splitice
Copy link
Contributor

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: npm/cli#5743

@pipex
Copy link
Contributor

pipex commented Oct 23, 2024

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 balena-io-modules/node-systemd#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
Copy link
Contributor Author

@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
Copy link
Contributor

pipex commented Nov 13, 2024

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
Copy link
Contributor

pipex commented Nov 13, 2024

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

@splitice
Copy link
Contributor Author

Can confirm that you can sucessfully build and run node applications with the latest qemu (9.1.1) emulating armv7 on x64. Have not completely verified balena-supervisor or anything, but tests pass.

@pipex
Copy link
Contributor

pipex commented Nov 22, 2024

Thanks for testing @splitice, could you share the steps you used for testing? Did you run a VM or did you do it via docker for linux?

pipex added a commit to product-os/flowzone that referenced this issue Nov 22, 2024
We need the new version to get the fix for https://gitlab.com/qemu-project/qemu/-/issues/1729
which is blocking balena-io-modules/node-systemd#11

Change-type: patch
Relates-to: balena-os/balena-supervisor#2356
@splitice
Copy link
Contributor Author

We have our own hardware thats running balena-os, and a fork of balena-supervisor to match. Its validated on that.

It also passes npm test on the build servers system and the docker target (target OS emulated with QEMU).

We havent completed our testing, only did basic testing on this version of balena supervisor as we intend to merge to latest release as part of this work (now unblocked due to QEMU fixes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants