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] 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 a3043bcf695..990d3f1a5d5 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;