git.iko.soy/typeable/nixpkgs
on master help sign in
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

commita9ecac2538ac0ab3d1ce42ec34b0ea18699f7844 authorMatthew Bauer <mjbauer95@gmail.com> dateWed 30 Dec 2020, 00:23 (6 years ago) parente24bf90
1 file changed+5
pkgs/development/python-modules/tensorflow/1/default.nix+5
pkgs/development/python-modules/tensorflow/1/default.nix+5
@@ -258,6 +258,11 @@ let
258258
259259 substituteInPlace tensorflow/tools/pip_package/setup.py \
260260 --replace "numpy >= 1.16.0, < 1.19.0" "numpy >= 1.16.0"
261+
262+ # glibc 2.31+ does not have sys/sysctl.h
263+ # see https://github.com/tensorflow/tensorflow/issues/45861
264+ substituteInPlace third_party/hwloc/BUILD.bazel\
265+ --replace "#define HAVE_SYS_SYSCTL_H 1" "#undef HAVE_SYS_SYSCTL_H"
261266 '';
262267
263268 preConfigure = let