Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yusdacra opened this issue Jun 24, 2021 · 0 comments · Fixed by #182
Closed

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

yusdacra opened this issue Jun 24, 2021 · 0 comments · Fixed by #182

Comments

@yusdacra
Copy link
Contributor

yusdacra commented Jun 24, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant