无法使用来自 bazel 的 boost/iostream 构建项目包

Can't build a project package using boost/iostream from bazel

我在 bazel 项目中使用 https://github.com/nelhage/rules_boost,一切正常,但我尝试使用 boost/iostream 时除外。 问题发生在 windows 10,而不是 linux。 boost/iostream依赖zlib,下载的文件是https://zlib.net/zlib-1.2.11.tar.gz

我得到的错误是:

ERROR: .../external/net_zlib_zlib/BUILD.bazel:6:1: in cc_library rule @net_zlib_zlib//:zlib: Expected action_config for 'preprocess-assemble' to be configured
ERROR: Analysis of target '.../storage:storage' failed; build abo

rted:分析目标“@net_zlib_zlib//:zlib”失败;构建中止

这是构建文件:

cc_library(
    name = "storage",
    srcs = [
      "blobstore.cc",
      "blobstore.h",
    ],
    hdrs = [
      "blobstore.h",
    ],
    deps = [
      "@boost//:iostreams",
    ],
    defines = ["BOOST_ALL_NO_LIB"],
)

有谁知道问题出在哪里。

不幸的是,这是我们的 MSVC crosstool 中的一个错误。需要做的是添加缺少的 action_config 并确保其他编译标志兼容。您介意创建一个 github issue 吗?