Skip to content

Conversation

@Wasabi375
Copy link
Contributor

This bug only happend if you try to compile this library in release mode within the repo directory. This bug does not effect consumers of this library.

How to reproduce

  1. Check out this repository
  2. cargo build --release (it might be necessary to run cargo clean if the repo was compiled in release mode before)

What happens

After changing build.rs to include cmd.arg("-vv") in the build_uefi_bootloader function and also building using cargo build -r -vv --no-default-features --features uefi we can see that cargo hangs at the following step:

[bootloader 0.11.13]   Installing bootloader-x86_64-uefi v0.11.13 (/home/burkhard/programming/forks/bootloader/uefi)
[bootloader 0.11.13]     Updating crates.io index
[bootloader 0.11.13]     Blocking waiting for file lock on artifact directory

The issue is that the artifact directory for the uefi crate and for the bootloader crate are the same.

  1. cargo build for the bootloader crate locks the artifact directory.
  2. Then at the end of the build, build.rs is executed which tries to run cargo install bootloader-x86_64-uefi --path uefi ..... (the --path argument is only used when building localy and therefor this bug does not effect downstream consumers of this crate).
  3. cargo install for the uefi subcrate tries to lock the same artifact directory

Impact

As far as I can tell it is impossible to run cargo test --release. Otherwise this is pretty harmless.

Copy link
Member

@Freax13 Freax13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Freax13 Freax13 merged commit d570ba7 into rust-osdev:main Jan 11, 2026
8 of 9 checks passed
@Wasabi375 Wasabi375 deleted the release branch January 11, 2026 11:31
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 this pull request may close these issues.

2 participants