Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Build fails on Ubuntu 16.04 LTS, CUDA Toolkit 8.0, cuDNN 5.0.5, and Bazel 0.3.0-jdk7 #3526
I've downgraded my gcc to 5.3.0 by building from source in order to install CUDA Toolkit 8.0 with cuDNN 5.0.5. I also installed OpenCL freeglut3 and mesa libraries via apt-get. I then built Bazel from source using the installer script. Next, I installed the TensorFlow and Google Cloud Platform Python dependencies. I then cloned the tensorflow GitHub repository and modified the CROSSTOOL file variable cxx_builtin_include_directory to include the gcc location for 5.3.0. I then ran ./configure with default settings and tried to build with Bazel, but it always fails with an error like this, which appears to be a gcc issue:
WARNING: /root/.cache/bazel/_bazel_root/fbc06f9baef46cade6e35d9e4137e37c/external/protobuf/WORKSPACE:1: Workspace name in /root/.cache/bazel/_bazel_root/fbc06f9baef46cade6e35d9e4137e37c/external/protobuf/WORKSPACE (@main) does not match the name given in the repository's definition (@protobuf); this will cause a build error in future versions.
ERROR: /root/.cache/bazel/_bazel_root/fbc06f9baef46cade6e35d9e4137e37c/external/zlib_archive/BUILD:7:1: undeclared inclusion(s) in rule '@zlib_archive//:zlib'
This rule is missing dependency declarations for the following files included by 'external/zlib_archive/zlib-1.2.8/inftrees.c':
If I change the gcc version to 4.8 (installed via apt-get) in ./configure and revert CROSSTOOL I get many warnings:
This warning is followed by an error:
This time, it appears to be an issue with CUDA Toolkit 8.0. Everything seems to work flawlessly up until building tensorflow from source.
It looks like the solution of @yaroslavvb should work for the install with gcc 4.8.
Since I'm not running Pascal architecture GPUs, but rather a node with four GeForce GTX Titan X GPUs, I ended up installing the latest CUDA 367.35 display drivers from ppa (the display drivers included with CUDA Toolkit 7.5 cause
Recommended: Install OpenCL libraries
Install CUDA Toolkit 7.5 and 367.xx display driver from Ubuntu 16.04 apt-get
Install cuDNN 5.0.5
Install TensorFlow from binary for CUDA Toolkit 7.5