按照vearch和gamma编译说明和编译脚本,当运行到用bazel编译scann-1.2.1时出现如下报错,都指向com_google_protobuf这个内容:
ERROR: /root/.cache/bazel/_bazel_root/7125299c24cb2d7bde318ecca9ed5091/external/com_google_protobuf/BUILD:979:21: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'.
ERROR: Analysis of target '//:build_pip_pkg' failed; build aborted: Analysis of target '@com_google_protobuf//:cc_toolchain' failed
INFO: Elapsed time: 0.270s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets conf
igured)
我试了这个网文的方法(https://zhuanlan.zhihu.com/p/488199658)
#bazel版本过高的话,会有如下错误: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'. 可以加以下参数解决: bazel build ... --incompatible_blacklisted_protos_requires_proto_info=false
还是也不能修复编译问题,是不是WORKSPACE里的 https://github.com/bazelbuild/rules_cc 的版本或者com_google_protobuf使用github的tag版本有问题,也有网文说要修改类似内容的。我试验了改了这俩个几个版本,在bazel编译时还是出现failed ERROR。
Centos 7 ( MacOS Big Sur + 2.7 GHz 双核Intel Core i5 + Parallels Desktop) + bazel 4 + gcc 9.3.1+ clang 8
- gcc 9 是利用了devtoolset-9安装的,环境通过source /opt/rh/devtoolset-9/enable激活
- clang llvm8编译安装,PATH:/usr/local/clang/bin
- Bazel 4 安装使用了:
wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.rep --no-check-certificate
mv vbatts-bazel-epel-7.rep /etc/yum.repos.d/
cd /etc/yum.repos.d
mv vbatts-bazel-epel-7.rep vbatts-bazel-epel-7.repo
yum install -y bazel4
按照vearch和gamma编译说明和编译脚本,当运行到用bazel编译scann-1.2.1时出现如下报错,都指向com_google_protobuf这个内容:
ERROR: /root/.cache/bazel/_bazel_root/7125299c24cb2d7bde318ecca9ed5091/external/com_google_protobuf/BUILD:979:21: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'.
ERROR: Analysis of target '//:build_pip_pkg' failed; build aborted: Analysis of target '@com_google_protobuf//:cc_toolchain' failed
INFO: Elapsed time: 0.270s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets conf
igured)
我试了这个网文的方法(https://zhuanlan.zhihu.com/p/488199658)
#
bazel版本过高的话,会有如下错误: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'. 可以加以下参数解决: bazel build ... --incompatible_blacklisted_protos_requires_proto_info=false还是也不能修复编译问题,是不是WORKSPACE里的 https://github.com/bazelbuild/rules_cc 的版本或者com_google_protobuf使用github的tag版本有问题,也有网文说要修改类似内容的。我试验了改了这俩个几个版本,在bazel编译时还是出现failed ERROR。
Centos 7 ( MacOS Big Sur + 2.7 GHz 双核Intel Core i5 + Parallels Desktop) + bazel 4 + gcc 9.3.1+ clang 8
wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.rep --no-check-certificate
mv vbatts-bazel-epel-7.rep /etc/yum.repos.d/
cd /etc/yum.repos.d
mv vbatts-bazel-epel-7.rep vbatts-bazel-epel-7.repo
yum install -y bazel4