You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sh 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_XnUx9q4j/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_XnUx9q4j/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.
WARNING: /home/wangleikidding/bazel/tools/build_rules/java_rules_skylark.bzl:185:13: Variables HOST_CFG and DATA_CFG are deprecated in favor of strings "host" and "data" correspondingly.
INFO: Found 1 target...
INFO: From Compiling src/main/tools/build-runfiles.cc:
src/main/tools/build-runfiles.cc: In member function 'void RunfilesCreator::EnsureDirReadAndWritePerms(const std::string&)':
src/main/tools/build-runfiles.cc:359: warning: comparison between signed and unsigned integer expressions
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
ERROR: /home/wangleikidding/bazel/src/main/tools/BUILD:19:1: C++ compilation of rule '//src/main/tools:linux-sandbox' failed: process-wrapper failed: error executing command
(cd /tmp/bazel_XnUx9q4j/out/bazel-sandbox/4dcd5fba-044b-4fff-8c12-353ea79e89fc-12/execroot/bazel &&
exec env -
PATH=/data/hadoop/opbin:/usr/local/jdk1.8.0_77/bin:/data/hadoop/hadoop-2.7.2/bin:/data/hadoop/hive/bin:/data/hadoop/hadoop-2.7.2/sbin:/data/hadoop/soft/scala-2.9.1.final/bin:/data/hadoop/spark/bin:/data/hadoop/apache-maven-3.3.9/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/go/bin/:/root/bin:/usr/local/go/bin/:/home/wangleikidding/bin
/tmp/bazel_XnUx9q4j/out/execroot/bazel/bin/process-wrapper -1 5 - - /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.d '-frandom-seed=bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.o' -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP_="redacted"' '-D__TIME__="redacted"' -c src/main/tools/linux-sandbox-pid1.cc -o bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.o).
src/main/tools/linux-sandbox-pid1.cc: In function 'void MountFilesystems()':
src/main/tools/linux-sandbox-pid1.cc:240: error: expected initializer before ':' token
src/main/tools/linux-sandbox-pid1.cc:633: error: expected primary-expression at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected ';' at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected primary-expression at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected ')' at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected statement at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected '}' at end of input
src/main/tools/linux-sandbox-pid1.cc: At global scope:
src/main/tools/linux-sandbox-pid1.cc:57: warning: 'global_child_pid' defined but not used
src/main/tools/linux-sandbox-pid1.cc:61: warning: 'void SetupSelfDestruction(int)' defined but not used
src/main/tools/linux-sandbox-pid1.cc:84: warning: 'void SetupMountNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:112: warning: 'void SetupUserNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:140: warning: 'void SetupUtsNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:150: warning: 'void SetupHelperFiles()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:170: warning: 'bool IsDirectory(const char_)' defined but not used
src/main/tools/linux-sandbox-pid1.cc:231: warning: 'void MountFilesystems()' defined but not used
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
Target //src:bazel failed to build
INFO: Elapsed time: 3.156s, Critical Path: 0.80s
cat /proc/version
Linux version 2.6.32-573.18.1.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Tue Feb 9 22:46:17 UTC 2016
gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The text was updated successfully, but these errors were encountered:
is03wlei
changed the title
Bazel compilation error
Bazel compilation error on commit bb5901b
Sep 27, 2016
@philwo Seems like the new sandbox has some compilation error with older gcc. Probably easy to fix. We can add integration test for that probably by testing the good centos on docker (see tools/cpp/test/Dockerfile.XXX)
Thanks for the report and sorry that it didn't work for you! Would using a binary release of Bazel, or alternatively building Bazel on a system with a newer OS and then copying the resulting binary to your workstation work for you?
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
sh 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_XnUx9q4j/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_XnUx9q4j/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.
WARNING: /home/wangleikidding/bazel/tools/build_rules/java_rules_skylark.bzl:185:13: Variables HOST_CFG and DATA_CFG are deprecated in favor of strings "host" and "data" correspondingly.
INFO: Found 1 target...
INFO: From Compiling src/main/tools/build-runfiles.cc:
src/main/tools/build-runfiles.cc: In member function 'void RunfilesCreator::EnsureDirReadAndWritePerms(const std::string&)':
src/main/tools/build-runfiles.cc:359: warning: comparison between signed and unsigned integer expressions
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
ERROR: /home/wangleikidding/bazel/src/main/tools/BUILD:19:1: C++ compilation of rule '//src/main/tools:linux-sandbox' failed: process-wrapper failed: error executing command
(cd /tmp/bazel_XnUx9q4j/out/bazel-sandbox/4dcd5fba-044b-4fff-8c12-353ea79e89fc-12/execroot/bazel &&
exec env -
PATH=/data/hadoop/opbin:/usr/local/jdk1.8.0_77/bin:/data/hadoop/hadoop-2.7.2/bin:/data/hadoop/hive/bin:/data/hadoop/hadoop-2.7.2/sbin:/data/hadoop/soft/scala-2.9.1.final/bin:/data/hadoop/spark/bin:/data/hadoop/apache-maven-3.3.9/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/go/bin/:/root/bin:/usr/local/go/bin/:/home/wangleikidding/bin
/tmp/bazel_XnUx9q4j/out/execroot/bazel/bin/process-wrapper -1 5 - - /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.d '-frandom-seed=bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.o' -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -isystem external/bazel_tools/tools/cpp/gcc3 -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP_="redacted"' '-D__TIME__="redacted"' -c src/main/tools/linux-sandbox-pid1.cc -o bazel-out/local-opt/bin/src/main/tools/objs/linux-sandbox/src/main/tools/linux-sandbox-pid1.o).
src/main/tools/linux-sandbox-pid1.cc: In function 'void MountFilesystems()':
src/main/tools/linux-sandbox-pid1.cc:240: error: expected initializer before ':' token
src/main/tools/linux-sandbox-pid1.cc:633: error: expected primary-expression at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected ';' at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected primary-expression at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected ')' at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected statement at end of input
src/main/tools/linux-sandbox-pid1.cc:633: error: expected '}' at end of input
src/main/tools/linux-sandbox-pid1.cc: At global scope:
src/main/tools/linux-sandbox-pid1.cc:57: warning: 'global_child_pid' defined but not used
src/main/tools/linux-sandbox-pid1.cc:61: warning: 'void SetupSelfDestruction(int)' defined but not used
src/main/tools/linux-sandbox-pid1.cc:84: warning: 'void SetupMountNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:112: warning: 'void SetupUserNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:140: warning: 'void SetupUtsNamespace()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:150: warning: 'void SetupHelperFiles()' defined but not used
src/main/tools/linux-sandbox-pid1.cc:170: warning: 'bool IsDirectory(const char_)' defined but not used
src/main/tools/linux-sandbox-pid1.cc:231: warning: 'void MountFilesystems()' defined but not used
cc1plus: warning: unrecognized command line option "-Wno-free-nonheap-object"
Target //src:bazel failed to build
INFO: Elapsed time: 3.156s, Critical Path: 0.80s
cat /proc/version
Linux version 2.6.32-573.18.1.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Tue Feb 9 22:46:17 UTC 2016
gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The text was updated successfully, but these errors were encountered: