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

armv7 Hydra channel? #222

Open
doronbehar opened this issue Oct 9, 2022 · 5 comments
Open

armv7 Hydra channel? #222

doronbehar opened this issue Oct 9, 2022 · 5 comments

Comments

@doronbehar
Copy link

Is your feature request related to a problem? Please describe.

At my work we often use Armv7 devices like Raspberry Pi. Often my colleagues complain about issues with outdated packages in the default Debian systems these devices use by default and the lack of declarative management of their deployments. Naturally Nix is the answer. However, these devices usually have low memory & CPU power, making it hard to build full systems on them.

Describe the solution you'd like

Taking #142 as an example, is it that simple and legitimate to add a channel for an architecture? Having an armv7 channel building and caching armv7 builds would enable me to dramatically change the experience with such devices.

Describe alternatives you've considered

nixbuild seems like an awesome service that could benefit teams such as those I occupy. However, I still think that a tier 1 support for armv7 could motivate many big software companies to use Nix, see e.g this. Also, nixbuild's pricing is the fairest I could have imagined, but as a junior in a non Nix team, it's hard to convince people to use such a service which even myself is not experienced with.

Additional context

NixOS/nixpkgs#83049

@samueldr
Copy link
Member

samueldr commented Oct 9, 2022

The main problem is having build machine to build for armv7l.

Most AArch64 providers only have machines supporting 64 bit systems.

Furthermore, the builds have to happen on an armv7l kernel, not AArch64 since the personality subsystems in Linux are not as robust for ARM, and ambiant impurities leaks into the build. So for the few systems allowing 32 bit execution, we need to "burn" the virtualisation capabilities by making armv7l VMs on the AArch64 host.

There has been some exploratory work for this earlier, I don't know if there was anything conclusions coming from that or if it was simply not completed due to lack of people-power to work on that.

@doronbehar
Copy link
Author

The main problem is having build machine to build for armv7l.

So is this a problem of merely finding a provider for armv7l? Perhaps the provider of nixbuild.net would fit for nixos.org?

@samueldr
Copy link
Member

samueldr commented Oct 9, 2022

Mainly yes. It depends how nixbuild.net does it. If they simply flipped the option to run 32 bit on aarch64 systems there's always some possibility of getting ambiant impurities in. (Though less so than doing the same with armv6l in mind.)

That is for the technical aspect.

Though there might be other roadblocks that are more organizational and social to get it going, but nothing major I hope. One of these is supporting the architecture. Though tbf it can't happen without first getting good regular build coverage.

@misuzu
Copy link

misuzu commented Oct 24, 2022

nixbuild.net uses aarch64 kernel with personality patch: https://discourse.nixos.org/t/support-for-aarch64-linux-armv7l-linux-and-i686-linux-is-now-generally-available-on-nixbuild-net/21331/3
I'm also using this approach and regularly fix issues. There's issues with ambiant impurities (for example, patchelf crashes with SIGBUS error when building go-bootstrap which is not reproducible when building on armv7l-only machine), but these should be easy to spot and fix once armv7l-linux is added to the hydra. It's a lot less work than cross-compiling IMO.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/extend-cross-compilation-support-in-hydra/26783/1

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

No branches or pull requests

4 participants