diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-16 23:48:43 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-17 00:40:41 +0200 |
commit | 5ade8fff793908dbfed7c4b4f5ae904ae6326bfc (patch) | |
tree | 5547eae17ed8464a94b3f43f62743b727ffd50e9 /pkgs/development/compilers/cudatoolkit/default.nix | |
parent | 09f58645ca6b579640f7e15a50cedd23d4ed3006 (diff) | |
download | nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar.gz nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar.bz2 nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar.lz nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar.xz nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.tar.zst nixpkgs-5ade8fff793908dbfed7c4b4f5ae904ae6326bfc.zip |
cudatoolkit: Fix building dependent packages
- Set a cmake flag to allow cmake to find CUDA automatically. - Pass -D_FORCE_INLINES to work around /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/string.h: In function 'void* __mempcpy_inline(void*, const void*, size_t)': /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/string.h:650:42: error: 'memcpy' was not declared in this scope https://github.com/BVLC/caffe/issues/4046 This fixes OpenSubdiv and Blender.
Diffstat (limited to 'pkgs/development/compilers/cudatoolkit/default.nix')
-rw-r--r-- | pkgs/development/compilers/cudatoolkit/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index c13118977a1..7037bf3808f 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -68,6 +68,14 @@ let # Change the #error on GCC > 4.9 to a #warning. sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/' + + # Ensure that cmake can find CUDA. + mkdir -p $out/nix-support + echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook + + '' + lib.optionalString (lib.versionOlder version "8.0") '' + # Hack to fix building against recent Glibc/GCC. + echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook ''; meta = { |