run_python, run_python_compiler could readlink -f

未关闭 适合新手
#27,211 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@kapouer 已经在做这个了。

开始于 2026年6月30日。

  • #27220 来自 @kapouer —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
shell
领域
compilers

调研方向

先从 tools/maint/run_python.sh 和 tools/maint/run_python_compiler.sh 开始,然后复现安装到 /usr/local/bin/emcc 的过程,使 wrapper 与其 Python 伴随文件分离。检查普通路径和 ccache 路径,并考虑所提议的路径解析方式将如何运行。完成的标准是,已安装的 emcc wrapper 能够定位并启动预期的 Python 文件。

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

描述

Please include the following in your bug report:

Version of emscripten/emsdk:
6.0.1

Failing command line in full:
When installing to /usr/local/bin/emcc the emcc file created by create_entry_point,
it will fail, because it tries to find $0.py, which resolves to
/usr/local/bin/emcc.py, which doesn't exist.

Replacing by readlink -f $0 would make distributors life a bit easier.

Thanks for considering.

--- a/tools/maint/run_python.sh
+++ b/tools/maint/run_python.sh
@@ -30,4 +30,4 @@
   exit 1
 fi

-exec "$_EM_PY" -E "$0.py" "$@"
+exec "$_EM_PY" -E "$(readlink -f $0).py" "$@"
--- a/tools/maint/run_python_compiler.sh
+++ b/tools/maint/run_python_compiler.sh
@@ -31,7 +31,7 @@
 fi

 if [ -z "$_EMCC_CCACHE" ]; then
-  exec "$_EM_PY" -E "$0.py" "$@"
+  exec "$_EM_PY" -E "$(readlink -f $0).py" "$@"
 else
   unset _EMCC_CCACHE
   exec ccache "$0" "$@"
主要语言
C++
星标
27.8k
派生
3.6k
平均合并
1 天 10 小时
30 天内合并 PR
177

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

emscripten-core/emscripten 的其他 Issue

查看 emscripten-core/emscripten 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

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