Quickstart can't build hello world: librustc_codegen_gcc.so not found
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 64/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
从 Quickstart 说明、config.example.toml 以及 ./y.sh prepare/build/cargo 入口开始;针对 tests/hello-world/Cargo.toml 重现 release 和 non-release 命令。追踪 release build 为什么会在 target/debug 下查找,以及 non-release build 为什么找不到 mylib。文档中的 Quickstart 命令能够成功构建 hello-world,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I'm trying to build librustc_codegen_gcc.so from this repo (rather than from Rust) to make it easier to upstream patches. However, the Quickstart instructions do not appear to work.
Following the instructions, I've:
- Copied
config.example.tomltoconfig.toml - Ran
./y.sh prepare - Ran
./y.sh build --sysroot --release
Now I'm trying to run the fourth step:
$ ./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml
[BUILD] build system
Finished [`release` profile [optimized]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.01s
Using `/home/seancross/Code/rustc_codegen_gcc/build/libgccjit/b794cb99508e7eccd40fa42bb310d5781e09899b` as path for libgccjit
Compiling hello_world v0.0.0 (/home/seancross/Code/rustc_codegen_gcc/tests/hello-world)
error: couldn't load codegen backend /home/seancross/Code/rustc_codegen_gcc/target/debug/librustc_codegen_gcc.so: cannot open shared object file: No such file or directory
error: could not compile `hello_world` (bin "hello_world") due to 1 previous error
$
It appears to be looking for something under target/debug even though the instructions say to run ./y.sh build --sysroot --release. If I re-run step 3 with ./y.sh build --sysroot without --release, then attempting to build hello-world gives a different error:
$ ./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml
[BUILD] build system
Finished [`release` profile [optimized]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.00s
Using `/home/seancross/Code/rustc_codegen_gcc/build/libgccjit/b794cb99508e7eccd40fa42bb310d5781e09899b` as path for libgccjit
Compiling hello_world v0.0.0 (/home/seancross/Code/rustc_codegen_gcc/tests/hello-world)
error[E0463]: can't find crate for `mylib`
--> src/main.rs:1:5
|
1 | use mylib::my_func;
| ^^^^^ can't find crate
For more information about this error, try `rustc --explain E0463`.
error: could not compile `hello_world` (bin "hello_world") due to 1 previous error
$
- 主要语言
- Rust
- 星标
- 1.2k
- 派生
- 106
- 平均合并
- 6 小时 17 分钟
- 30 天内合并 PR
- 21
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/rustc_codegen_gcc 的其他 Issue
-
tests
难度 2/5 1-3 小时 新手友好度 62/100
rust-lang/rustc_codegen_gcc#993 ·
维护者通常 1 天内回复
-
tests
难度 4/5 3-5 天 新手友好度 30/100
rust-lang/rustc_codegen_gcc#992 ·
维护者通常 1 天内回复
-
bug
难度 5/5 一周以上 新手友好度 35/100
rust-lang/rustc_codegen_gcc#970 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
rust-lang/rustc_codegen_gcc#943 ·
维护者通常 1 天内回复
-
tests
难度 4/5 3-5 天 新手友好度 42/100
rust-lang/rustc_codegen_gcc#922 ·
维护者通常 1 天内回复
查看 rust-lang/rustc_codegen_gcc 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 3 天内回复
-
Zellij doesn't validate hex colors correctly and crashes可能已有人在做 @ymcx 今天认领。 未关闭suspected bug
难度 2/5 1-3 小时 新手友好度 76/100
zellij-org/zellij#5732 ·
维护者通常 1 天内回复
-
bug rust
难度 2/5 1-3 小时 新手友好度 78/100
jonathanong/no-mistakes#2267 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
rust-embedded/cortex-m#702 · 1 条评论 ·
-
Make major, minor, and makedev safe on solarish targets可能已有人在做 @xtqqczze 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复