-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Can't build linux-headers on armv6l #107386
Comments
I guess that this patch should only be enabled on armv7l then. Truthfully that PR was just changes proposed/written by others and someone else is probably more qualified wrt binutils to say what the correct thing to do would be. |
I don't think it's an armv6l vs. armv7l thing: There's a possibility that the issue is that I'm trying to build on a Pi 4, which is actually a 64-bit machine, with a 64-bit kernel. To test this, I copied the linux-headers closure, and all of its deps, to a Pi 0 W (which is actually armv6l), and got the same bug. It is still possible that the issue arises due to the Pi 4 miscompiling one of the dependences. I'm doing a full build on the Pi 0 to rule this out, but of course that could take a while. |
Alright, |
Thanks for the testing @Gaelan. I'm not sure what's more important, cross compiling to arm32 or native compiling! Hopefully @Ericson2314 can shed some light here. |
What a mess! I guess the patch fixes some relocations breaks others. If we could make minimal programs for both that would be nice, but that's a lot of work. |
Ah I see @expipiplus1 already minimized in https://sourceware.org/bugzilla/show_bug.cgi?id=16177#c9, and we can cross-reference Jessica's patch on this issue too. So maybe once we minimize this issue we'll have enough combinations to try that it shouldn't be so bad. |
I have this problem on armv7l as well, on the novena board. 5.9.8 headers required for building nix fail. |
I'm running into the exact same issue using arm emulation via |
IIRC GHC was the only package affected by the bug in my NixOS closure when I had it running on an armv7 machine back in 2019 and it was also happening on native builds; had nothing to do with musl or cross. Couldn't we just make a special binutils with the patch for GHC and the (at worst) handful of other programs which need it? |
Hello everyone, Here what I've done: Using my Pi4 with 32bit kernel: However, compiling our friendly greeting:
Seems like this PR has not been all to fix the broken Happy to update the official Wiki as soon as I've things working ... also including the hydra tarball. |
@stefandeml try cherry-picking commit from #129004 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/new-aarch64-and-armv7l-linux-omg-builders/1010/8 |
Thanks 🎉. That definitely helped but failing at stage4 now:
Hmm, looks like the OS killed it? - maybe OOM? |
I had no issues building the entire system (with a few tweaks) on armv7l virtual machine with 4 cores and 4G of RAM. |
Yes, OOM often produces exactly this "killed" log line. |
Also make sure you have zram swap (perhaps even with zstd) if you're running into OOM issues. It's free additional RAM space. |
Hitting the exact same bug when cross-compiling to armv7l now, in packages that have PIC disabled (zfs) |
Describe the bug
stdenv.__bootPackages.linuxHeaders
(and, therefore, pretty much any package) fails to build on armv6l.To Reproduce
Steps to reproduce the behavior:
cd path/to/nixpkgs; nix-build . --arg system '"armv6l-linux"' -A stdenv.__bootPackages.linuxHeaders
Additional context
The segfault comes from fixdep, which is invoked by the Linux kernel build system.
Here's a minimal C program that segfaults, when compiled with the
cc
fromnix-shell . --arg system '"armv6l-linux"' -A stdenv.__bootPackages.linuxHeaders
:A git bisect reveals that the faulty commit is b3640e0 (#103183).
Notify maintainers
@Ericson2314, maintainer of binutils (since that's what seems to be the culprit here)
@expipiplus1, author of #103183
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."aarch64-linux"
Linux 4.19.118, NixOS, 21.03.20201220.9cb4d2f (Okapi)
yes
yes
nix-env (Nix) 2.4pre20201201_5a6ddb3
"nixos-20.09pre225673.8ba41a1e149"
"nixos-20.09pre224185.ed755a65570"
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
The text was updated successfully, but these errors were encountered: