git.iko.soy/typeable/nixpkgs
on master help sign in
cudatoolkit: don't move $out/include to $out/usr_include

This effectively reverts 86c283824f76d849acbe6 ("If cuda headers are presented to nix [...]") and all the following workarounds that was added due to that commit. As far as I can tell[1] this hack isn't needed anymore. And moving includes to $out/usr_include causes pain for cudatoolkit users, so better get rid of it. In patches that did more than the $out/usr_include workaround, I only changed the line back to $out/include instead of re-generating the patches and fully removing the changed line. [1]: I build tested blender and caffe, and temporarily added recurseIntoAttrs to rPackages and haskellPackages so that nox-review could get proper coverage. However, many of the packages do not build even before this patch. I also built CUDA samples with cudatoolkit7 that ran fine.

commit22321f2e58335cd39051c9403975b1015cfa68e0 authorBjørn Forsman <bjorn.forsman@gmail.com> dateFri 4 Sep 2015, 12:29 (11 years ago) parent220e025
10 files changed+5−54
pkgs/development/compilers/cudatoolkit/generic.nix−3 pkgs/development/compilers/cudatoolkit/setup-hook.sh−8 pkgs/development/haskell-modules/configuration-common.nix+1−1 pkgs/development/r-modules/default.nix+1−2 pkgs/development/r-modules/patches/CARramps.patch−12 pkgs/development/r-modules/patches/WideLM.patch+1−1 pkgs/development/r-modules/patches/gputools.patch+1−1 pkgs/development/r-modules/patches/iFes.patch−13 pkgs/development/r-modules/patches/magma_cuda_include.patch−12 pkgs/development/r-modules/patches/rpud.patch+1−1
pkgs/development/compilers/cudatoolkit/generic.nix−3
@@ -59,7 +59,6 @@ in stdenv.mkDerivation rec {
5959 perl ./install-linux.pl --prefix="$out"
6060 rm $out/tools/CUDA_Occupancy_Calculator.xls
6161 perl ./install-sdk-linux.pl --prefix="$sdk" --cudaprefix="$out"
62− mv $out/include $out/usr_include
6362
6463 # let's remove the 32-bit libraries, they confuse the lib64->lib mover
6564 rm -rf $out/lib
@@ -70,8 +69,6 @@ in stdenv.mkDerivation rec {
7069 fi
7170 '';
7271
73− setupHook = ./setup-hook.sh;
74−
7572 meta = {
7673 license = lib.licenses.unfree;
7774 };
pkgs/development/compilers/cudatoolkit/setup-hook.shdeleted−8
@@ -1,8 +0,0 @@
1−addIncludePath () {
2− if test -d "$1/usr_include"
3− then
4− export NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE} -I$1/usr_include"
5− fi
6−}
7−
8−envHooks=(${envHooks[@]} addIncludePath)
pkgs/development/haskell-modules/configuration-common.nix+1−1
@@ -53,7 +53,7 @@ self: super: {
5353 configureFlags = (drv.configureFlags or []) ++
5454 pkgs.lib.optional pkgs.stdenv.is64bit "--extra-lib-dirs=${pkgs.cudatoolkit}/lib64" ++ [
5555 "--extra-lib-dirs=${pkgs.cudatoolkit}/lib"
56− "--extra-include-dirs=${pkgs.cudatoolkit}/usr_include"
56+ "--extra-include-dirs=${pkgs.cudatoolkit}/include"
5757 ];
5858 preConfigure = ''
5959 unset CC # unconfuse the haskell-cuda configure script
pkgs/development/r-modules/default.nix+1−2
@@ -1566,7 +1566,6 @@ let
15661566 });
15671567
15681568 iFes = old.iFes.overrideDerivation (attrs: {
1569− patches = [ ./patches/iFes.patch ];
15701569 CUDA_HOME = "${pkgs.cudatoolkit}";
15711570 });
15721571
@@ -1661,7 +1660,7 @@ let
16611660 patches = [ ./patches/gmatrix.patch ];
16621661 CUDA_LIB_PATH = "${pkgs.cudatoolkit}/lib64";
16631662 R_INC_PATH = "${pkgs.R}/lib/R/include";
1664− CUDA_INC_PATH = "${pkgs.cudatoolkit}/usr_include";
1663+ CUDA_INC_PATH = "${pkgs.cudatoolkit}/include";
16651664 });
16661665
16671666 # It seems that we cannot override meta attributes with overrideDerivation.
pkgs/development/r-modules/patches/CARramps.patch−12
@@ -1,15 +1,3 @@
1−diff -ru -x '*~' CARramps_orig/configure CARramps/configure
2−--- CARramps_orig/configure 2011-12-01 22:27:06.000000000 +0900
3−+++ CARramps/configure 2014-10-25 14:56:04.599337748 +0900
4−@@ -2395,7 +2395,7 @@
5−
6−
7− NCFLAGS="-arch=sm_13 -O2"
8−-CUDA_INC=${CUDA_HOME}/include
9−+CUDA_INC=${CUDA_HOME}/usr_include
10− { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA headers" >&5
11− $as_echo_n "checking for CUDA headers... " >&6; }
12− as_ac_File=`$as_echo "ac_cv_file_${CUDA_INC}/cublas.h" | $as_tr_sh`
131diff -ru -x '*~' CARramps_orig/src/combo1colForR1Q_d.cu CARramps/src/combo1colForR1Q_d.cu
142--- CARramps_orig/src/combo1colForR1Q_d.cu 2011-12-01 22:27:06.000000000 +0900
153+++ CARramps/src/combo1colForR1Q_d.cu 2014-10-25 14:59:06.869299163 +0900
pkgs/development/r-modules/patches/WideLM.patch+1−1
@@ -6,7 +6,7 @@ diff -ru -x '*~' WideLM_orig/src/Makefile.in WideLM/src/Makefile.in
66 R_INCS := @R_INCL@ @RCPP_INCL@
77 CC_ARGS := @CU_PARAMS@ -Xcompiler @R_CPIC@
88-CU_INCS := -I@CUDA_HOME@/include
9−+CU_INCS := -I@CUDA_HOME@/usr_include
9++CU_INCS := -I@CUDA_HOME@/include
1010 CU_ARCH := -gencode arch=compute_20,code=sm_20
1111
1212 #linker options
pkgs/development/r-modules/patches/gputools.patch+1−1
@@ -5,7 +5,7 @@ diff -ru -x '*~' gputools_orig/src/Makefile gputools/src/Makefile
55
66 R_HOME := $(shell R RHOME)
77
8−+CUDA_INC := $(CUDA_HOME)/usr_include
8++CUDA_INC := $(CUDA_HOME)/include
99+CUDA_LIB := $(CUDA_HOME)/lib
1010+
1111 #compiler/preprocessor options
pkgs/development/r-modules/patches/iFes.patchdeleted−13
@@ -1,13 +0,0 @@
1−diff -u3 -r iFes_orig/src/config.mk iFes/src/config.mk
2−--- iFes_orig/src/config.mk 2014-12-09 14:19:58.000000000 +0300
3−+++ iFes/src/config.mk 2015-02-19 22:47:24.426804174 +0300
4−@@ -12,7 +12,7 @@
5− endif
6−
7− # set CUDA_INC to CUDA header dir on your system
8−-CUDA_INC := $(CUDA_HOME)/include
9−+CUDA_INC := $(CUDA_HOME)/usr_include
10−
11− ARCH := $(shell uname -m)
12−
13−
pkgs/development/r-modules/patches/magma_cuda_include.patchdeleted−12
@@ -1,12 +0,0 @@
1−diff -ru -x '*~' magma_orig/configure magma/configure
2−--- magma_orig/configure 2013-04-03 11:07:42.000000000 +0900
3−+++ magma/configure 2014-10-18 21:58:48.745890187 +0900
4−@@ -2377,7 +2377,7 @@
5−
6−
7− NCFLAGS="-arch=sm_13 -O2 -DADD_"
8−-CUDA_INC=${CUDA_HOME}/include
9−+CUDA_INC=${CUDA_HOME}/usr_include
10− { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA headers" >&5
11− $as_echo_n "checking for CUDA headers... " >&6; }
12− as_ac_File=`$as_echo "ac_cv_file_${CUDA_INC}/cublas.h" | $as_tr_sh`
pkgs/development/r-modules/patches/rpud.patch+1−1
@@ -18,7 +18,7 @@ diff -ru -x '*~' rpud_orig/src/Makefile.in rpud/src/Makefile.in
1818
1919 #compiler/preprocessor options
2020-INCS := -I@CUDA_HOME@/include
21−+INCS := -I@CUDA_HOME@/usr_include
21++INCS := -I@CUDA_HOME@/include
2222 PARAMS := -Xcompiler "@R_INCLUDE@ @CPICFLAGS@"
2323
2424 #linker options