Skip to content
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

linuxPackages.perf: use prefix instead of DESTDIR #38682

Merged
merged 1 commit into from Apr 10, 2018
Merged

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Apr 10, 2018

Otherwise the build system computes incorrect references and looks for
perf-core in /libexec. DESTDIR for normal buildsystems is never the
right choice for nixpkgs.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Otherwise the build system computes incorrect references and looks for
perf-core in /libexec. DESTDIR for normal buildsystems is never the
right choice for nixpkgs.
@Mic92
Copy link
Member Author

Mic92 commented Apr 10, 2018

I have only tested linuxPackages_latest.perf so far...
I need to build all the other kernel versions also.

@Mic92
Copy link
Member Author

Mic92 commented Apr 10, 2018

@GrahamcOfBorg build linuxPackages.perf

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: linuxPackages.perf

Partial log (click to expand)

while evaluating the attribute 'linux_4_14' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13373:3:
while evaluating 'callPackageWith' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:113:35, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13373:16:
while evaluating 'makeOverridable' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:72:24, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:117:8:
while evaluating anonymous function at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/linux-4.14.nix�[0m:1:1, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:74:12:
while evaluating 'buildLinux' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13696:16, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/linux-4.14.nix�[0m:5:1:
while evaluating 'callPackageWith' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:113:35, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13696:23:
while evaluating 'makeOverridable' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:72:24, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:117:8:
while evaluating anonymous function at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/generic.nix�[0m:1:1, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:74:12:
assertion failed at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/generic.nix�[0m:45:1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: linuxPackages.perf

Partial log (click to expand)

/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/perl/bin/rw-by-file-report: interpreter directive changed from "/bin/bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/perl/rwtop.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/ggb7k5x9855j10dz99467djx4rplg32b-perl-5.24.3/bin/perl -w"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/perl/wakeup-latency.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/ggb7k5x9855j10dz99467djx4rplg32b-perl-5.24.3/bin/perl -w"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/perf-with-kcore: interpreter directive changed from "/bin/bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
checking for references to /tmp/nix-build-perf-linux-4.14.33.drv-0 in /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33...
moving /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/lib64/* to /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/lib
shrinking RPATHs of ELF executables and libraries in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug
patching script interpreter paths in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug
checking for references to /tmp/nix-build-perf-linux-4.14.33.drv-0 in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug...
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: linuxPackages.perf

Partial log (click to expand)

/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/libexec/perf-core/scripts/perl/rw-by-file.pl: interpreter directive changed from "/usr/bin/perl -w" to "/nix/store/icf1qhlpnbq1gag3x0dp2qsa0kkfvgan-perl-5.24.3/bin/perl -w"
/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/libexec/perf-core/perf-with-kcore: interpreter directive changed from "/bin/bash" to "/nix/store/3gg2p6n4kv2f0lsxd41f5iz1ivkbzyzr-bash-4.4-p19/bin/bash"
/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/libexec/perf-core/perf-archive: interpreter directive changed from "/bin/bash" to "/nix/store/3gg2p6n4kv2f0lsxd41f5iz1ivkbzyzr-bash-4.4-p19/bin/bash"
/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/libexec/perf-core/tests/attr.py: interpreter directive changed from " /usr/bin/python" to "/nix/store/14z9xiiwdnks1pivrv2hml9cflwq2iw3-python-2.7.14/bin/python"
checking for references to /build in /nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33...
moving /nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/lib64/* to /nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33/lib
shrinking RPATHs of ELF executables and libraries in /nix/store/wr08wn2y5zm76q9l1pns445a3dbmbsrm-perf-linux-4.14.33-debug
patching script interpreter paths in /nix/store/wr08wn2y5zm76q9l1pns445a3dbmbsrm-perf-linux-4.14.33-debug
checking for references to /build in /nix/store/wr08wn2y5zm76q9l1pns445a3dbmbsrm-perf-linux-4.14.33-debug...
/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: linuxPackages.perf

Partial log (click to expand)

while evaluating the attribute 'linux_4_14' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13373:3:
while evaluating 'callPackageWith' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:113:35, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13373:16:
while evaluating 'makeOverridable' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:72:24, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:117:8:
while evaluating anonymous function at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/linux-4.14.nix�[0m:1:1, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:74:12:
while evaluating 'buildLinux' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13696:16, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/linux-4.14.nix�[0m:5:1:
while evaluating 'callPackageWith' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:113:35, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix�[0m:13696:23:
while evaluating 'makeOverridable' at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:72:24, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:117:8:
while evaluating anonymous function at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/generic.nix�[0m:1:1, called from �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix�[0m:74:12:
assertion failed at �[1m/private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/os-specific/linux/kernel/generic.nix�[0m:45:1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: linuxPackages.perf

Partial log (click to expand)

/nix/store/xgh6zvb9jav6hrqcsp8ck1la66y8w56w-perf-linux-4.14.33

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: linuxPackages.perf

Partial log (click to expand)

/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/python/bin/syscall-counts-report: interpreter directive changed from "/bin/bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/python/call-graph-from-sql.py: interpreter directive changed from "/usr/bin/python2" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python2"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/python/sched-migration.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/libexec/perf-core/scripts/python/stat-cpi.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
checking for references to /build in /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33...
moving /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/lib64/* to /nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33/lib
shrinking RPATHs of ELF executables and libraries in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug
patching script interpreter paths in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug
checking for references to /build in /nix/store/6gm4mlq4dksna8h66vnlr2zhlg4wgl18-perf-linux-4.14.33-debug...
/nix/store/7imb9x5akf15162v79kcrf1gv1d1dcg4-perf-linux-4.14.33

@Mic92
Copy link
Member Author

Mic92 commented Apr 10, 2018

Rebuild of all perf builds was successful.

@Mic92 Mic92 merged commit 1d129ed into NixOS:master Apr 10, 2018
@Mic92 Mic92 deleted the perf branch April 10, 2018 14:38
@Mic92
Copy link
Member Author

Mic92 commented Apr 10, 2018

18.03:

[detached HEAD 1c52531] linuxPackages.perf: use prefix instead of DESTDIR
Date: Tue Apr 10 14:37:35 2018 +0100
1 file changed, 15 insertions(+), 10 deletions(-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants