Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building tensorflow-gpu #104801

Closed
locallycompact opened this issue Nov 24, 2020 · 2 comments · Fixed by #107944
Closed

Error building tensorflow-gpu #104801

locallycompact opened this issue Nov 24, 2020 · 2 comments · Fixed by #107944
Labels
0.kind: bug Something is broken

Comments

@locallycompact
Copy link
Contributor

Hi, I get this error when building tensorflowWithCuda.

ERROR: /build/output/external/hwloc/BUILD.bazel:229:1: C++ compilation of rule '@hwloc//:hwloc' failed (Exit 1)
[7,212 / 12,420] 31 actions running
    Compiling external/mkl_dnn/src/cpu/cpu_engine.cpp; 42s local
    @mkl_dnn//:mkldnn_single_threaded; 42s local
    @mkl_dnn//:mkldnn_single_threaded; 28s local
    @mkl_dnn//:mkldnn_single_threaded; 25s local
    Compiling external/mkl_dnn/src/cpu/cpu_reorder.cpp; 23s local
    Compiling external/mkl_dnn/src/cpu/rnn/ref_rnn.cpp; 14s local
    Compiling .../xla/service/cpu/runtime_single_threaded_conv2d.cc; 9s local
    Compiling .../service/cpu/runtime_single_threaded_matmul.cc; 9s local ...
external/hwloc/hwloc/topology.c:45:10: fatal error: sys/sysctl.h: No such file or directory
 #include <sys/sysctl.h>

Steps to reproduce:

nix-shell -p python37Packages.tensorflowWithCuda
@locallycompact locallycompact added the 0.kind: bug Something is broken label Nov 24, 2020
@avdv
Copy link
Member

avdv commented Nov 26, 2020

Same problem when trying to build python36Packages.dm-sonnet which depends on tensorflow:

ERROR: /build/output/external/hwloc/BUILD.bazel:229:1: C++ compilation of rule '@hwloc//:hwloc' failed (Exit 1)
[4,944 / 5,456] 7 actions running
    Compiling tensorflow/core/util/batch_util.cc [for host]; 24s local
    Compiling .../core/framework/graph_to_functiondef.cc [for host]; 4s local
    Compiling tensorflow/core/framework/dataset.cc [for host]; 2s local
    Compiling .../core/common_runtime/bfc_allocator.cc [for host]; 0s local
    Compiling tensorflow/core/framework/collective.cc [for host]; 0s local
    Compiling .../core/common_runtime/allocator_retry.cc [for host]; 0s local
    Compiling external/hwloc/hwloc/topology-linux.c [for host]; 0s local
external/hwloc/hwloc/topology.c:45:10: fatal error: sys/sysctl.h: No such file or directory
   45 | #include <sys/sysctl.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

@avdv avdv mentioned this issue Nov 30, 2020
10 tasks
matthewbauer added a commit to matthewbauer/nixpkgs that referenced this issue Dec 30, 2020
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 tensorflow/tensorflow#45861

Fixes NixOS#104801
@matthewbauer
Copy link
Member

Should be fixed with #107944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants