Bazel试图使用Protobuf的旧版本?

发布于 2025-02-05 15:14:31 字数 581 浏览 0 评论 0原文

在Mingw上使用Bazel构建程序,我遇到了一个错误:

external/com_github_protocolbuffers_protobuf/src/google/protobuf/port_undef.inc:122:28: error: expected ')' at end of input
  122 | #pragma GCC diagnostic pop
      |                            ^
      |                            )
external/com_github_protocolbuffers_protobuf/src/google/protobuf/stubs/port.h:266:10: note: to match this '('
  266 |   return (((x & uint64_t{0xFFu)) << 56) |

引用第266行显然是完全错误的,这使得很容易搜索;它是在

这来自巴泽尔下载的Protobuf版本,大概是因为它找不到系统Protobuf库。所以...为什么要尝试使用库的旧版本,并且有什么方法可以使其停止?

Building a program with bazel on mingw, I get this error:

external/com_github_protocolbuffers_protobuf/src/google/protobuf/port_undef.inc:122:28: error: expected ')' at end of input
  122 | #pragma GCC diagnostic pop
      |                            ^
      |                            )
external/com_github_protocolbuffers_protobuf/src/google/protobuf/stubs/port.h:266:10: note: to match this '('
  266 |   return (((x & uint64_t{0xFFu)) << 56) |

That quoted line 266 is clearly completely wrong, which makes it easy to search for; it was fixed in the protobuf code in this bug, which was closed in May 2021 and probably released in 3.17.1.

This is coming from a version of protobuf that bazel has downloaded, presumably because it can't find the system protobuf library. So... why is it trying to use this old version of the library, and is there any way to make it stop?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文