-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
linuxHeaders: 4.19.16 -> 5.5 #78994
linuxHeaders: 4.19.16 -> 5.5 #78994
Conversation
# For some reason, doing `make install_headers` twice, first without | ||
# INSTALL_HDR_PATH=$out then with, is neccessary to get this to work | ||
# for darwin cross. @Ericson2314 has no idea why. | ||
+ '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double make headers_install
is not needed any more.
+ '' | ||
find "$out" -name '..install.cmd' -print0 | xargs -0 rm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new make headers_install
copies only .h
files.
@@ -1,32 +1,12 @@ | |||
diff --git a/Makefile b/Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch may not be necessary any more, but I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked that deleting this patch has no effect on the result of pkgsCross.gnu64.linuxHeaders
, so I've deleted it.
@@ -239,7 +239,7 @@ ifdef CONFIG_RETPOLINE | ||
endif | ||
|
||
@@ -231,3 +231,3 @@ endif | ||
archscripts: scripts_basic | ||
- $(Q)$(MAKE) $(build)=arch/x86/tools relocs | ||
+ $(Q)$(MAKE) $(build)=arch/x86/tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still needed, otherwise compilation fails without elf.h
.
@@ -16,7 +16,7 @@ let | |||
# We do this so we have a build->build, not build->host, C compiler. | |||
depsBuildBuild = [ buildPackages.stdenv.cc ]; | |||
# `elf-header` is null when libc provides `elf.h`. | |||
nativeBuildInputs = [ perl elf-header ]; | |||
nativeBuildInputs = [ perl rsync elf-header ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new make headers_install
installs the headers using rsync (to copy only .h
files).
Linux has reworked its header install process in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=59b2bd05f5f4dc62979c2e82ddd384f07e8f10bc It has introduced `make headers` that prepares the headers in ./usr/include, and made `make headers_install` copy the headers from there using rsync.
I have checked that there is no difference between 5.5 and 5.5.2 (except in the value of |
This seems to break the bootstrap for aarch64:
|
I can not reproduce this with |
I think the problem is that rsync is now being required by an earlier stage during stdenv bootstrap. Starting from stage3 onwards there's a hook that updates outdated diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index 60c0730dce1..cf8705bd891 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -255,6 +255,10 @@ in
libc = getLibc self;
};
};
+ extraNativeBuildInputs = [ prevStage.patchelf ] ++
+ # Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
+ lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
+ prevStage.updateAutotoolsGnuConfigScriptsHook;
}) (diff generated after cherry-picking onto master @ 6932a75) |
That looks like a useful change, but since it is trivial to avoid rsync and this reduces the amount of packages needed to reach stage3, I have done just that. (I have checked that the result does not change.) |
This update caused a few failures (not in master yet; based on this eval diff, checkboxes for fixes):
(discovered later)
|
Ok, this has reached master yesterday (2020-02-19 08:18 UTC). |
I thought that this is a good candidate for 20.03 since it defaults to Linux 5.4 and the update will allow applications to use newer kernel features; but its backport depends on backporting fixes for the packages that are broken by the update. |
Thanks @orivej for checking all the thorny cross cases! |
(cherry picked from commit f04825c)
(cherry picked from commit 627a9ff)
Why 5.5, and not 5.4 (LTS)? |
Linux has reworked its header install process in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=59b2bd05f5f4dc62979c2e82ddd384f07e8f10bc
It has introduced
make headers
that prepares the headers in ./usr/include, andmade
make headers_install
copy the headers from there using rsync.Motivation for this change
This is needed to use
bpf/xsk.h
from libbpf 0.6: libbpf/libbpf#74 (comment) (unless we install replacement linux headers with libbpf).This obsoletes #77103 that expressed the need for newer linux headers.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
dpdk
with libbpf 0.6 on Linux: it failed before due to old headerspkgsCross.gnu64.linuxHeaders
on macOS: the result looks ok./result/bin/
)nix path-info -S
before and after)