NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.87k stars 13.93k forks source link

nvidiaLegacy340 build fails with linuxPackages_4_13 #32169

Closed yellowgh0st closed 6 years ago

yellowgh0st commented 6 years ago

Issue description

Unable to build nvidiaLegacy340 driver with linuxPackages_4_13.

Steps to reproduce

1. Declare linux 4.13 kernel packages in configuration.nix

boot.kernelPackages = pkgs.linuxPackages_4_13;

2. Declare nvidiaLegacy340 driver in configuration.nix

services.xserver = {
     enable = true;
     videoDrivers = [ "nvidiaLegacy340" ];
};

3. Build with nixos-rebuild

sudo nixos-rebuild switch

Technical details

$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/r3r84a19qw38s5p7narlasp18f5zkbhq-nvidia-x11-340.102-4.13.16.drv
  /nix/store/ynm9qipijq7j1i68npm1p2xlj2jm7r81-kernel-modules.drv
  /nix/store/62p4f7p27ysyyaapbdvpcmyxn9dn2kg5-kernel-modules-shrunk.drv
  /nix/store/3zbl8j0mb93f71b49nd0rhk45543xyl1-stage-1-init.sh.drv
  /nix/store/080qfri80fwjda20i7g1645facxss2pw-initrd.drv
  /nix/store/1pjv0c8msaldid5h80rk9w93nwfx53z0-xserver.conf.drv
  /nix/store/a631izd0m10xwdis16ggw571qgpdx2yw-nvidia-persistenced-340.102.drv
  /nix/store/f5c9mri4a5ps8z5js7bxldrv1882qnvd-nvidia-settings-340.102.drv
  /nix/store/aam7j84jwxrbwfcz34mglibd6dc99zx6-system-path.drv
  /nix/store/s0p2qqpcnslcfp4ydhgiw0155l5g495d-xsession.drv
  /nix/store/jzzf8qrmv98i95irg9f66l9lm41pl7ks-desktops.drv
  /nix/store/8q6m752jkjg1m5x79mrjhm4mm81yixis-slim.cfg.drv
  /nix/store/9lvqcyqlvdyv0ya00c184xnkg5hafahv-unit-display-manager.service.drv
  /nix/store/kwsxaxm0nmahslswjh0xvny0lkri6951-unit-systemd-fsck-.service.drv
  /nix/store/z16zj3hscbf442dys0sp5dnaw6747k5z-dbus-1.drv
  /nix/store/m5z2fd62fyqigfwlp66sx4n1iqprr1nq-unit-dbus.service.drv
  /nix/store/rf58drfbfqppaq31mx9zmp9qw099ir9l-unit-polkit.service.drv
  /nix/store/82i8ycybnjcpzf0zs8v2pppcnn90i0qw-system-units.drv
  /nix/store/8xcbf9wazymrm68lfpap5lihc7dpc951-opengl-drivers.drv
  /nix/store/f7klr4h6vsp3pagxb2hsa12xh0vxcji5-user-units.drv
  /nix/store/gb9ia9lkd0p6cf3wym38s99higz7s1ql-etc.drv
  /nix/store/bs29qjsfwmmvh2qj546as243nranrdds-nixos-system-nixOs-17.09.2182.7f6f0c49f0.drv
building path(s) ‘/nix/store/0i6phmw352b99m6jkkxay3dywcw3q6dp-nvidia-x11-340.102-4.13.16’, ‘/nix/store/ijpxasbx6hi0qiv1s2hbfz7pafsqcb16-nvidia-x11-340.102-4.13.16-bin’
unpacking sources
Creating directory NVIDIA-Linux-x86_64-340.102
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.102/nix/store/mb73bi04wjfmz5v6g8v8liv5ayhm423d-NVIDIA-Linux-x86_64-340.102.run: line 1000: /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/makeself.4a9M2Hqi/xz: No such file or directory
/nix/store/mb73bi04wjfmz5v6g8v8liv5ayhm423d-NVIDIA-Linux-x86_64-340.102.run: line 991: /dev/tty: No such device or address

/nix/store/y81xhkvj6jakznwkdlw0l0gyzvjb1ip0-builder.sh: line 10:  2567 Terminated              sh $src -x
./gl.h
./nvidia-installer.1.gz
./libnvidia-fbc.so.340.102
./nvidia-persistenced
./libnvidia-glsi.so.340.102
./nvidia-smi.1.gz
./libnvidia-encode.so.340.102
./nvidia-persistenced.1.gz
./nvidia-cuda-mps-control
./nvidia-settings.1.gz
./nvidia-settings
./libnvidia-tls.so.340.102
./nvidia_drv.so
./nvidia-bug-report.sh
./nvidia-application-profiles-340.102-rc
./nvidia-persistenced-init.tar.bz2
./tls_test
./nvidia-xconfig.1.gz
./32/
./32/libnvidia-fbc.so.340.102
./32/libnvidia-glsi.so.340.102
./32/libnvidia-encode.so.340.102
./32/libnvidia-tls.so.340.102
./32/libcuda.so.340.102
./32/libOpenCL.so.1.0.0
./32/tls/
./32/tls/libnvidia-tls.so.340.102
./32/libGL.so.340.102
./32/libGLESv1_CM.so.340.102
./32/libnvidia-ifr.so.340.102
./32/libEGL.so.340.102
./32/libnvidia-ml.so.340.102
./32/libnvcuvid.so.340.102
./32/libnvidia-eglcore.so.340.102
./32/libvdpau_trace.so.340.102
./32/libnvidia-opencl.so.340.102
./32/libnvidia-compiler.so.340.102
./32/libnvidia-glcore.so.340.102
./32/libGL.la
./32/libGLESv2.so.340.102
./32/libvdpau_nvidia.so.340.102
./32/libvdpau.so.340.102
./monitoring.conf
./nvidia-smi
./pkg-history.txt
./nvidia.icd
./libglx.so.340.102
./nvidia-xconfig
./libcuda.so.340.102
./libOpenCL.so.1.0.0
./nvidia-cuda-mps-control.1.gz
./tls/
./tls/libnvidia-tls.so.340.102
./libGL.so.340.102
./nvidia-debugdump
./tls_test_dso.so
./kernel/
./kernel/nv-frontend.c
./kernel/rmil.h
./kernel/nverror.h
./kernel/os-usermap.c
./kernel/gcc-version-check.c
./kernel/nv-p2p.c
./kernel/nv-pat.c
./kernel/dkms.conf
./kernel/nv-acpi.c
./kernel/os-mlock.c
./kernel/nv-linux.h
./kernel/nv-kernel.o
./kernel/nv-mempool.c
./kernel/nvgputypes.h
./kernel/nv_gpu_ops.h
./kernel/nvidia-modules-common.mk
./kernel/nv-usermap.c
./kernel/nv-cray.c
./kernel/cpuopsys.h
./kernel/xapi-sdk.h
./kernel/nv-memdbg.h
./kernel/nv-misc.h
./kernel/nv-frontend.h
./kernel/nv-dma.c
./kernel/os-interface.h
./kernel/nv-mmap.c
./kernel/nv-vtophys.c
./kernel/os-interface.c
./kernel/nv-proto.h
./kernel/nv-vm.c
./kernel/nv_uvm_interface.h
./kernel/Makefile
./kernel/uvm/
./kernel/uvm/cla06fsubch.h
./kernel/uvm/cla0b5.h
./kernel/uvm/nvidia_uvm_lite_counters.c
./kernel/uvm/uvm-debug.h
./kernel/uvm/nvidia_uvm_lite.c
./kernel/uvm/nvidia_uvm_utils.c
./kernel/uvm/dkms.conf.fragment
./kernel/uvm/nvidia_uvm_common.h
./kernel/uvm/nvidia_uvm_lite.h
./kernel/uvm/uvm_linux_ioctl.h
./kernel/uvm/uvmtypes.h
./kernel/uvm/nvidia_uvm_page_cache.c
./kernel/uvm/nvidia_uvm_common.c
./kernel/uvm/nvkernel.h
./kernel/uvm/uvm.h
./kernel/uvm/nvidia_page_migration.c
./kernel/uvm/cla06f.h
./kernel/uvm/nvidia_uvm_lite_counters.h
./kernel/uvm/nvidia_page_migration.h
./kernel/uvm/uvm_gpu_ops_tests.h
./kernel/uvm/nvidia_uvm_lite_api.c
./kernel/uvm/nvidia_page_migration_kepler.c
./kernel/uvm/nvidia_uvm_linux.h
./kernel/uvm/ctrl2080mc.h
./kernel/uvm/Makefile
./kernel/uvm/nvmisc.h
./kernel/uvm/uvm_ioctl.h
./kernel/uvm/nvidia_page_migration_kepler.h
./kernel/uvm/uvm_gpu_ops_tests.c
./kernel/uvm/nvidia_uvm_utils.h
./kernel/uvm/conftest.sh
./kernel/uvm/nvidia_uvm_lite_events.c
./kernel/uvm/nvidia_uvm_linux.c
./kernel/nv-reg.h
./kernel/nv.h
./kernel/g_nvreadme.h
./kernel/nv-gvi.c
./kernel/os-registry.c
./kernel/os-smp.c
./kernel/os-pci.c
./kernel/conftest.sh
./kernel/nv-procfs.c
./kernel/nv-p2p.h
./kernel/nv.c
./kernel/nv-i2c.c
./kernel/nv_uvm_interface.c
./kernel/nvtypes.h
./kernel/rmretval.h
./kernel/nv-drm.c
./kernel/nv-chrdev.c
./libGLESv1_CM.so.340.102
./libnvidia-ifr.so.340.102
./nvidia-modprobe.1.gz
./nvidia-installer
./LICENSE
./libEGL.so.340.102
./makeself-help-script.sh
./html/
./html/commonproblems.html
./html/sdi.html
./html/glxsupport.html
./html/configtwinview.html
./html/profiles.html
./html/acknowledgements.html
./html/minimumrequirements.html
./html/index.html
./html/dpi.html
./html/audiosupport.html
./html/newusertips.html
./html/randr14.html
./html/powermanagement.html
./html/configtvout.html
./html/nvidia-debugdump.html
./html/faq.html
./html/nvidia-persistenced.html
./html/knownissues.html
./html/xrandrextension.html
./html/gpunames.html
./html/installationandconfiguration.html
./html/flippingubb.html
./html/addtlresources.html
./html/i2c.html
./html/optimus.html
./html/procinterface.html
./html/nvidiasettings.html
./html/vdpausupport.html
./html/depth30.html
./html/installdriver.html
./html/supportedchips.html
./html/dma_issues.html
./html/selectdriver.html
./html/nvidia-ml.html
./html/addressingcapabilities.html
./html/displaydevicenames.html
./html/programmingmodes.html
./html/editxconfig.html
./html/installedcomponents.html
./html/introduction.html
./html/framelock.html
./html/xineramaglx.html
./html/configlaptop.html
./html/xcompositeextension.html
./html/configmultxscreens.html
./html/nvidia-smi.html
./html/appendices.html
./html/sli.html
./html/openglenvvariables.html
./html/xconfigoptions.html
./nvidia-modprobe
./libnvidia-ml.so.340.102
./nvidia-cuda-mps-server
./libnvcuvid.so.340.102
./NVIDIA_Changelog
./libnvidia-eglcore.so.340.102
./nvidia-settings.png
./libvdpau_trace.so.340.102
./libnvidia-wfb.so.340.102
./nvidia-settings.desktop
./pci.ids
./README.txt
./libnvidia-opencl.so.340.102
./nvidia-application-profiles-340.102-key-documentation
./libnvidia-compiler.so.340.102
./makeself.sh
./libnvidia-cfg.so.340.102
./glext.h
./libnvidia-glcore.so.340.102
./libGL.la
./libGLESv2.so.340.102
./mkprecompiled
./libvdpau_nvidia.so.340.102
./libvdpau.so.340.102
./glx.h
./glxext.h
./.manifest
source root is .
setting SOURCE_DATE_EPOCH to timestamp 1511960770 of file ./env-vars
warning: file ./env-vars may be generated; SOURCE_DATE_EPOCH may be non-deterministic
patching sources
applying patch /nix/store/y91clgy30274v2awpn9kckp67bx7552h-kernel-4.10.patch
patching file kernel/nv-linux.h
patching file kernel/nv-pat.c
patching file kernel/uvm/nvidia_uvm_lite.c
applying patch /nix/store/dr4jj9a5dirnb820vcli98cspl0qkmag-fs52243.patch
patching file kernel/nv-drm.c
configuring
no configure script, doing nothing
building
Building linux driver against kernel: /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev
NVIDIA: calling KBUILD...
make[1]: Entering directory '/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source'
make -C /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/build KBUILD_SRC=/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source \
-f /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/Makefile modules
make[2]: Entering directory '/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/build'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
false)
mkdir -p /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/.tmp_versions ; rm -f /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/.tmp_versions/*
make -f /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/scripts/Makefile.build obj=/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel
  gcc -Wp,-MD,/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/.nv.o.d  -nostdinc -isystem /nix/store/rmmcf5d82czvfz8drbhc842dy1psrx11-gcc-6.4.0/lib/gcc/x86_64-unknown-linux-gnu/6.4.0/include -I/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include -I./arch/x86/include/generated  -I/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include -I./include -I/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/uapi -I./include/generated/uapi -include /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/kconfig.h  -I/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel -I/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -DNV_MODULE_INSTANCE=0 -DNV_BUILD_MODULE_INSTANCES=0 -UDEBUG -U_DEBUG -DNDEBUG  -I/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"340.102\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME=\"nvidia\"  -DMODULE  -DKBUILD_BASENAME='"nv"'  -DKBUILD_MODNAME='"nvidia"' -c -o /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.o /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.c
In file included from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/current.h:4:0,
                 from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/sched.h:11,
                 from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/utsname.h:5,
                 from /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv-linux.h:44,
                 from /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.c:13:
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/thread_info.h: In function 'check_copy_size':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/thread_info.h:130:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (unlikely(sz >= 0 && sz < bytes)) {
                             ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/compiler.h:175:42: note: in definition of macro 'unlikely'
 # define unlikely(x) __builtin_expect(!!(x), 0)
                                          ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/asm-generic/qrwlock.h: In function 'queued_write_trylock':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/asm-generic/qrwlock.h:106:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           cnts, cnts | _QW_LOCKED) == cnts);
                                    ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/compiler.h:174:40: note: in definition of macro 'likely'
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/mmzone.h: In function 'next_zones_zonelist':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/mmzone.h:986:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(!nodes && zonelist_zone_idx(z) <= highest_zoneidx))
                                            ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/compiler.h:174:40: note: in definition of macro 'likely'
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
In file included from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/current.h:5:0,
                 from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/sched.h:11,
                 from /nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/utsname.h:5,
                 from /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv-linux.h:44,
                 from /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.c:13:
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h: In function 'percpu_ref_get_many':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:419:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_1(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:364:11: note: in expansion of macro 'this_cpu_add_1'
   case 1: stem##1(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:176:3: note: in expansion of macro 'this_cpu_add'
   this_cpu_add(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:420:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_2(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:365:11: note: in expansion of macro 'this_cpu_add_2'
   case 2: stem##2(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:176:3: note: in expansion of macro 'this_cpu_add'
   this_cpu_add(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:421:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_4(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:366:11: note: in expansion of macro 'this_cpu_add_4'
   case 4: stem##4(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:176:3: note: in expansion of macro 'this_cpu_add'
   this_cpu_add(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:478:35: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_8(pcp, val)  percpu_add_op((pcp), val)
                                   ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:367:11: note: in expansion of macro 'this_cpu_add_8'
   case 8: stem##8(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:176:3: note: in expansion of macro 'this_cpu_add'
   this_cpu_add(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h: In function 'percpu_ref_put_many':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:419:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_1(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:364:11: note: in expansion of macro 'this_cpu_add_1'
   case 1: stem##1(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:506:33: note: in expansion of macro 'this_cpu_add'
 #define this_cpu_sub(pcp, val)  this_cpu_add(pcp, -(typeof(pcp))(val))
                                 ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:275:3: note: in expansion of macro 'this_cpu_sub'
   this_cpu_sub(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:420:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_2(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:365:11: note: in expansion of macro 'this_cpu_add_2'
   case 2: stem##2(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:506:33: note: in expansion of macro 'this_cpu_add'
 #define this_cpu_sub(pcp, val)  this_cpu_add(pcp, -(typeof(pcp))(val))
                                 ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:275:3: note: in expansion of macro 'this_cpu_sub'
   this_cpu_sub(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:421:34: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_4(pcp, val) percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:366:11: note: in expansion of macro 'this_cpu_add_4'
   case 4: stem##4(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:506:33: note: in expansion of macro 'this_cpu_add'
 #define this_cpu_sub(pcp, val)  this_cpu_add(pcp, -(typeof(pcp))(val))
                                 ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:275:3: note: in expansion of macro 'this_cpu_sub'
   this_cpu_sub(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:478:35: note: in expansion of macro 'percpu_add_op'
 #define this_cpu_add_8(pcp, val)  percpu_add_op((pcp), val)
                                   ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:367:11: note: in expansion of macro 'this_cpu_add_8'
   case 8: stem##8(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:496:33: note: in expansion of macro '__pcpu_size_call'
 #define this_cpu_add(pcp, val)  __pcpu_size_call(this_cpu_add_, pcp, val)
                                 ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:506:33: note: in expansion of macro 'this_cpu_add'
 #define this_cpu_sub(pcp, val)  this_cpu_add(pcp, -(typeof(pcp))(val))
                                 ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-refcount.h:275:3: note: in expansion of macro 'this_cpu_sub'
   this_cpu_sub(*percpu_count, nr);
   ^~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-rwsem.h: In function 'percpu_up_read_preempt_enable':
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:400:34: note: in expansion of macro 'percpu_add_op'
 #define raw_cpu_add_1(pcp, val)  percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:364:11: note: in expansion of macro 'raw_cpu_add_1'
   case 1: stem##1(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:409:32: note: in expansion of macro '__pcpu_size_call'
 #define raw_cpu_add(pcp, val)  __pcpu_size_call(raw_cpu_add_, pcp, val)
                                ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:445:2: note: in expansion of macro 'raw_cpu_add'
  raw_cpu_add(pcp, val);      \
  ^~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:483:34: note: in expansion of macro '__this_cpu_add'
 #define __this_cpu_sub(pcp, val) __this_cpu_add(pcp, -(typeof(pcp))(val))
                                  ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:485:30: note: in expansion of macro '__this_cpu_sub'
 #define __this_cpu_dec(pcp)  __this_cpu_sub(pcp, 1)
                              ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-rwsem.h:96:3: note: in expansion of macro '__this_cpu_dec'
   __this_cpu_dec(*sem->read_count);
   ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:401:34: note: in expansion of macro 'percpu_add_op'
 #define raw_cpu_add_2(pcp, val)  percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:365:11: note: in expansion of macro 'raw_cpu_add_2'
   case 2: stem##2(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:409:32: note: in expansion of macro '__pcpu_size_call'
 #define raw_cpu_add(pcp, val)  __pcpu_size_call(raw_cpu_add_, pcp, val)
                                ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:445:2: note: in expansion of macro 'raw_cpu_add'
  raw_cpu_add(pcp, val);      \
  ^~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:483:34: note: in expansion of macro '__this_cpu_add'
 #define __this_cpu_sub(pcp, val) __this_cpu_add(pcp, -(typeof(pcp))(val))
                                  ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:485:30: note: in expansion of macro '__this_cpu_sub'
 #define __this_cpu_dec(pcp)  __this_cpu_sub(pcp, 1)
                              ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-rwsem.h:96:3: note: in expansion of macro '__this_cpu_dec'
   __this_cpu_dec(*sem->read_count);
   ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:402:34: note: in expansion of macro 'percpu_add_op'
 #define raw_cpu_add_4(pcp, val)  percpu_add_op((pcp), val)
                                  ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:366:11: note: in expansion of macro 'raw_cpu_add_4'
   case 4: stem##4(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:409:32: note: in expansion of macro '__pcpu_size_call'
 #define raw_cpu_add(pcp, val)  __pcpu_size_call(raw_cpu_add_, pcp, val)
                                ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:445:2: note: in expansion of macro 'raw_cpu_add'
  raw_cpu_add(pcp, val);      \
  ^~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:483:34: note: in expansion of macro '__this_cpu_add'
 #define __this_cpu_sub(pcp, val) __this_cpu_add(pcp, -(typeof(pcp))(val))
                                  ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:485:30: note: in expansion of macro '__this_cpu_sub'
 #define __this_cpu_dec(pcp)  __this_cpu_sub(pcp, 1)
                              ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-rwsem.h:96:3: note: in expansion of macro '__this_cpu_dec'
   __this_cpu_dec(*sem->read_count);
   ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:130:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          ((val) == 1 || (val) == -1)) ?  \
                               ^
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/arch/x86/include/asm/percpu.h:469:35: note: in expansion of macro 'percpu_add_op'
 #define raw_cpu_add_8(pcp, val)   percpu_add_op((pcp), val)
                                   ^~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:367:11: note: in expansion of macro 'raw_cpu_add_8'
   case 8: stem##8(variable, __VA_ARGS__);break;  \
           ^~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:409:32: note: in expansion of macro '__pcpu_size_call'
 #define raw_cpu_add(pcp, val)  __pcpu_size_call(raw_cpu_add_, pcp, val)
                                ^~~~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:445:2: note: in expansion of macro 'raw_cpu_add'
  raw_cpu_add(pcp, val);      \
  ^~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:483:34: note: in expansion of macro '__this_cpu_add'
 #define __this_cpu_sub(pcp, val) __this_cpu_add(pcp, -(typeof(pcp))(val))
                                  ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-defs.h:485:30: note: in expansion of macro '__this_cpu_sub'
 #define __this_cpu_dec(pcp)  __this_cpu_sub(pcp, 1)
                              ^~~~~~~~~~~~~~
/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/include/linux/percpu-rwsem.h:96:3: note: in expansion of macro '__this_cpu_dec'
   __this_cpu_dec(*sem->read_count);
   ^~~~~~~~~~~~~~
In file included from /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.c:13:0:
/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv-linux.h: At top level:
/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv-linux.h:199:2: error: #error "This driver requires the ability to change memory types!"
 #error "This driver requires the ability to change memory types!"
  ^~~~~
make[3]: *** [/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/scripts/Makefile.build:303: /tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel/nv.o] Error 1
make[2]: *** [/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source/Makefile:1512: _module_/tmp/nix-build-nvidia-x11-340.102-4.13.16.drv-0/kernel] Error 2
make[2]: Leaving directory '/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/build'
make[1]: *** [Makefile:145: sub-make] Error 2
make[1]: Leaving directory '/nix/store/08bqgcswihhlr2zd1ja6jshmz6hr8rdy-linux-4.13.16-dev/lib/modules/4.13.16/source'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:185: nvidia.ko] Error 1
builder for ‘/nix/store/r3r84a19qw38s5p7narlasp18f5zkbhq-nvidia-x11-340.102-4.13.16.drv’ failed with exit code 2
cannot build derivation ‘/nix/store/gb9ia9lkd0p6cf3wym38s99higz7s1ql-etc.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/ynm9qipijq7j1i68npm1p2xlj2jm7r81-kernel-modules.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/8xcbf9wazymrm68lfpap5lihc7dpc951-opengl-drivers.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/aam7j84jwxrbwfcz34mglibd6dc99zx6-system-path.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/bs29qjsfwmmvh2qj546as243nranrdds-nixos-system-nixOs-17.09.2182.7f6f0c49f0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/bs29qjsfwmmvh2qj546as243nranrdds-nixos-system-nixOs-17.09.2182.7f6f0c49f0.drv’ failed

$ nix-shell -p nix-info --run "nix-info -m"

vcunat commented 6 years ago

Upstream has a .104 version, so I would try bumping it...