-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Virtualbox and Linux Kernel can't compile with ccache #73029
Comments
Add
Any clues? I'm digging it but I don't know where to check now. |
The problem is that, virtualbox use nixpkgs.overlays = [
(self: super: {
virtualbox = super.virtualbox.override {
stdenv = with self; overrideCC stdenv_32bit (ccacheWrapper.override { cc = stdenv_32bit.cc; });
};
})
]; But I think this is too hacky because I need to manually inspect the actual # target configuration
(mkIf (cfg.packageNames != []) {
nixpkgs.overlays = [
(self: super: genAttrs cfg.packageNames (pn: super.${pn}.override {
stdenv = builtins.trace "with ccache: ${pn}" (self.overrideCC super.${pn}.stdenv self.ccacheWrapper.overrde { cc = super.${pn}.stdenv.cc; } );
}))
...
];
}) but this will not work because |
Thank you for your contributions.
|
Still important to me. |
I marked this as stale due to inactivity. → More info |
I've managed to run into this same issue with cross compiling for armv6l and armv7l but with nodejs. The missing header error is from v8 being used in nodejs. |
It looks like #220204 is the PR that would (partially) fix this issue. With the help of nodejs/node#44357 (comment), I was able to crosscompile let
inherit (pkgs) buildPackages;
in rec {
nixpkgs.overlays = [
(final: prev: {
# https://discourse.nixos.org/t/nixos-on-raspberry-pi-zero-w/38018
llvmPackages = prev.llvmPackages_14;
cmake = prev.cmake.overrideAttrs (old: {
env.NIX_CFLAGS_COMPILE = "-latomic";
});
# https://github.com/NixOS/nixpkgs/pull/220204
nodejs_18 = buildPackages.pkgsi686Linux.callPackage "${toString pkgs.path}/pkgs/development/web/nodejs/v18.nix" {};
})
(final: prev: {
# https://github.com/nodejs/node/issues/44357#issuecomment-1230010957
nodejs_18 = prev.nodejs_18.overrideAttrs (old: {
env.NIX_CFLAGS_COMPILE = "-march=armv6k -mfpu=vfpv2";
env.NIX_CXXFLAGS_COMPILE = "-march=armv6k -mfpu=vfpv2";
});
})
]; This here might also work, although I haven't tested that: #163376 (comment) |
Describe the bug
Can't compile virtualbox and linux kernel with ccache enabled.
Compiling linux failed with
Compiling virtualbox failed with
To Reproduce
Steps to reproduce the behavior:
nixos-rebuild boot/build/switch
Metadata
"x86_64-linux"
Linux 5.3.8, NixOS, 20.03pre200231.7827d3f4497 (Markhor)
yes
yes
nix-env (Nix) 2.3.1
"home-manager, nixpkgs-20.03pre200231.7827d3f4497, rolling-20.03pre200508.c4821a82f88"
/home/mlatus/.nix-defexpr/channels/nixpkgs
The text was updated successfully, but these errors were encountered: