Build options: --repository_cache=./.cache --noenable_bzlmod --distdir=./bazel/dist --cxxopt='-fdiagnostics-color=always' --cxxopt='-std=c++14' --output_filter='^//' --show_timestamps --force_pic --spawn_strategy=local --verbose_failures --explain=./bazel.log --proto_toolchain_for_cc=@com_google_protobuf//:cc_toolchain --per_file_copt='^modules/.*.cc@-Werror=conversion' --python_path=/usr/bin/python3 --jobs=4 --platforms=//bazel/platforms:drive_sdk_6081+linux --compilation_mode=opt
Executing action 'BazelWorkspaceStatusAction stable-status.txt': unconditional execution is requested.
Executing action 'Compiling src/google/protobuf/wrappers.pb.cc [for tool]': no entry in the cache (action is new).
Executing action 'Compiling zutil.c': no entry in the cache (action is new).
Executing action 'Compiling src/google/protobuf/compiler/cpp/cpp_string_field.cc [for tool]': no entry in the cache (action is new).
Executing action 'Compiling modules/team_demo/module_demo/test/demo_module/demo_test.cpp': no entry in the cache (action is new).
Executing action 'Compiling src/google/protobuf/wrappers.pb.cc': no entry in the cache (action is new).
bazel output
(11:52:51) INFO: Current date is 2024-03-15
(11:52:54) WARNING: /gw_demo/modules/team_demo/module_demo/BUILD:45:13: runfiles symlink modules/team_demo/module_demo/install_module_src -> bazel-out/aarch64-opt/bin/modules/team_demo/module_demo/install_module_src obscured by modules/team_demo/module_demo -> modules/team_demo/module_demo
(11:52:54) WARNING: /gw_demo/modules/team_demo/module_demo/BUILD:45:13: runfiles symlink modules/team_demo/module_demo/install_src -> bazel-out/aarch64-opt/bin/modules/team_demo/module_demo/install_src obscured by modules/team_demo/module_demo -> modules/team_demo/module_demo
(11:52:54) WARNING: /gw_demo/gaos/system_test/test_af/BUILD:38:13: runfiles symlink gaos/system_test/test_af/install_module_src -> bazel-out/aarch64-opt/bin/gaos/system_test/test_af/install_module_src obscured by gaos/system_test/test_af -> gaos/system_test/test_af
(11:52:54) WARNING: /gw_demo/gaos/system_test/test_af/BUILD:38:13: runfiles symlink gaos/system_test/test_af/install_src -> bazel-out/aarch64-opt/bin/gaos/system_test/test_af/install_src obscured by gaos/system_test/test_af -> gaos/system_test/test_af
(11:52:54) WARNING: /gw_demo/gaos/system_test/test_af/BUILD:38:13: runfiles symlink gaos/system_test/test_af/install_header_src -> bazel-out/aarch64-opt/bin/gaos/system_test/test_af/install_header_src obscured by gaos/system_test/test_af -> gaos/system_test/test_af
(11:52:54) WARNING: /gw_demo/modules/team_demo/module_demo/BUILD:45:13: runfiles symlink modules/team_demo/module_demo/install_header_src -> bazel-out/aarch64-opt/bin/modules/team_demo/module_demo/install_header_src obscured by modules/team_demo/module_demo -> modules/team_demo/module_demo
(11:52:57) INFO: Analyzed 24 targets (50 packages loaded, 18664 targets configured).
(11:53:52) ERROR: /home/zs/.cache/bazel/_bazel_zs/2c098eac6c684e1fabebb74f5f4483bd/external/zlib/BUILD.bazel:37:11: Compiling adler32.c failed: (Exit 1): aarch64-linux-g++ failed: error executing CppCompile command (from target @@zlib//:zlib)
(cd /home/zs/.cache/bazel/_bazel_zs/2c098eac6c684e1fabebb74f5f4483bd/execroot/gaos && \
exec env - \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib:/usr/lib/x86_64-linux-gnu:/opt/rti.com/rti_connext_dds-6.0.1/lib/x64Linux4gcc7.3.0:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/x86_64-linux-gnu:/opt/ros/humble/lib \
PATH=/usr/local/cuda/bin:/opt/rti.com/rti_connext_dds-6.0.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ros/humble/bin \
PWD=/proc/self/cwd \
/drive/toolchains/aarch64--glibc--stable-2022.03-1/bin/aarch64-linux-g++ -MD -MF bazel-out/aarch64-opt/bin/external/zlib/_objs/zlib/adler32.pic.d '-frandom-seed=bazel-out/aarch64-opt/bin/external/zlib/_objs/zlib/adler32.pic.o' -fPIC -iquote external/zlib -iquote bazel-out/aarch64-opt/bin/external/zlib -isystem external/zlib/zlib/include -isystem bazel-out/aarch64-opt/bin/external/zlib/zlib/include -Wno-unused-variable -Wno-implicit-function-declaration -c external/zlib/adler32.c -o bazel-out/aarch64-opt/bin/external/zlib/_objs/zlib/adler32.pic.o)
# Configuration: c76ccfe1b039246c80f6731290fc527500e3a40b12634d52de550b9f7488be3f
# Execution platform: @@local_config_platform//:host
cc1plus: warning: command line option '-Wno-implicit-function-declaration' is valid for C/ObjC but not for C++
external/zlib/adler32.c:63:25: error: 'uLong adler32_z' redeclared as different kind of entity
63 | uLong ZEXPORT adler32_z(adler, buf, len)
| ^~~~~
In file included from external/zlib/zutil.h:22,
from external/zlib/adler32.c:8:
external/zlib/zlib.h:1709:23: note: previous declaration 'uLong adler32_z(uLong, const Bytef*, z_size_t)'
1709 | ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf,
| ^~~~~~~~~
external/zlib/adler32.c:63:25: error: 'adler' was not declared in this scope; did you mean 'adler32'?
63 | uLong ZEXPORT adler32_z(adler, buf, len)
| ^~~~~
| adler32
external/zlib/adler32.c:63:32: error: 'buf' was not declared in this scope
63 | uLong ZEXPORT adler32_z(adler, buf, len)
| ^~~
external/zlib/adler32.c:63:37: error: 'len' was not declared in this scope; did you mean 'mblen'?
63 | uLong ZEXPORT adler32_z(adler, buf, len)
| ^~~
| mblen
external/zlib/adler32.c:67:1: error: expected unqualified-id before '{' token
67 | {
| ^
external/zlib/adler32.c:134:23: error: 'uLong adler32' redeclared as different kind of entity
134 | uLong ZEXPORT adler32(adler, buf, len)
| ^~~~~
In file included from external/zlib/zutil.h:22,
from external/zlib/adler32.c:8:
external/zlib/zlib.h:1689:23: note: previous declaration 'uLong adler32(uLong, const Bytef*, uInt)'
1689 | ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
| ^~~~~~~
external/zlib/adler32.c:134:23: error: 'adler' was not declared in this scope; did you mean 'adler32'?
134 | uLong ZEXPORT adler32(adler, buf, len)
| ^~~~~
| adler32
external/zlib/adler32.c:136:18: error: redefinition of 'const Bytef* buf'
136 | const Bytef *buf;
| ^~~
external/zlib/adler32.c:65:18: note: 'const Bytef* buf' previously declared here
65 | const Bytef *buf;
| ^~~
external/zlib/adler32.c:137:10: error: conflicting declaration 'uInt len'
137 | uInt len;
| ^~~
external/zlib/adler32.c:66:14: note: previous declaration as 'z_size_t len'
66 | z_size_t len;
| ^~~
external/zlib/adler32.c:138:1: error: expected unqualified-id before '{' token
138 | {
| ^
external/zlib/adler32.c:143:30: error: 'uLong adler32_combine_' redeclared as different kind of entity
143 | local uLong adler32_combine_(adler1, adler2, len2)
| ^~~~~~
external/zlib/adler32.c:10:13: note: previous declaration 'uLong adler32_combine_(uLong, uLong, off64_t)'
10 | local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
| ^~~~~~~~~~~~~~~~
external/zlib/adler32.c:143:30: error: 'adler1' was not declared in this scope; did you mean 'adler32'?
143 | local uLong adler32_combine_(adler1, adler2, len2)
| ^~~~~~
| adler32
external/zlib/adler32.c:143:38: error: 'adler2' was not declared in this scope; did you mean 'adler32'?
143 | local uLong adler32_combine_(adler1, adler2, len2)
| ^~~~~~
| adler32
external/zlib/adler32.c:143:46: error: 'len2' was not declared in this scope; did you mean 'len'?
143 | local uLong adler32_combine_(adler1, adler2, len2)
| ^~~~
| len
external/zlib/adler32.c:147:1: error: expected unqualified-id before '{' token
147 | {
| ^
external/zlib/adler32.c:172:31: error: 'uLong adler32_combine' redeclared as different kind of entity
172 | uLong ZEXPORT adler32_combine(adler1, adler2, len2)
| ^~~~~~
In file included from external/zlib/zutil.h:22,
from external/zlib/adler32.c:8:
external/zlib/zlib.h:1897:26: note: previous declaration 'uLong adler32_combine(uLong, uLong, off_t)'
1897 | ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
| ^~~~~~~~~~~~~~~
external/zlib/adler32.c:172:31: error: 'adler1' was not declared in this scope; did you mean 'adler2'?
172 | uLong ZEXPORT adler32_combine(adler1, adler2, len2)
| ^~~~~~
| adler2
external/zlib/adler32.c:174:11: error: redefinition of 'uLong adler2'
174 | uLong adler2;
| ^~~~~~
external/zlib/adler32.c:145:11: note: 'uLong adler2' previously declared here
145 | uLong adler2;
| ^~~~~~
external/zlib/adler32.c:175:13: error: redefinition of 'off_t len2'
175 | z_off_t len2;
| ^~~~
external/zlib/adler32.c:146:15: note: 'off64_t len2' previously declared here
146 | z_off64_t len2;
| ^~~~
external/zlib/adler32.c:176:1: error: expected unqualified-id before '{' token
176 | {
| ^
external/zlib/adler32.c:180:33: error: 'uLong adler32_combine64' redeclared as different kind of entity
180 | uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
| ^~~~~~
In file included from external/zlib/zutil.h:22,
from external/zlib/adler32.c:8:
external/zlib/zlib.h:1860:26: note: previous declaration 'uLong adler32_combine64(uLong, uLong, off64_t)'
1860 | ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
| ^~~~~~~~~~~~~~~~~
external/zlib/adler32.c:180:33: error: 'adler1' was not declared in this scope; did you mean 'adler2'?
180 | uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
| ^~~~~~
| adler2
external/zlib/adler32.c:182:11: error: redefinition of 'uLong adler2'
182 | uLong adler2;
| ^~~~~~
external/zlib/adler32.c:145:11: note: 'uLong adler2' previously declared here
145 | uLong adler2;
| ^~~~~~
external/zlib/adler32.c:183:15: error: redefinition of 'off64_t len2'
183 | z_off64_t len2;
| ^~~~
external/zlib/adler32.c:146:15: note: 'off64_t len2' previously declared here
146 | z_off64_t len2;
| ^~~~
external/zlib/adler32.c:184:1: error: expected unqualified-id before '{' token
184 | {
| ^
(11:53:53) INFO: Elapsed time: 61.160s, Critical Path: 11.92s
(11:53:53) INFO: 204 processes: 88 internal, 116 local.
(11:53:53) ERROR: Build did NOT complete successfully
extra infomation
only linking with protobuf lib causing the compiling error, which means only cc_binary causing the issue.
proto_library(
name = "point_proto",
srcs = ["proto/geometry_msgs/Point.proto"],
)
cc_proto_library(
name = "point_cc_proto",
deps = [":point_proto"],
)
proto_library(
name = "freespace_boundary_proto",
srcs = ["proto/perception_msgs/FreeSpaceBoundary.proto"],
deps = [
":point_proto"
],
)
cc_proto_library(
name = "freespace_boundary_cc_proto",
deps = [":freespace_boundary_proto"],
)
# zs: todo: bug: com_google_protobuf cross-compile link failed.
gaos_cc_binary(
name = "test_proto",
srcs = ["test/test_proto.cpp"],
deps = [
":point_cc_proto",
"@com_google_protobuf//:protobuf",
],
)
bazel configs
bazel 7.0.2 with platforms
workspace config
cc toolchain config
toolchains/V5L/BUILD
toolchains/V5L/V5L_cc_toolchain_config.bzl
bazel command
--platforms=//bazel/platforms:drive_sdk_6081+linux
explain.log is in follow
bazel output
extra infomation
only linking with protobuf lib causing the compiling error, which means only cc_binary causing the issue.