tensorflow: Error with building clang unknown argument
I configured project for building and execute next command in project directory:
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
After that i get this error:
ERROR: /home/eugeny/Git/tensorflow/tensorflow/core/kernels/BUILD:3614:1: C++ compilation of rule ‘//tensorflow/core/kernels:multinomial_op_gpu’ failed: clang failed: error executing command /usr/bin/clang -MD -MF bazel-out/local_linux-py3-opt/bin/tensorflow/core/kernels/_objs/multinomial_op_gpu/tensorflow/core/kernels/multinomial_op_gpu.cu.d … (remaining 142 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. clang: error: unknown argument: ‘-nvcc_options=relaxed-constexpr’ clang: error: unknown argument: ‘-nvcc_options=ftz=true’ clang: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice. clang: error: cannot find CUDA installation. Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes. clang: error: cannot find libdevice for sm_52. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice. clang: error: cannot find CUDA installation. Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes. clang: error: cannot find CUDA installation. Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes. Target //tensorflow/cc:tutorials_example_trainer failed to build
I’m trying to build it with gpu support by using next libs:
Bazel: 0.5.1 gcc: 7.1.1 Cuda: 8 (version of cuda/bin/gcc is 5.4.0) CUDNN: 6 protobuf: 3.3.1
What shall i change for normal building?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 22 (17 by maintainers)
Commits related to this issue
- disable clang - https://github.com/tensorflow/tensorflow/issues/11043 — committed to logicalclocks/tensorflow-chef by deleted user 7 years ago
- Cuda fixes for Centos and compile from source (#10) * cudnn upgrade to 6.0 * syntax error * kernel-devel * minor * cudnn fixes * disable clang - https://github.com/tensorflow/tensorflo... — committed to logicalclocks/tensorflow-chef by deleted user 7 years ago
The build currently also fails because of an error in
configurescript. The fix should be upstream soon, the workaround before it lands is to change the following lines of.tf_configure.bazelrcfrom:to:
This should be done after running
configure.Please use
--config=cuda_clangafter configuring to build using clang. (I also think that using bazel build without--configflags should work too). We should add a check for that and provide a helpful error message.Ah sorry, didn’t realize you were still asking for help.
Can you fill out the new issue template please? In particular what OS are you using?
@gunan it looks like clang/gcc versions aren’t documented, do you know if/when we expect building with clang to work?