From 590ce7d1ae5512360da09257c4bf8936fc6b6827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Tue, 4 Sep 2018 20:27:25 +0200 Subject: [PATCH 1/3] mxnet: fix library dependencies. - mxnet now builds the open source MKL DNN library. However, this was not included with the build. - mxnet builds its own OpenMP library, even when OpenMP is provided by the system. This leads to problems, so remove the included OpenMP implementation: https://github.com/apache/incubator-mxnet/pull/12160 --- pkgs/applications/science/math/mxnet/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix index a3043bcf6952..990d3f1a5d59 100644 --- a/pkgs/applications/science/math/mxnet/default.nix +++ b/pkgs/applications/science/math/mxnet/default.nix @@ -34,11 +34,14 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \ --replace "/bin/bash" "${bash}/bin/bash" + + # Build against the system version of OpenMP. + # https://github.com/apache/incubator-mxnet/pull/12160 + rm -rf 3rdparty/openmp ''; - installPhase = '' - install -Dm755 libmxnet.so $out/lib/libmxnet.so - cp -r ../include $out + postInstall = '' + rm "$out"/lib/*.a ''; enableParallelBuilding = true; From 19ac91770736ffb012a8003085be640417464d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Tue, 4 Sep 2018 20:30:31 +0200 Subject: [PATCH 2/3] python[23]Packages.graphviz: 0.5.2 -> 0.9 --- pkgs/top-level/python-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0bc38b0f8dfe..5c039f1f9ee8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7937,11 +7937,11 @@ in { graphviz = buildPythonPackage rec { name = "graphviz-${version}"; - version = "0.5.2"; + version = "0.9"; src = pkgs.fetchurl { url = "mirror://pypi/g/graphviz/${name}.zip"; - sha256 = "0jh31nlm0qbxwylhdkwnb69pcjlc5z03fcfbs0gvgzp3hfrngsk0"; + sha256 = "14r9brj4r31b3qy1nnn34v3l4h0n39bqxg9sn2fz4p3pp5mglnl6"; }; propagatedBuildInputs = [ pkgs.graphviz ]; From e57e92bfa2515b1b7ff5ad2db2e7d503e7ae24fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Tue, 4 Sep 2018 20:35:05 +0200 Subject: [PATCH 3/3] python[23]Packages.mxnet: fix build Relax graphviz, numpy, requests dependency version bounds. --- pkgs/top-level/python-packages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5c039f1f9ee8..63028eeaa838 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1788,6 +1788,13 @@ in { doCheck = !isPy3k; + postPatch = '' + substituteInPlace python/setup.py \ + --replace "graphviz<0.9.0" "graphviz<0.10.0" \ + --replace "numpy<=1.15.0" "numpy<1.16.0" \ + --replace "requests<2.19.0" "requests<2.20.0" + ''; + preConfigure = '' cd python '';