小编Yal*_*lin的帖子

使用 Bazel 离线构建 C++ 项目(无需互联网连接)

我尝试使用此命令从 Bazel 主页(入门)构建 Bazel C++ 构建教程,但没有任何互联网连接:bazel build //main:hello-world

Jenkins 服务器不会与互联网有任何连接,因此我无法进行预取或类似操作。有没有办法在另一台计算机上准备我的 C++ 项目并将依赖项传输到 Jenkins 服务器以离线执行?如何?我只需要从以下错误消息中得到的信息即可运行教程:

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository rules_cc instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:267:6: in <toplevel>
  C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
  C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip failed: class java.io.IOException Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
WARNING: Download from https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip failed: class java.io.IOException Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not …
Run Code Online (Sandbox Code Playgroud)

c++ offline build bazel

6
推荐指数
1
解决办法
4002
查看次数

标签 统计

bazel ×1

build ×1

c++ ×1

offline ×1