-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Build failure: nodejs cross compiling for raspberry pi armv6l #319036
Comments
I hacked around this problem: preBuild = lib.optionalString isCross ''
mkdir deps/v8/gnu
touch deps/v8/gnu/stubs-32.h
''; This actually seems to work! But now I run into a new Problem:
Has anyone an idea how to fix this? |
I think PR #220204 addresses this issue. |
FWIW, for some reason https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29 I don’t think Node.js supports (armv6, vfp) combination (see nodejs/node#44357). I’m not familiar with Raspberry Pi hardware, but if it supports nixpkgs/lib/systems/platforms.nix Line 205 in 43d306e
|
I experimented with this a bit yesterday and I think setting W.r.t. your comment #327778 (comment) (i.e. building Node.js for pkgsCross.raspberryPi with updated gcc arch/fpu), use #327653. The current Node.js derivation always cross-compiles, but that doesn’t work well for platforms with different bitness (e.g. AArch64 to AArch32). The PR in question makes it so that we don’t cross-compile and instead use an emulator when we need to run a few tools built for the host platform. |
>The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29 See also - https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications - NixOS#319036 (comment)
Sry - I'm not an expert ... so building directly for the RPi's architecture using qemu / binfmt should create a working binary, right? I'll give this a try but I'll take some hours (or maybe days?) ;-) |
It should take a few hours or so on a modern multi-core computer (though the PR is targeting staging and there is a bit of bottlenecking in the bootstrap process). E.g. something like let
system = builtins.currentSystem;
lib = import ./lib;
nixpkgsFun = import ./.;
pkgs = nixpkgsFun {
localSystem = { inherit system; };
crossSystem = lib.systems.examples.raspberryPi // {
gcc = {
arch = "armv6kz";
fpu = "vfpv2";
};
};
};
in
pkgs.nodejs_22 (at the root of Nixpkgs repository checkout with #327653 applied) |
Ah and it'll use qemu for compiling nodejs? Nice! Thank you a lot :) |
Yes, |
>The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29 See also - https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications - #319036 (comment)
>The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29 See also - https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications - NixOS/nixpkgs#319036 (comment)
I'd say this issue has been solved! Thank you all for your effort to fix the build issue :-) |
Steps To Reproduce
Steps to reproduce the behavior on current master:
Build log
Additional context
Notify maintainers
@cillianderoiste
@cko
@aduh95
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: