Bazel试图使用Protobuf的旧版本?
在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论