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

crosstool_wrapper_driver_is_not_gcc failed: python2: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory #1870

Closed
kmuriki opened this issue Apr 12, 2016 · 11 comments
Assignees
Labels
stat:community support Status - Community Support

Comments

@kmuriki
Copy link

kmuriki commented Apr 12, 2016

Environment info

Operating System: Scientific Linux 6.5

Installed version of CUDA and cuDNN:
CUDA - 7.5.18
CuDNN - 4.0.7

Tensorflow installation attempt from source..

ERROR: /global/home/users/kmuriki/.cache/bazel/_bazel_kmuriki/7a46079e1611cbcdacd2bbe4113de14c/external/re2/BUILD:9:1: C++ compilation of rule '@re2//:re2' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 36 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
python2: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

python2 on my machine is located here : /global/software/sl-6.x86_64/modules/langs/python/2.7.8/bin/python2 and I do have libpython2.7.so.1.0 located here: /global/software/sl-6.x86_64/modules/langs/python/2.7.8/lib/libpython2.7.so.1.0.

LD_LIBRARY_PATH points to /global/software/sl-6.x86_64/modules/langs/python/2.7.8/lib

$ python-config --ldflags
-lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic

What else am I missing ?

@mlopezantequera
Copy link

mlopezantequera commented May 27, 2016

I'm having the same issue in a cluster with CentOS 6.7, also installing from source, following the instructions from #110

/home/p269371/.cache/bazel/_bazel_p269371/62515d408409b93db1ccb498556e2fe0/external/protobuf/BUILD:71:1: C++ compilation of rule '@protobuf//:protobuf_lite' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object ... (remaining 42 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
/software/software/Python/2.7.11-foss-2016a/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.811s, Critical Path: 0.08s

$python-config --ldflags
-lpython2.7 -ldl -lm -lpthread -lutil -lm -Xlinker -export-dynamic
$python-config --includes
-I/software/software/Python/2.7.11-foss-2016a/include/python2.7 -I/software/software/Python/2.7.11-foss-2016a/include/python2.7
$python-config --libs
-lpython2.7 -ldl -lm -lpthread -lutil -lm
$python-config --prefix
/software/software/Python/2.7.11-foss-2016a
$python-config --exec-prefix
/software/software/Python/2.7.11-foss-2016a

$ ls /software/software/Python/2.7.11-foss-2016a/lib
libpython2.7.so libpython2.7.so.1.0 pkgconfig python2.7

from distutils import sysconfig
print sysconfig.get_config_vars('LIBPL')
['/software/software/Python/2.7.11-foss-2016a/lib/python2.7/config']

$ls /software/software/Python/2.7.11-foss-2016a/lib/python2.7/config
config.c config.c.in install-sh libpython2.7.a Makefile makesetup python.o Setup Setup.config Setup.local

Someone solved it by installing python elsewhere: #414, I'd like to avoid that.

@keveman
Copy link
Contributor

keveman commented Jun 7, 2016

@kmuriki What location did you enter for python while running ./configure?

@girving girving added the stat:awaiting response Status - Awaiting response from author label Jun 8, 2016
@keveman
Copy link
Contributor

keveman commented Jun 13, 2016

@kmuriki Gentle ping. Please let me know if this is still an issue.

@kmuriki
Copy link
Author

kmuriki commented Jun 13, 2016

Manjunath,

Thanks for writing back to me. Its been couple of weeks since I tried this
and did not get a chance yet to attempt it again. I'm busy with other
deadlines all this week. Hopefully I will have some free time later this
week or early next week. I will attempt building from scratch once again
and write back to you.

Just to answer your earlier question we do not install Python to the
standard /usr/local kind of folders in our infrastructure. We have it
installed on a central storage server which is NFS mounted at a path like
/global/software/sl-6.x86_64/modules/langs/python/2.7.8/bin. We update all
the appropriate env variables PATH, LD_LIBRARY_PATH, LIBRARY_PATH and
PYTHONPATH.

Thanks,
Krishna.

On Mon, Jun 13, 2016 at 7:43 AM, Manjunath Kudlur notifications@github.com
wrote:

@kmuriki https://github.com/kmuriki Gentle ping. Please let me know if
this is still an issue.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1870 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ACQb9l8sN8HiQGuc0fgOzH1a2mlYnYQBks5qLWx7gaJpZM4IFGcQ
.

@efritzilas
Copy link

Same behaviour as @mlopezantequera when trying to build on CentOS 6.7. My debug output is the same, expect for the actual installation directory of Python that is different in my case.

If that matters, I'm running Python 2.7.10 using environment modules, so LD_LIBRARY_PATH etc are all set up correctly. The actual Python binary and libs have been built with EasyBuild.

@aselle aselle added stat:community support Status - Community Support and removed stat:awaiting response Status - Awaiting response from author labels Jul 7, 2016
@mukul1992
Copy link

mukul1992 commented Jul 14, 2016

I am having the same issue on CentOs 6.7. Now I am using Bazel version 0.3.0 to compile tensorflow 0.9.0. How to make bazel recognize LD_LIBRARY_PATH is the question. #110 includes step-wise directions including a couple of hacks but does not work for me. Still getting the libpython not found error.

@mukul1992
Copy link

mukul1992 commented Jul 21, 2016

A polite reminder to all participants. Kindly do share the solution to this issue if you found one.

@ejspence
Copy link

I'm having the same issue. I can get tensorflow to install from source without GPU support enabled. But with GPU support, on CentOS 6.4, it can't find libpython.so.1.0. Python is installed in a non-standard location. Suggestions would be welcome.

@kamal94
Copy link

kamal94 commented Sep 24, 2016

Same problem here.

@jonaschen16
Copy link

jonaschen16 commented Nov 18, 2016

Did it happen because of upgrading from python2.6 to 2.7?
I ran into similar problems when I use some tools after upgrading python.
If your python2.6 still in the system, please try to make the link for python2 back to python2.6.
Like this: https://youtu.be/R8Z5K2u5mag
I am not sure if this solution fits to you, but it solve my problem.
Good luck!

@keveman
Copy link
Contributor

keveman commented Apr 26, 2017

Closing because of inactivity.

@keveman keveman closed this as completed Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:community support Status - Community Support
Projects
None yet
Development

No branches or pull requests

10 participants