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
Version `GLIBCXX_3.4.18' not found when compiling tensorflow example #1358
Comments
This two commands basically replace the location of gcc with the real location on your machine in the CROSSTOOL file. //cc @damienmg Is it the right solution? |
No this is not. The problem is with the protocompiler that TensorFlow drag in. I am taking a guess here: protoc is compiled with Pulling in @davidzchen who did modifications to the protobuf build for TensorFlow. |
Thanks meteorcloudy, I have done that and it did indeed fix certain bugs I encountered, but not this one. |
@kheuton I'm curious, do you have LD_LIBRARY_PATH set in the environment where you run Bazel? |
Thanks for asking @philwo, I do have |
I'm not sure if I can re-open the issue, but the latest commit doesn't appear to fix the problem. I am still seeing the same errors:
|
Protobuf rules should set use_default_shell_env for invoking the protobuf compiler |
@kheuton Yes, definitely reopen bugs if they're not actually fixed by commits :) Damien is right - your build is proceeding a bit more than before now, but now stumbles upon the protobuf rules, which do not set use_default_shell_env, so they're not picking up the LD_LIBRARY_PATH that seems to be necessary on your system. I'll see what I can do about that. We're also working on a real fix for this whole issue and think we have mostly figured it out, but implementation will take a few days. |
@philwo what's the work-around, i am stuck here |
Confirming that c9bc051 does not fix this issue. The problem seems to be the bazel file Other parts of tensorflow invoke the right env command. For example:
The change adds the LD_LIBRARY_PATH with:
However, with protobuf neither the PATH nor LD_LIBRARY_PATH are passed:
Further, checking the dependencies of protoc shows that they are set correctly
Added an issue in tensorflow tensorflow/tensorflow#3261 since this seems to be more of a tensorflow bazel configuration issue than one with bazel. |
@kheuton You can add env=ctx.configuration.default_shell_env to the ctx.action call in bazel-tensorflow/external/protobuf/protobuf.bzl to get past the problem. |
Thanks @gbkedar, however, now I end up with: Running |
@kheuton in third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc |
Closing as the problem should be fixed on protobuf and tensorflow. |
Thanks @damienmg, so you're saying there is no fix in bazel? Where should I move the issue, to both protobuf and tensorflow? Or is it just a protobuf thing? |
@gbkedar Your comment from Jul 12 got me through this error after several hours of adjusting CROSSTOOL and recompile attempts! Thanks! (I was using the latest bazel build 0.3.2-2016-11-02 (@03afc7d) and tensorflow v0.11.0rc1) I wanted to document my steps for other users attempting to compile tensorflow without root on a cluster. This is the first link that pops up in a google search of the error and the only one that helped so I thought I'd post the info here in hopes of saving others the hours I spent trying to get past this error. I was able to compile bazel from source, compile tensorflow from source, and successfully pip install from the created .whl file after adding the line from the Jul 12 comment above. Please find a more detailed explanation of my steps here: |
I was also able to compile using the hack suggested by @gbkedar and with help of instructions provided by @taylorpaul |
@taylorpaul 's guide is nice, but it looks like there's a simpler way to fix I've not tried his trick with copying "as", though (if it works, it should be faster and simplier workaround), instead, I've recompiled gcc, hardcoding paths to |
@taylorpaul 's fix for the GLIBCXX issue worked for me. Thanks. |
Hi all,
I'm trying to install bazel and tensorflow with cuda support in my home directory on a network drive of a research cluster. I am building them using tools from a conda virtual environment, so almost nothing I have is in a default location.
Bazel version: 0.2.3 tag from the master branch
Gcc version: gcc version 4.8.5 (GCC)
When building the first tensorflow example, I get this error:
/homes/krheuton/bazel/output/bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer --verbose_failures
........
INFO: Found 1 target...
This seems to mirror issue #898 but I can't quite determine what the resolution was there.
The text was updated successfully, but these errors were encountered: