-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cannot build on x64 host #3
Comments
I bet we can get this sorted out. My primary build machine is Arch, and it's building in CI on Ubuntu. I'll double check tomorrow to make sure it's still working. Nix is pretty great at cross compilation, but my understanding is that some derivations can be pulled from the binary cache that won't compile locally. Not sure if that's why mine works; I tried a number of configurations to see if anything would be faster or slower, but it always seemed to be able to build. Are you sure that your nix.conf is being used? I forget the flag, |
Thanks for the quick reply! I'm fairly certain that my
Besides I've gone through the whole "restart the nix daemon service and reboot the machine" cycle more than once.
It does indeed, but I'm at a loss as to why. |
I have to set I installed debian bookworm amd64 in an LXC container, and after installing Arch:
Debian LXC: n8henrie@debian:~/git/nixos-btrfs-pi$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.2.7-arch1-1, Debian GNU/Linux, noversion, nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.3`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
n8henrie@debian:~/git/nixos-btrfs-pi$ nix build
n8henrie@debian:~/git/nixos-btrfs-pi$ echo $?
0
n8henrie@debian:~/git/nixos-btrfs-pi$ ls result/btrfspi.iso.zst
result/btrfspi.iso.zst I assume you're using the multi-user nix install? |
Ok so first, thanks a lot for all the help! I've explored lots of things that I probably would not have otherwise. Second, I can finally build an image, but I don't really know how I got here. I'll list some things that I tried in the hope that it might help someone. I'll eventually try to narrow that to the required subset, but in the meantime, that might provide some inspiration/paths to explore:
tl;dr:
|
Just as I wrote this, I figured something out: |
Sweet, glad you got it working. No idea why having it in the user vs the system config matters, seems to go against the whole point of nix. Then again, there's plenty I don't yet get in this space 😆 |
Hi,
I've been unsuccessfully trying to build a rpi image from an x64 host for a while using flakes and stumbled upon this repo, which I figured I could use as a starting point.
Unfortunately,
nix build
fails with a disappointingerror: a 'aarch64-linux' with features {} is required to build '/nix/store/p2a6vj6pqk9q6jl2qn8y85l0wfqfmpi7-config.txt.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
. The error makes sense given that this derivation is u-boot related.Clearly nix is not setup for cross compilation, but I'm not sure which bit might be missing.
I have a setup similar to the one outlined in your readme:
nix.conf
with flakes enabled andaarch64-linux
as an extra platform and the other options for good measureupdate-binfmts --display
), installed from the Debian reposflake.lock
with no alterationsI'm not expecting support, but I'd be grateful if you could let me know in case the above error message sounds familiar to you, and if so, how you might have handled it in the past.
Also, it'd be extra nice if you could confirm that you can still build this repo using a recent nix version.
Thanks a lot!
The text was updated successfully, but these errors were encountered: