Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Failing to find bootloader dependency when it's conditionally included

オープン
#75 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-osdev/bootimage のほかの issue

rust-osdev/bootimage の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。