FAILED: Build did NOT complete successfully

在尝试构建TensorFlow Bigtable组件时遇到链接错误,详细信息显示在编译过程中出现了多个定义冲突,涉及到pb_common和pb_decode等函数。该问题可能源于grpc和nanopb库的不兼容或配置错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ERROR: /home/pi/tensorflow-1.12.0/tensorflow/contrib/bigtable/BUILD:53:1: Linking of rule '//tensorflow/contrib/bigtable:python/ops/_bigtable.so' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-fastbuild/bin/tensorflow/contrib/bigtable/python/ops/_bigtable.so ... (remaining 64 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_common.pic.o: multiple definition of 'pb_field_iter_begin'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_common.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_common.pic.o: multiple definition of 'pb_field_iter_next'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_common.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_common.pic.o: multiple definition of 'pb_field_iter_find'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_common.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_read'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_istream_from_buffer'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_varint'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_tag'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_skip_field'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_make_string_substream'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_close_string_substream'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_noinit'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_delimited'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_svarint'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_fixed32'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_decode.pic.o: multiple definition of 'pb_decode_fixed64'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_decode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_ostream_from_buffer'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_write'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_tag'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_varint'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_tag_for_field'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_delimited'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_submessage'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_get_encoded_size'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_svarint'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_fixed32'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_fixed64'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/external/grpc/_objs/grpc_nanopb/pb_encode.pic.o: multiple definition of 'pb_encode_string'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/external/grpc/third_party/nanopb/_objs/nanopb/pb_encode.pic.o: previous definition here
collect2: error: ld returned 1 exit status
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 215.210s, Critical Path: 12.14s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 178 processes: 178 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

 

root@localhost:~/5.15-13# tools/bazel run //common:kernel_aarch64_dist --config=fast INFO: Analyzed target //common:kernel_aarch64_dist (0 packages loaded, 0 targets configured). INFO: Found 1 target... ERROR: /root/5.15-13/common/BUILD.bazel:52:22: Building kernel kernel_aarch64 failed: (Exit 2): bash failed: error executing command (from target //common:kernel_aarch64) /bin/bash -c ... (remaining 1 argument skipped) /root/5.15-13/common/kernel/sys.c:3009:31: error: incompatible pointer types passing 'struct perf_event *' to parameter of type 'struct perf_event **'; take the address with & [-Werror,-Wincompatible-pointer-types] unregister_wide_hw_breakpoint(bp); ^~ & /root/5.15-13/common/include/linux/hw_breakpoint.h:76:73: note: passing argument to parameter 'cpu_events' here extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); ^ /root/5.15-13/common/kernel/sys.c:3039:4: error: incompatible pointer types assigning to 'struct perf_event *' from 'struct perf_event **'; dereference with * [-Werror,-Wincompatible-pointer-types] bp = register_wide_hw_breakpoint(&attr, hit_handler, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * /root/5.15-13/common/kernel/sys.c:3049:9: error: implicit declaration of function 'perf_event_set_target' [-Werror,-Wimplicit-function-declaration] perf_event_set_target(event, tsk); // 关联到目标进程 ^ 3 errors generated. make[2]: *** [/root/5.15-13/common/scripts/Makefile.build:287: kernel/sys.o] Error 1 make[1]: *** [/root/5.15-13/common/Makefile:1953: kernel] Error 2 make: *** [Makefile:244: __sub-make] Error 2 Target //common:kernel_aarch64_dist failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: /root/5.15-13/common/BUILD.bazel:52:22 Middleman _middlemen/common_Skernel_Uaarch64_Udist-runfiles failed: (Exit 2): bash failed: error executing command (from target //common:kernel_aarch64) /bin/bash -c ... (remaining 1 argument skipped) INFO: Elapsed time: 45.356s, Critical Path: 44.43s INFO: 4 processes: 4 internal. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully root@localhost:~/5.15-13# 继续仔细修复 完整发给我代码
07-20
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值