Failing to find bootloader dependency when it's conditionally included
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- rust
- 领域
- build-system
调研方向
使用 Cargo.toml 中特定于目标的依赖项和 cargo bootimage --target targets/x86_64-unknown-none-softfloat.json --release 重现该失败。首先跟踪 bootimage 命令如何获取 Cargo 元数据并定位 bootloader 包。当针对 x86_64 找到条件 bootloader 依赖项,并且在其他架构上构建映像时无需该依赖项,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I'm writing a kernel that runs on both the Raspberry Pi 3 and x86_64. I'm trying to use bootloader+bootimage exclusively for the x86_64 version, but not any other architecture. As a result, my Cargo.toml looks like this:
[dependencies]
# common, architecture-independent dependencies
[target.'cfg(target_arch = "x86_64")'.dependencies]
bootloader = "^0.9.8"
When I compile this project with cargo bootimage --target targets/x86_64-unknown-none-softfloat.json --release I get this error message:
Error: An error occured while trying to build the bootloader: Could not find required key `packages[name = `bootloader`` in cargo metadata output
However, if I change the bootloader dependency to not be conditional, i.e. if I just put it in the [dependencies] section, the above error goes away and the project boots perfectly.
Is there some extra configuration I need to do to make this work? It would be nice for me to be able to completely exclude the bootloader dependency off of x86.
- 主要语言
- Rust
- 星标
- 906
- 派生
- 70
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-osdev/bootimage 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
rust-osdev/bootimage#103 · 9 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
rust-osdev/bootimage#110 · 4 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
rust-osdev/bootimage#109 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 45/100
rust-osdev/bootimage#98 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
rust-osdev/bootimage#94 · 1 条评论 ·
查看 rust-osdev/bootimage 的全部 Issue
相似的 Issue
-
area: dogs area: lookout bug security
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 2 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
OpenDevicePartnership/ina4230#31 ·
维护者通常 1 天内回复
-
area:breg criticality:p3 documentation triage:needs-implementation
难度 1/5 1 小时以内 新手友好度 86/100
registrystack/registry-stack#1713 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
posit-dev/ggsql#565 · 1 个 reaction ·
维护者通常 1 天内回复