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

Getting some weird bugs after trying to update bootimage #10

Closed
steveklabnik opened this issue Apr 23, 2018 · 3 comments
Closed

Getting some weird bugs after trying to update bootimage #10

steveklabnik opened this issue Apr 23, 2018 · 3 comments

Comments

@steveklabnik
Copy link

So, I'm working on updating intermezzos to the new version of bootimage, however I'm getting some failures on CI and locally that are strange. The only change I've made is to add the build subcommand to `bootimage.

Here's the CI failure: https://travis-ci.org/intermezzOS/kernel/jobs/370152249#L521

error: current package believes it's in a workspace when it's not:
current:   /home/travis/build/intermezzOS/kernel/target/intermezzos/debug/bootloader/Cargo.toml
workspace: /home/travis/build/intermezzOS/kernel/Cargo.toml
this may be fixable by ensuring that this crate is depended on by the workspace root: /home/travis/build/intermezzOS/kernel/Cargo.toml
thread 'main' panicked at 'Bootloader download failed.', src/build.rs:250:5

and locally:

> bootimage build --target=intermezzos
Building kernel
   Compiling rlibc v1.0.0
   Compiling vga v0.1.0 (file:///C:/Users/steve/src/intermezzos/kernel/vga)
error[E0463]: can't find crate for `compiler_builtins`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `rlibc`.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `compiler_builtins`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `vga`.

To learn more, run the command again with --verbose.

Any ideas on what's going on here? I'm using bootimage 0.2.6 and rustc 1.27.0-nightly (ac3c2288f 2018-04-18).

@phil-opp
Copy link
Member

Thanks for reporting!

I think I have a pretty good idea what's going on: Bootimage creates a dummy project in the target folder to download the bootloader through cargo's dependency fetch process. By living inside target, this dummy crate is in a subfolder of the project root. Thus cargo thinks that it should belong to the workspace and errors because it doesn't. (I found that cargo behavior strange since workspaces were introduced, because it also breaks things like git worktree, but that's a different story.)

Your local build throws a different error because it already fails to compile the kernel, so no bootloader is downloaded. The error looks like it's caused by the recent automatic injection of compiler_builtins. More specific, I think you might have an old xargo version that doesn't include japaric/xargo#213.

About the bootimage problem: I think we could create the dummy project in /tmp instead of the target subfolder. I will look into it.

@phil-opp
Copy link
Member

Should be fixed in df6c73c. Published as version 0.2.7. I also verified that intermezzos builds again.

@steveklabnik
Copy link
Author

Thank you! As always, you're the best <3

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

No branches or pull requests

2 participants