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
perf: apply patch to fix 4.9 build when inheriting kernel make flags #34068
Conversation
Makes sense. I can mail the stable maintainer. |
The patch has been applied to the 4.9.y queue. |
@GrahamcOfBorg build linuxPackages_4_9.perf |
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.
Failure for system: x86_64-darwin
while evaluating 'makeOverridable' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:72:24, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:117:8:
while evaluating anonymous function at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/perf.nix:1:1, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:74:12:
while evaluating 'versionAtLeast' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/strings.nix:371:24, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/perf.nix:9:8:
while evaluating 'versionOlder' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/strings.nix:359:22, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/strings.nix:371:29:
while evaluating the attribute 'linux_4_9' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/top-level/all-packages.nix:12853:3:
while evaluating 'callPackageWith' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:113:35, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/top-level/all-packages.nix:12853:15:
while evaluating 'makeOverridable' at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:72:24, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:117:8:
while evaluating anonymous function at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/linux-4.9.nix:1:1, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/lib/customisation.nix:74:12:
while evaluating anonymous function at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/generic.nix:1:1, called from /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/linux-4.9.nix:3:1:
assertion failed at /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/os-specific/linux/kernel/generic.nix:33:1
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.
Success for system: x86_64-linux
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/bin/syscall-counts-by-pid-record: interpreter directive changed from "/bin/bash" to "/nix/store/i0ay05pqkbnvpfijm52mmlrp6kmkl80c-bash-4.4-p12/bin/bash"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/bin/syscall-counts-by-pid-report: interpreter directive changed from "/bin/bash" to "/nix/store/i0ay05pqkbnvpfijm52mmlrp6kmkl80c-bash-4.4-p12/bin/bash"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/bin/syscall-counts-record: interpreter directive changed from "/bin/bash" to "/nix/store/i0ay05pqkbnvpfijm52mmlrp6kmkl80c-bash-4.4-p12/bin/bash"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/bin/syscall-counts-report: interpreter directive changed from "/bin/bash" to "/nix/store/i0ay05pqkbnvpfijm52mmlrp6kmkl80c-bash-4.4-p12/bin/bash"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/call-graph-from-postgresql.py: interpreter directive changed from "/usr/bin/python2" to "/nix/store/87l8l9w3x8saxqz9sfcfw2i3jiilmxfi-python-2.7.14/bin/python2"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/sched-migration.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/87l8l9w3x8saxqz9sfcfw2i3jiilmxfi-python-2.7.14/bin/python"
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/libexec/perf-core/scripts/python/stat-cpi.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/87l8l9w3x8saxqz9sfcfw2i3jiilmxfi-python-2.7.14/bin/python"
checking for references to /tmp/nix-build-perf-linux-4.9.77.drv-0 in /nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77...
moving /nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/lib64/* to /nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77/lib
/nix/store/a2cxjs1lklbpd87vh2a9mnc5kkkgzspm-perf-linux-4.9.77
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.
Success for system: aarch64-linux
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/scripts/perl/bin/check-perf-trace-record: interpreter directive changed from "/bin/bash" to "/nix/store/rc78viijga8i0m4imrnqk8d1csyqr8yx-bash-4.4-p12/bin/bash"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/scripts/perl/wakeup-latency.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/vdz41jczh8p1gbb051drb9fwi6ym3gm4-perl-5.24.3/bin/perl -w"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/scripts/perl/rwtop.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/vdz41jczh8p1gbb051drb9fwi6ym3gm4-perl-5.24.3/bin/perl -w"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/scripts/perl/rw-by-pid.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/vdz41jczh8p1gbb051drb9fwi6ym3gm4-perl-5.24.3/bin/perl -w"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/scripts/perl/rw-by-file.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/vdz41jczh8p1gbb051drb9fwi6ym3gm4-perl-5.24.3/bin/perl -w"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/perf-with-kcore: interpreter directive changed from "/bin/bash" to "/nix/store/rc78viijga8i0m4imrnqk8d1csyqr8yx-bash-4.4-p12/bin/bash"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/perf-archive: interpreter directive changed from "/bin/bash" to "/nix/store/rc78viijga8i0m4imrnqk8d1csyqr8yx-bash-4.4-p12/bin/bash"
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77/libexec/perf-core/tests/attr.py: interpreter directive changed from " /usr/bin/python" to "/nix/store/dynp7j2rilfs54bq22i7ihv2647vrcrk-python-2.7.14/bin/python"
checking for references to /build in /nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77...
/nix/store/b142kba37smljipy21jjs1ln09lgipqs-perf-linux-4.9.77
Motivation for this change
This PR adds a patch for the 4.9 kernel which fixes the perf build when the
ARCH=x86_64
flag is passed to make. This bug was introduced in 4.8 and fixed in 4.12. I backported the fix to 4.9 and conditionally applied it to 4.9 only.This issue was triggered by my patch which inherited
makeFlags
from the kernel derivation (which includesARCH
). The reason I wanted to do this was because it reduces unnecessary code duplication and should help with cross compilation (although this cannot be tested yet because some dependencies fail).IMO, applying this patch is the best way of fixing this bug, because it actually fixes the problem rather than working around it. Alternatively, we could exclude the
ARCH
flag frommakeFlags
for 4.9, or we could just forget about this issue until cross compilation actually becomes possible.This patch could possibly be accepted to the 4.9 upstream stable branch, if someone were willing to submit it to the mailing list.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)