-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
failed to install bazel on Red Hat 6.7 #760
Comments
Have you updated the path to GCC / libraris in the tools/cpp/CROSSTOOL file? |
@damienmg Yes, I have tried. But there are many entries in tools/cpp/CROSSTOOl. I am not sure I have updated everything. I tried the following but it didn't work. In CROSSTOOL, I changed cpp path, gcc path and added cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib64/", cxx_builtin_include_directory: "/usr/local/gcc/4.8.4/lib/"
I set the environment variable and compile
I got errors.
It seems bazel is not picking up the right library. What else should I update in tools/cpp/CROSSTOOL? Am I using the run time environment variables correctly? |
There you are failing at the first step you should export CXX, CC, LDFLAGS and CXXFLAGS I am removing the need for this, but it's still there for now. |
Tried again I still got the same error.
|
Like exactly the same (at the same place, concerning output/bazel)? Also can you try a more recent version of bazel (0.1.3 should work nicely) |
@damienmg The error was exactly the same. I also tried 0.1.3. After I export flags and update CROSSTOOL, I got the same error again.
I suspect I did not update CROSSTOOL correctly. I only changed the following lines:
and add following lines
is there other places I need to update on CROSSTOOLS? |
:( By the end of the week my changes for the bootstrap part should be in so it should go further. I have no idea why it is happening though. |
@damienmg I made some progress. I am getting different errors after I do
But now I am getting:
Where should I put --ignore_unsupported_sandboxing to disable sandbox? Is sandbox is the culprit? |
@damienmg have you finished the bootstrap part? Maybe I can test it on redhat 6.7? |
@digitalsword I am still trying to get them merged, some changes have landed already (0a7a3d2 and 12c68a) but there are more to do. It should land next week. Then I can concentrate on the auto-configuration mechanism for Bazel. For your specific issue, you need to add |
@damienmg I am running into the glib version issue again. When you finish auto-configuration part, can you give me instructions on using auto configuration on Redhat 6.7? Thanks! |
Sure but this will take a few more months before being ready :( |
@damienmg I am able to compile the head version of bazel, however, when I try to compile tensorflow, I get glib error again.
I used these commands to compile tensorflow
Is there any environment variable to be set when using bazel to compile tensorflow, in other words how can I force bazel to use the newer glib library. |
With the latest change, if you pass compile.sh then only the CROSSTOOL files change should be important. How did you modified your CROSSTOOL file? |
change CROSSTOOL file to:
and just compile with:
|
Invoking @ulfjack who knows more about C++. |
Tricky, since I can't reproduce the issue. I tried downloading a docker image for rhel6.7, but I can't seem to figure out how to install stuff on it. The env variables are ignored by Bazel, and the compile.sh should no longer compile any C++ code. Therefore, any errors you get have to be from a run of Bazel itself, and the only way to fix them is to change the CROSSTOOL file. If you have a C++ binary that tries to load the wrong dynamic library, try running ldd on it, and see what that says. The dynamic linker by default uses a search path baked into the binary, and it would be good if we could check that. If that needs to be changed, we'll have to figure out how to do that. I don't know of the top of my head. |
(not all the env variable are ignored, JAVA_HOME is used) |
@ulfjack @damienmg thank you for your replies. It is mentioned that
I think that's the reason that bazel ignores GLIBCXX placed in directories among I worked on Cent OS 6.x. This issue happens when I built bazel 0.1.4 from source with Customization made to
|
Could you try at HEAD? I removed most C++ compilation from the first steps On Fri, Jan 22, 2016 at 2:11 PM 健美猫 notifications@github.com wrote:
|
For printing all action, use -s. With the compile script, do On Fri, Jan 22, 2016 at 2:13 PM Damien Martin-guillerez dmarting@google.com
|
I tried the head version(0bf232e). It failed with different messages which are less meaningful compared to version 0.1.4. According to the output given by
|
can you set EXTRA_BAZEL_ARGS='--verbose_failures' and show a bit more of the output log? |
Sure thing. Here it comes. I am planning give it a try, running the long coamnnd
|
I still cannot spot the error, can you execute the last command outside of bazel:
If it passes, can you try setting |
Hmm, I am trying to run the long coammand without basel, finding that some intermedia directories are missing.
So, the long command seems to exit all the time as it tries to operate on invalid directories. |
oh yes, can you try to comment out that line: Then rerun the compile.sh script with verbose_failures and again try to run the failing command outside of bazel? |
It seems that we are making some progress. I got a very clear error message this time. It is
|
I would like to thank everyone involved in this issue for their efforts. I am in a similar situation as @rdipietro, trying to compile bazel on a cluster with a custom gcc location but standard ld location ( |
Thanks for the feedback :) |
Fixes #760. -- MOS_MIGRATED_REVID=120217217
Fixes #760. -- MOS_MIGRATED_REVID=120217217
When using an newer GCC on CentOS 6.7 (e.g. GCC 4.9.3) a newer version of binutils is also required. The fix of adding It could be done by having something like:
twice in cc_configure.bzl I've managed to compile bazel using this line instead of |
fyi. EasyBuild tool resolves much of the automation needs across binutils+GCC deliveries and does the task consistently; it relies upon environment-modules, in case you care about that part. |
I was able to build bazel-0.4.1 and tensorflow-0.12.0rc0 from source, without having root privileges. The system only had gcc-4.4.7, so I had to use my own gcc-4.9.4. |
It seems most effort here is to use a new gcc and glibc other than the default one in old version OS such as centos 6. But our case is a little different. We use javacpp to load tensorflow trained model . Unfortunately, our J2EE environment is still using RHEL 6.8 which has glibc 2.12. Obviously, the two tensorflow libraries published by google were built in an environment with a glibc equal or higher than 2.14. It seems Bazel needs 2.14 or higher version to run . Is there a way we can run bazel against glibc 2.14 or higher but compile tensorflow against glibc 2.12 ? Appreciate your comments. |
Hi @jimht011: can you open a separate issue for helping for your case? |
I also was able to build Bazel 0.4.4 and Tensorflow v1.0.0-rc2 on CentOS 6.8. What about the GLIBC library? Well I was using the GLIBC_2.14 version on my CentOS. How? I took the version included by NoMachine (more info here https://www.nomachine.com/download/download&id=5). Once installed, you can import that library in a session terminal (tmux) with the following command: export LD_LIBRARY_PATH="/usr/NX/lib:/opt/glibc-2.14/lib:$LD_LIBRARY_PATH" |
Always adding -B/usr/bin is wrong, it breaks EasyBuild Tensorflow builds on CentOS6, since the assembler there is too old. |
I agree with @blappm, hard-coding |
Why can't bazel simply respect my PATH? Such was what I kept screaming to google until it led me to this issue. When I set up my compiler tool chain, I expect the first cc and ld found in my PATH to be the working combination. Yet bazel secretly used my cc and instructed my cc to pick a funny ld. |
@jxy Same problems making me crazy! |
##@jxy while building tensorflow-gpu from source, it worked to change |
I would like to install bazel from source, and use bazel to compile tensorflow on a cluster running redhat 6.7. When I try to install bazel, the glibc version (2.12) is too old. I do not have root access to the cluster. Is it possible to install tensorflow in this case?
My system information:
The system has newer gcc installed as well. I tried using it, bazel still won't compile.
When I was compiling bazel using gcc 4.8.4, I got the following error:
How can I install the missing dependency locally, and have bazel pick up the right version of glib? What part of tools/cpp/CROSSTOOL should I modify? What environment variables should I set before ./compile.sh
I am trying to install bazel-0.1.1 instead of bazel-0.1.2 because the latter does not compile tensorflow.
tensorflow/tensorflow#469
The text was updated successfully, but these errors were encountered: