-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Faile to install bazel in linux #1152
Comments
what does your CC environment variable contains?
|
Now I git clone again, g++ -I. -std=c++0x -c -DBLAZE_JAVA_CPU="k8" -DBLAZE_OPENSOURCE=1 -o /tmp/bazel.yc0Q2G6i/objs/blaze_startup_options.cc.o src/main/cpp/blaze_startup_options.cc [@sjs_88_78 bazel]$ echo $CC [@sjs_88_78 bazel]$ gcc --version [@sjs_88_78 bazel]$ ls -rlt /usr/bin/g++ |
Use 0.2.1 instead: |
Now it report that |
Oh I know that error, it is the same as #760 |
Can you retry with |
ok,i try it now |
still failed. |
do i have the correct step? |
what does |
[@bjzw_28_31bazel]$ git log -1 --oneline |
|
oh I see, |
unset CC,and |
INFO: You can skip this first step by providing a path to the bazel binary as second argument: Building output/bazel |
can you comment this line on your clone: https://github.com/bazelbuild/bazel/blob/master/scripts/bootstrap/buildenv.sh#L96 then rerun compile.sh and you will get another of:
then copy-pasting the command and adding the Also what is your system distribution? |
I don't get what you mean. |
ERROR: /search/liudewei/tensorflow/bazel/src/main/tools/BUILD:26:1: C++ compilation of rule '//src/main/tools:build-runfiles' failed: gcc failed: error executing command |
it is redhat6. |
<-- just running that |
env: /tmp/bazel.FiLNjMId/out/external/local_config_cc/gcc : No such file or directory |
|
[@sjs_88_78 ]$ echo ${CC-x} |
I am totally at lost, here the code that does the gcc detection: https://github.com/bazelbuild/bazel/blob/master/tools/cpp/cc_configure.bzl#L265 can you add a line with Totally sorry for that mess, it is way more tricky that expected. |
[@sjs_88_78 bazel]$ sh compile.sh |
Thanks, I think I understand that precise issue. The space after To check, can you do: Sorry again for all the troubles. |
[@sjs_88_78 bazel]$ echo "x${CC}x" [@sjs_88_78 bazel]$ unset CC |
Ok sorry for all the trouble again, I need to figure out a better way to get the -B directory |
seems like it is in the output of gcc -E in the |
Ok bug #1201 gave a workaround (I should have though of it): We should cover for that use-case anyway, so two thing to fix:
|
@liumilan: Did the Still looking at how to do it correctly for both clang and gcc |
Not yet. |
Glad you find a workaround. I have all the information I needed I think I can reproduce this bug but I need to think a bit more about the solution. |
The workaround is I install tensorflow using pip,not bazel |
What's the error you're getting? |
- Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. - Fixes issue bazelbuild#5634 It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" And that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. bazelbuild#1152. Also this may have "fixed" the hombrew builds for bazelbuild#1177. Testing Done: local build of envoy on older host using non-host crosscompiler. Build fails without the fix and succeeds with the fix.
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. Fixes issue bazelbuild#5634 Archeaology: It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" .. and that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. bazelbuild#1152. This may have also "fixed" the hombrew builds for bazelbuild#1177. Testing Done: * Building envoy on older Centos host using non-host crosscompiler. Build fails without the fix and succeeds with the fix. * bazel test //src/test/java/com/google/devtools/build/lib:all 1 flaky test failed before and after: bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. Fixes bazelbuild#5634 Archeaology: It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" .. and that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. bazelbuild#1152. This may have also "fixed" the hombrew builds for bazelbuild#1177. Testing Done: * Building envoy on older Centos host using non-host crosscompiler. Build fails without the fix and succeeds with the fix. * bazel test //src/test/java/com/google/devtools/build/lib:all 1 flaky test failed before and after: bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. Fixes bazelbuild#5634 Archeaology: It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" .. and that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. bazelbuild#1152. This may have also "fixed" the hombrew builds for bazelbuild#1177. Testing Done: * Building envoy on older Centos host using non-host crosscompiler. Build fails without the fix and succeeds with the fix. * bazel test //src/test/java/com/google/devtools/build/lib:all 1 flaky test failed before and after: bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. Fixes bazelbuild#5634 Archeaology: It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" .. and that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. bazelbuild#1152. This may have also "fixed" the hombrew builds for bazelbuild#1177. Testing Done: * Building envoy on older Centos host using non-host crosscompiler. Build fails without the fix and succeeds with the fix. * bazel test //src/test/java/com/google/devtools/build/lib:all 1 flaky test failed before and after: bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain since support binaries such as ld, as, etc., will incorrectly "leak" to the build machine. Fixes #5634 Archeaology: It looks like this logic was originally added here: 810d60a Apr 22 2016 dmarting@google.com "cc_configure: Add -B to compiler flag too" .. and that that was done to get Tensor Flow building on some (but failing on other?) versions of RedHat. #1152. This may have also "fixed" the hombrew builds for #1177. Testing Done: * Building envoy on older Centos host using non-host crosscompiler. Build fails without the fix and succeeds with the fix. * bazel test //src/test/java/com/google/devtools/build/lib:all 1 flaky test failed before and after: bazel test //src/test/java/com/google/devtools/build/lib:vfs_test Closes #6360. PiperOrigin-RevId: 217338797
The error as below:
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: compile.sh compile /path/to/bazel
Building Bazel from scratch......
Building Bazel with Bazel.
WARNING: /search/david/bazel-master/src/main/native/BUILD:46:16: in includes attribute of cc_binary rule //src/main/native:libunix.so: '.' resolves to 'src/main/native' not in 'third_party'. This will be an error in the future.
WARNING: /search/david/bazel-master/src/main/protobuf/BUILD:36:1: in includes attribute of cc_library rule //src/main/protobuf:command_server_cc_proto: '.' resolves to 'src/main/protobuf' not in 'third_party'. This will be an error in the future. Since this rule was created by the macro 'cc_grpc_library', the error might have been caused by the macro implementation in /search/david/bazel-master/tools/build_rules/genproto.bzl:104:18.
INFO: Found 1 target...
ERROR: /search/david/bazel-master/src/main/cpp/BUILD:53:1: C++ compilation of rule '//src/main/cpp:blaze_abrupt_exit' failed: gcc -std=gnu99 failed: error executing command
(cd /tmp/bazel.MM2za3vz/out/bazel-master && \
exec env - \
PATH=/usr/local/cuda-7.0/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/go/bin:/home/david/bin \
'/tmp/bazel.MM2za3vz/out/external/local_config_cc/gcc -std=gnu99' -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -iquote . -iquote bazel-out/local-fastbuild/genfiles -iquote external/bazel_tools -iquote bazel-out/local-fastbuild/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -no-canonical-prefixes -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-frandom-seed=bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.o' -MD -MF bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.d -fPIC -c src/main/cpp/blaze_abrupt_exit.cc -o bazel-out/local-fastbuild/bin/src/main/cpp/_objs/blaze_abrupt_exit/src/main/cpp/blaze_abrupt_exit.pic.o): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
/tmp/bazel.MM2za3vz/out/bazel-master/_bin/process-wrapper: line 12: /tmp/bazel.MM2za3vz/out/external/local_config_cc/gcc -std=gnu99: No such file or directory
Target //src:bazel failed to build
INFO: Elapsed time: 3.054s, Critical Path: 0.19s
The bazel.MM2za3vz is created tmp.And the gcc is not in this dir.How can be fixed
The text was updated successfully, but these errors were encountered: