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

Is CentOS 6.5 supported? #1426

Closed
yhuanghamu opened this Issue Mar 8, 2016 · 15 comments

Comments

Projects
None yet
8 participants
@yhuanghamu

yhuanghamu commented Mar 8, 2016

I have try each method in installation guide to install GPU-tensorflow in my centos 6.5 server?
However, the error below is still exists.
ImportError: /lib64/libc.so.6: version GLIBC_2.14 not found (required by /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)
Is there anyone who've successfully installed tensor flow in centos 6.5?

@thinxer

This comment has been minimized.

Show comment
Hide comment
@thinxer

thinxer Mar 8, 2016

Contributor

You should build from the source code.
The pre-built binary may not work for older glibc. CentOS 6.5 has glibc 2.12 which IS too old for the pre-built binary.

Contributor

thinxer commented Mar 8, 2016

You should build from the source code.
The pre-built binary may not work for older glibc. CentOS 6.5 has glibc 2.12 which IS too old for the pre-built binary.

@yhuanghamu

This comment has been minimized.

Show comment
Hide comment
@yhuanghamu

yhuanghamu Mar 8, 2016

@thinxer Thanks for you reply.
I also try to build from source, but it failed again, it seems that it could be related to brazel,
could you please elaborate the steps to build tensor flow including the version of brazel.

yhuanghamu commented Mar 8, 2016

@thinxer Thanks for you reply.
I also try to build from source, but it failed again, it seems that it could be related to brazel,
could you please elaborate the steps to build tensor flow including the version of brazel.

@thinxer

This comment has been minimized.

Show comment
Hide comment
@thinxer

thinxer Mar 8, 2016

Contributor

I have no experience building TF on CentOS 6. I guess you need a compiler capable of C++11 features to begin with, such as GCC 4.8+.

Contributor

thinxer commented Mar 8, 2016

I have no experience building TF on CentOS 6. I guess you need a compiler capable of C++11 features to begin with, such as GCC 4.8+.

@girving

This comment has been minimized.

Show comment
Hide comment
@girving

girving Mar 8, 2016

Contributor

You'll need to provide more information if you want help. If the build failed, what was the error message, and which compiler are you using? You'll definitely need a C++11 capable compiler.

Contributor

girving commented Mar 8, 2016

You'll need to provide more information if you want help. If the build failed, what was the error message, and which compiler are you using? You'll definitely need a C++11 capable compiler.

@yhuanghamu

This comment has been minimized.

Show comment
Hide comment
@yhuanghamu

yhuanghamu Mar 8, 2016

@girving Below is the complete information
`$ python
Python 2.7.11 (default, Mar 5 2016, 20:08:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/init.py", line 50, in
from tensorflow.python.framework.framework_lib import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/framework_lib.py", line 62, in
from tensorflow.python.framework.ops import Graph
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 40, in
from tensorflow.python.framework import versions
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/versions.py", line 24, in
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: symbol memcpy, version GLIBC_2.14 not defined in file libc.so.6 with link time reference`

yhuanghamu commented Mar 8, 2016

@girving Below is the complete information
`$ python
Python 2.7.11 (default, Mar 5 2016, 20:08:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/tensorflow/init.py", line 23, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/init.py", line 50, in
from tensorflow.python.framework.framework_lib import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/framework_lib.py", line 62, in
from tensorflow.python.framework.ops import Graph
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 40, in
from tensorflow.python.framework import versions
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/versions.py", line 24, in
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: symbol memcpy, version GLIBC_2.14 not defined in file libc.so.6 with link time reference`

@yhuanghamu

This comment has been minimized.

Show comment
Hide comment
@yhuanghamu

yhuanghamu Mar 9, 2016

@thinxer I am using gcc 4.9.2.

yhuanghamu commented Mar 9, 2016

@thinxer I am using gcc 4.9.2.

@thinxer

This comment has been minimized.

Show comment
Hide comment
@thinxer

thinxer Mar 9, 2016

Contributor

So you have compiled from source successfully but cannot load it from Python?

It seems that your Python is compiled from a lower version of GCC which uses GLIBC_2.12, but the built tensorflow binary uses GLIBC 2.14.

You may try LD_PRELOAD glibc 2.14, which should be found within your GCC 4.9 installation.

Contributor

thinxer commented Mar 9, 2016

So you have compiled from source successfully but cannot load it from Python?

It seems that your Python is compiled from a lower version of GCC which uses GLIBC_2.12, but the built tensorflow binary uses GLIBC 2.14.

You may try LD_PRELOAD glibc 2.14, which should be found within your GCC 4.9 installation.

@rdipietro

This comment has been minimized.

Show comment
Hide comment
@rdipietro

rdipietro Mar 10, 2016

Contributor

See bazelbuild/bazel#760. Right now it requires customizing CROSSTOOL, but someone on the bazel team is trying to come up with a fix so that custom gcc envs are recognized and handled automatically.

Contributor

rdipietro commented Mar 10, 2016

See bazelbuild/bazel#760. Right now it requires customizing CROSSTOOL, but someone on the bazel team is trying to come up with a fix so that custom gcc envs are recognized and handled automatically.

@rdipietro

This comment has been minimized.

Show comment
Hide comment
@rdipietro

rdipietro Mar 10, 2016

Contributor

Also the LD_PRELOAD option isn't so great because it'll mess with other things. For example I use IPython, and using a different glibc leads to a memory leak with quick infinite consumption.

Contributor

rdipietro commented Mar 10, 2016

Also the LD_PRELOAD option isn't so great because it'll mess with other things. For example I use IPython, and using a different glibc leads to a memory leak with quick infinite consumption.

@girving

This comment has been minimized.

Show comment
Hide comment
@girving

girving Jun 6, 2016

Contributor

I'm going to close this since it appears to be a bazel issue. Please reopen if you think there's a fix on the TensorFlow side.

Contributor

girving commented Jun 6, 2016

I'm going to close this since it appears to be a bazel issue. Please reopen if you think there's a fix on the TensorFlow side.

@girving girving closed this Jun 6, 2016

@fbordignon

This comment has been minimized.

Show comment
Hide comment
@fbordignon

fbordignon Aug 24, 2016

I've compiled from source python 3.5 glibc 2.14 and gcc 6.2. Installed the glibc and gcc in my home directory with ./configure --prefix=~/libs. For python I did an altinstall, so now I have python 2.6 for centos to use and python 3.5 at the same time with different binaries i.e. python and python3.5 commands.
Now I have a script that puts my glibc and libstdc++ in the LD_LIBRARY_PATH before runing python3.5
Downloaded libcudnn 5.1 for cuda 7.5 from nvidia developers page and added to the ~/libs folder
I've installed cuda 7.5 from the cuda repo, hence I have nvidia driver version 352.99, cuda toolkit and everything related to cuda taken care by yum.

But when I run any tensorflow example or simple session to add 10+32 I get stuck at:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:839] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0)

with 0% of GPU utilization and python3.5 using almost all GPU memory

I'm using a GTX970
uname -a gives
Linux jigsaw 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Anything you guys can do for me?

fbordignon commented Aug 24, 2016

I've compiled from source python 3.5 glibc 2.14 and gcc 6.2. Installed the glibc and gcc in my home directory with ./configure --prefix=~/libs. For python I did an altinstall, so now I have python 2.6 for centos to use and python 3.5 at the same time with different binaries i.e. python and python3.5 commands.
Now I have a script that puts my glibc and libstdc++ in the LD_LIBRARY_PATH before runing python3.5
Downloaded libcudnn 5.1 for cuda 7.5 from nvidia developers page and added to the ~/libs folder
I've installed cuda 7.5 from the cuda repo, hence I have nvidia driver version 352.99, cuda toolkit and everything related to cuda taken care by yum.

But when I run any tensorflow example or simple session to add 10+32 I get stuck at:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:839] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0)

with 0% of GPU utilization and python3.5 using almost all GPU memory

I'm using a GTX970
uname -a gives
Linux jigsaw 2.6.32-504.23.4.el6.x86_64 #1 SMP Tue Jun 9 20:57:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Anything you guys can do for me?

@zym1010

This comment has been minimized.

Show comment
Hide comment
@zym1010

zym1010 Sep 27, 2016

I have succeeded in compiling a GPU, Python 3.5 version of TensorFlow 0.10.0 on a CentOS 6 Docker, and it ran well on our university's CentOS 6 cluster. Check https://github.com/leelabcnbc/DevOps/tree/master/Docker. Basically, it's replacing some hardcoded lines in CROSSTOOL-related items, and adding -lm to everything to prevent errors like #2291. I think Google can make compiling TensorFlow on CentOS less frustrating, if they make some hardcoded stuff link to correct locations.

zym1010 commented Sep 27, 2016

I have succeeded in compiling a GPU, Python 3.5 version of TensorFlow 0.10.0 on a CentOS 6 Docker, and it ran well on our university's CentOS 6 cluster. Check https://github.com/leelabcnbc/DevOps/tree/master/Docker. Basically, it's replacing some hardcoded lines in CROSSTOOL-related items, and adding -lm to everything to prevent errors like #2291. I think Google can make compiling TensorFlow on CentOS less frustrating, if they make some hardcoded stuff link to correct locations.

@i3v

This comment has been minimized.

Show comment
Hide comment
@i3v

i3v Dec 7, 2016

I was able to build tensorflow 0.12rc0 on CentOS6.5 without having root privileges, and it seem to work OK with glibc 2.12, without any LD_LIBRARY_PATH or LD_PRELOAD tricks. It looks like the key is to statically link necessary libraries, e.g. with -lm, like it was just mentioned by @zym1010 (I've also added -lrt).

i3v commented Dec 7, 2016

I was able to build tensorflow 0.12rc0 on CentOS6.5 without having root privileges, and it seem to work OK with glibc 2.12, without any LD_LIBRARY_PATH or LD_PRELOAD tricks. It looks like the key is to statically link necessary libraries, e.g. with -lm, like it was just mentioned by @zym1010 (I've also added -lrt).

@jimht011

This comment has been minimized.

Show comment
Hide comment
@jimht011

jimht011 Jan 5, 2017

@i3v and @zym1010 When you compile the tensorflow, which version of bazel you installed in your box?
Very appreciate your answer

jimht011 commented Jan 5, 2017

@i3v and @zym1010 When you compile the tensorflow, which version of bazel you installed in your box?
Very appreciate your answer

@i3v

This comment has been minimized.

Show comment
Hide comment
@i3v

i3v Jan 5, 2017

@jimht011
I've used bazel-0.4.1, just because it was the latest at that time. And bazel-0.4.0 few days before that (for just the same reason).

i3v commented Jan 5, 2017

@jimht011
I've used bazel-0.4.1, just because it was the latest at that time. And bazel-0.4.0 few days before that (for just the same reason).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment