mxnet: fix for gcc10+, enable on darwin
This commit is contained in:
parent
ea469c7eb1
commit
b39504da72
2 changed files with 21 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ config, stdenv, lib, fetchurl, bash, cmake
|
{ config, stdenv, lib, fetchurl, fetchpatch, bash, cmake
|
||||||
, opencv3, gtest, blas, perl
|
, opencv3, gtest, blas, gomp, llvmPackages, perl
|
||||||
, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11
|
, cudaSupport ? config.cudaSupport or false, cudatoolkit, nvidia_x11
|
||||||
, cudnnSupport ? cudaSupport, cudnn
|
, cudnnSupport ? cudaSupport, cudnn
|
||||||
}:
|
}:
|
||||||
|
@ -15,9 +15,25 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1vvdb7pfh63kb9fzs6gqp95q550a3ck4cj9mqxlk9wwhkh30dsq1";
|
sha256 = "1vvdb7pfh63kb9fzs6gqp95q550a3ck4cj9mqxlk9wwhkh30dsq1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix build error https://github.com/apache/incubator-mxnet/issues/19405
|
||||||
|
(fetchpatch {
|
||||||
|
name = "mxnet-fix-gcc-linker-error-1.patch";
|
||||||
|
url = "https://github.com/apache/incubator-mxnet/commit/78e31d66d19e385ca4ef73245ce79a47e375d8d1.diff";
|
||||||
|
sha256 = "sha256-UfmGhh4RbvrEOXe6IJxHm1Aqpy1gS6gHxrX5KQBXjv4=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "mxnet-fix-gcc-linker-error-2.patch";
|
||||||
|
url = "https://github.com/apache/incubator-mxnet/commit/9bfe3116aabd01049fdbd90855cb245a30b795df.diff";
|
||||||
|
sha256 = "sha256-BL7Zf7Bgn0qpai9HbQ6LBxZNa3iLjVJSe5nxZgqI/fw=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl ];
|
nativeBuildInputs = [ cmake perl ];
|
||||||
|
|
||||||
buildInputs = [ opencv3 gtest blas.provider ]
|
buildInputs = [ opencv3 gtest blas.provider ]
|
||||||
|
++ lib.optional stdenv.cc.isGNU gomp
|
||||||
|
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
|
||||||
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
|
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
|
||||||
++ lib.optional cudnnSupport cudnn;
|
++ lib.optional cudnnSupport cudnn;
|
||||||
|
|
||||||
|
@ -48,6 +64,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://mxnet.incubator.apache.org/";
|
homepage = "https://mxnet.incubator.apache.org/";
|
||||||
maintainers = with maintainers; [ abbradar ];
|
maintainers = with maintainers; [ abbradar ];
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31870,7 +31870,6 @@ with pkgs;
|
||||||
|
|
||||||
mxnet = callPackage ../applications/science/math/mxnet {
|
mxnet = callPackage ../applications/science/math/mxnet {
|
||||||
inherit (linuxPackages) nvidia_x11;
|
inherit (linuxPackages) nvidia_x11;
|
||||||
stdenv = gcc9Stdenv;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
|
wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
|
||||||
|
|
Loading…
Reference in a new issue