【问题标题】:Can't build a project package using boost/iostream from bazel无法使用来自 bazel 的 boost/iostream 构建项目包
【发布时间】:2018-06-21 11:15:15
【问题描述】:

我在一个 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"],
)

有谁知道问题可能是什么。

【问题讨论】:

    标签: c++ boost zlib bazel


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多