Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found
NickName:Feynman27 Ask DateTime:2016-09-27T22:26:55

Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found

I'm on Ubuntu 16.04 and am trying to build TensorFlow with GPU support from source according to this. Everything works fine until the "Build TensorFlow" step, in which I execute:

bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

The compilation hits an error with output:

ERROR: /home/thomas/tensorflow/tensorflow/core/BUILD:978:28: Executing genrule //tensorflow/core:proto_text_srcs_all failed: bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions: /home/thomas/anaconda2/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by bazel-out/host/bin/tensorflow/tools/proto_text/gen_proto_text_functions)
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.

My suspicion is that the error has something to do with anaconda since bazel seems to be looking for libstdc++.so from within ~/anaconda2/lib.

Copyright Notice:Content Author:「Feynman27」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39727327/building-tensorflow-from-source-on-ubuntu-16-04-w-gpu-glibcxx-3-4-20-not-fou

Answers
Feynman27 2016-10-21T16:59:38

This command seemed to fix my problem:\n\nconda install libgcc\n\n\nfrom here.",


More about “Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found” related questions

Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found

I'm on Ubuntu 16.04 and am trying to build TensorFlow with GPU support from source according to this. Everything works fine until the "Build TensorFlow" step, in which I execute: bazel build -c op...

Show Detail

How to install Tensorflow GPU on ubuntu 16.04

I am using AWS P2 gpu instance with Tesla K80 GPU and Ubuntu 16.04 LTS. Installing Tensorflow for CPU is easy: pip install tensorflow But Installing Tensorflow for GPU doesnt work : pip install

Show Detail

problems with installation tensorflow from source on ubuntu 16 with gpu

I have ubuntu 16.04 I have installed CUDA 7.5 from Ubuntu repo and cuDNN 5.1.3 for CUDA 7.5 and ran CUDA examples that works, same for pycuda and I want to install tensorflow from source with gpu s...

Show Detail

How to install Tensorflow-GPU on ubuntu

How to install Tensorflow-GPU on ubuntu 16.04 I am using GeForce-710M GPU on my laptop and UBUNTU 16.04 LTS. installing tensorflow-gpu is too hard for me and i searched a lot, but i didn't get a good

Show Detail

Building tensorflow-serving docker gpu from source with docker?

I have followed these steps for building docker from source, git clone https://github.com/tensorflow/serving cd serving docker build --pull -t $USER/tensorflow-serving-devel-gpu \ -f

Show Detail

Tensorflow installation error: GPU version on Ubuntu 16.04

I have tried to install gpu version of tensorflow from following 2 method but getting same error at last step: https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-

Show Detail

Unable to configure tensorflow to use GPU acceleration in Ubuntu 16.04

I am trying to install Tensorflow in Ubuntu 16.04 ( in google cloud ). What I have done so far is created an compute instance. I have added a NVIDIA Tesla K80 to this instance. Also, made sure th...

Show Detail

I'm trying to use tensorflow on my ubuntu 16.04 machine, but even after installing tensorflow gpu; I cant use gpu for my tensorflow

I'm trying to use tensorflow GPU on my ubuntu 16.04 machine. I've successfuly installed CUDA toolkit (8.0.61) and cuDNN (6.0.21). The problem is, I can't use tensorflow gpu even after this installt...

Show Detail

tensorflow-gpu and cuDNN not properly installed on Ubuntu 16.04

I installed CUDA 8.0 on Ubuntu 16.04 (x86_64) with NVidia Geforce GTX 950M (driver 381) in an ASUS K501UX laptop. After CUDA installation, I'm able to run deviceQuery and bandwidthTest, according t...

Show Detail

Failed to install tensorflow with Ubuntu 16.04 and CUDA 8.0

Does anyone successed install TensorFlow with following combination? Ubuntu 16.04 (Just newly installed and apt upgraded) Nvidia Driver: nvidia-370 (sudo apt install nvidia-370) Bazel 0.3.1 (install

Show Detail