"bazel build //:envoy" fails on fresh clone of this repo

未关闭
#203 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, docker

调研方向

先从 README 中的构建说明开始,然后检查 .devcontainer/devcontainer.json、.devcontainer/setup.sh 和 WORKSPACE,了解 ENVOY_SRCDIR 是如何分配和使用的。重新创建 fresh-clone dev container 并运行 bazel build //:envoy;当 setup 完成且构建能够解析 Envoy 仓库而不出现路径缺失错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Instruction here, https://github.com/envoyproxy/envoy-filter-example?tab=readme-ov-file#building

We fail to resolve {ENVOY_SCRDIR}. Now, for dev container support, we set this at: https://github.com/envoyproxy/envoy/blob/8283565cffc7b713ef1b3a8b79c285c269e15db3/.devcontainer/devcontainer.json#L16-L18

Error initializing container

This error is found in the Terminal tab.

Running the postCreateCommand from devcontainer.json...

[1856 ms] Start: Run in container: /bin/sh -c .devcontainer/setup.sh
.devcontainer/setup.sh: line 3: bazel/setup_clang.sh: No such file or directory
Done. Press any key to close the terminal.

Error during build step

vscode@docker-desktop:/workspaces/envoy-filter-example$ bazel build //:envoy
WARNING: The following configs were expanded more than once: [clang-libc++, libc++, clang]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
ERROR: /workspaces/envoy-filter-example/WORKSPACE:3:17: fetching local_repository rule //external:envoy: java.io.IOException: The repository's path is "{ENVOY_SRCDIR}" (absolute: "/workspaces/envoy-filter-example/{ENVOY_SRCDIR}") but it does not exist or is not a directory.
ERROR: Error computing the main repository mapping: no such package '@@envoy//bazel': The repository's path is "{ENVOY_SRCDIR}" (absolute: "/workspaces/envoy-filter-example/{ENVOY_SRCDIR}") but it does not exist or is not a directory.
Computing main repo mapping: 
vscode@docker-desktop:/workspaces/envoy-filter-example$ echo $ENVOY_S
$ENVOY_SRCDIR  $ENVOY_STDLIB  
vscode@docker-desktop:/workspaces/envoy-filter-example$ echo $ENVOY_SRCDIR
/workspaces/envoy-filter-example
vscode@docker-desktop:/workspaces/envoy-filter-example$ 
主要语言
C++
星标
361
派生
220
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

envoyproxy/envoy-filter-example 的其他 Issue

查看 envoyproxy/envoy-filter-example 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。