about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-12-30 00:23:21 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2020-12-30 00:23:21 -0600
commita9ecac2538ac0ab3d1ce42ec34b0ea18699f7844 (patch)
tree29418cab39a439438ef2a548925961222bbea16b
parente24bf9062b4b23f4c11f57399d11ad73c86e0828 (diff)
downloadnixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar.gz
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar.bz2
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar.lz
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar.xz
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.tar.zst
nixlib-a9ecac2538ac0ab3d1ce42ec34b0ea18699f7844.zip
tensorflow1: disable sysctl.h in hwloc
We need to override tensorflow's hwloc configuration, since it forces
sysctl.h usage which is removed since glibc 2.31. This does not appear
to effect tensorflow2.

See also https://github.com/tensorflow/tensorflow/issues/45861

Fixes #104801
-rw-r--r--pkgs/development/python-modules/tensorflow/1/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/tensorflow/1/default.nix b/pkgs/development/python-modules/tensorflow/1/default.nix
index 599f809f8646..4dd30e4687ad 100644
--- a/pkgs/development/python-modules/tensorflow/1/default.nix
+++ b/pkgs/development/python-modules/tensorflow/1/default.nix
@@ -258,6 +258,11 @@ let
 
       substituteInPlace tensorflow/tools/pip_package/setup.py \
         --replace "numpy >= 1.16.0, < 1.19.0" "numpy >= 1.16.0"
+
+      # glibc 2.31+ does not have sys/sysctl.h
+      # see https://github.com/tensorflow/tensorflow/issues/45861
+      substituteInPlace third_party/hwloc/BUILD.bazel\
+        --replace "#define HAVE_SYS_SYSCTL_H 1" "#undef HAVE_SYS_SYSCTL_H"
     '';
 
     preConfigure = let