Skip to content

Compile bazel error: Executing genrule //src/main/protobuf:command_server_cc_proto_codegen failed: process-wrapper failed... #4

@linrio

Description

@linrio

I want to install bazel by compiling source from bazel. $cd bazel, then I run $./compile.sh. It occurs error:

*OS:
Linux k20-1 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

*GCC version:

[llf@k20-1 lib64]$ gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc4.8.2/libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:../configure --prefix=/usr/local/gcc4.8.2/ --enable-threads=posix --disable-checking --enable-languages=c,c++ --disable-multilib
线程模型:posix
gcc 版本 4.8.2 (GCC) 

The compile error:

[llf@k20-1 bazel]$ ./compile.sh 
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: /tmp/bazel_EuUM0clx/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_EuUM0clx/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions.
INFO: Found 1 target...
INFO: From Compiling src/main/cpp/blaze_util.cc:
src/main/cpp/blaze_util.cc: In function 'uint64_t blaze::AcquireLock(const string&, bool, bool, blaze::BlazeLock*)':
src/main/cpp/blaze_util.cc:421:30: warning: ignoring return value of 'int ftruncate(int, __off_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void) ftruncate(lockfd, 0);
                              ^
src/main/cpp/blaze_util.cc:426:47: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void) write(lockfd, msg.data(), msg.size());
                                               ^
INFO: From Compiling src/main/cpp/blaze_util_posix.cc:
src/main/cpp/blaze_util_posix.cc: In function 'void blaze::Daemonize(const string&)':
src/main/cpp/blaze_util_posix.cc:104:28: warning: ignoring return value of 'int dup(int)', declared with attribute warn_unused_result [-Wunused-result]
   (void) dup(STDOUT_FILENO);  // stderr (2>&1)
                            ^
INFO: From JavacBootstrap src/java_tools/buildjar/java/com/google/devtools/build/buildjar/libbootstrap_JarOwner.jar [for host]:
warning: Implicitly compiled files were not subject to annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
1 warning
ERROR: /home/llf/bazel/src/main/protobuf/BUILD:36:1: Executing genrule //src/main/protobuf:command_server_cc_proto_codegen failed: process-wrapper failed: error executing command 
  (cd /tmp/bazel_EuUM0clx/out/bazel-sandbox/a95caa17-3b0c-4368-8de3-92f81b4fe053-666/execroot/bazel && \
  exec env - \
    LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64::/usr/local/lib \
    PATH=/home/llf/anaconda3/bin:/usr/local/cuda-7.5/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/home/llf/usr/local/python/bin:/home/llf/usr/local/gmp-1/bin:/home/llf/usr/local/bazel/bin:/home/llf/usr/local/python/bin:/usr/local/cuda/bin/:/usr/bin/java:/usr/java/jdk1.8.0_111/bin \
  /tmp/bazel_EuUM0clx/out/execroot/bazel/_bin/process-wrapper -1 5 - - /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; third_party/protobuf/3.0.0/protoc-3.0.0-linux-x86_64.exe\
    --plugin=protoc-gen-grpc=bazel-out/host/bin/third_party/grpc/cpp_plugin\
    --cpp_out=bazel-out/local-opt/genfiles\
    --grpc_out=bazel-out/local-opt/genfiles\
    src/main/protobuf/command_server.proto').
bazel-out/host/bin/third_party/grpc/cpp_plugin: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by bazel-out/host/bin/third_party/grpc/cpp_plugin)
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.
Target //src:bazel failed to build
INFO: Elapsed time: 45.674s, Critical Path: 40.50s

ERROR: Could not build Bazel

How to address this problem? Refence the error

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions