Skip to content

no bootloader dependency in Cargo.toml error when compiling, but it is there #181

@90-008

Description

@90-008

I'm getting this error while compiling bootloader:

error: no bootloader dependency in /home/patriot/Belgeler/projects/hakkero/Cargo.toml

  The `--kernel-manifest` path should point to the `Cargo.toml` of the kernel.
 --> /home/patriot/Belgeler/projects/hakkero/target/x86_64-unknown-uefi/release/build/bootloader-b9ead764961ec1c9/out/bootloader_config.rs:1:81
  |
1 | ... = compile_error ! ("no bootloader dependency in /home/patriot/Belgeler/projects/hakkero/Cargo.toml\n\n  The `--kernel-manifest` path should point to the `Cargo.toml` of the kernel.") ...
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

error: could not compile `bootloader`

it says I don't have a bootloader dependency in my Cargo.toml, but I do:

[target.'cfg(target_arch = "x86_64")'.dependencies]
bootloader = "0.10"

This is probably related to the handling in

bootloader/build.rs

Lines 243 to 246 in c09f94f

if manifest
.get("dependencies")
.and_then(|d| d.get("bootloader"))
.is_some()
. This should be changed to handle cases like that. Maybe we could use https://github.com/oli-obk/cargo_metadata instead? If we don't want to pull in a dependency, it should also be possible to recursively travel through dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions