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

x86_64 0.13.2 seems to not work out-of-the-box anymore. 0.14.1 works well #982

Closed
szborows opened this issue May 9, 2021 · 4 comments · Fixed by #990
Closed

x86_64 0.13.2 seems to not work out-of-the-box anymore. 0.14.1 works well #982

szborows opened this issue May 9, 2021 · 4 comments · Fixed by #990

Comments

@szborows
Copy link

szborows commented May 9, 2021

hi,

when running cargo test in post-05 (right after introducing x86_64) compilation fails with following errors. I know @phil-opp you are involved in the other thread, so just wanna ask - shouldn't the blog post be updated?

rust-osdev/x86_64#250

    Updating crates.io index
  Downloaded x86_64 v0.13.6
  Downloaded 1 crate (60.7 KB) in 0.70s
   Compiling bitflags v1.2.1
   Compiling x86_64 v0.13.6
   Compiling bit_field v0.9.0
error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> /home/szborows/.cargo/registry/src/github.com-1ecc6299db9ec823/x86_64-0.13.6/src/structures/paging/frame.rs:18:6
   |
18 | impl<S: PageSize> PhysFrame<S> {
   |      ^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> /home/szborows/.cargo/registry/src/github.com-1ecc6299db9ec823/x86_64-0.13.6/src/structures/paging/page.rs:62:6
   |
62 | impl<S: PageSize> Page<S> {
   |      ^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
   --> /home/szborows/.cargo/registry/src/github.com-1ecc6299db9ec823/x86_64-0.13.6/src/structures/paging/page.rs:150:6
    |
150 | impl<S: NotGiantPageSize> Page<S> {
    |      ^
    |
    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `x86_64`
@ghost
Copy link

ghost commented May 11, 2021

x86_64 version 0.13.6 broke only recently with the release of another version of rustup nightly. I only noticed the problem myself on April 30 of this year, so it's pretty fresh. By rebuilding the project with older rust everything should work. Also take a look at the page that the compiler gives you. rust-lang/rust#57563

@phil-opp
Copy link
Owner

Thanks for reporting! As @JakubGawron23 noted, this is caused by some breaking changes on the Rust nightly channel. I try my best to update the blog for this soon!

@phil-opp phil-opp pinned this issue May 13, 2021
@szborows
Copy link
Author

I erroneously reported it as problem in post-05. It actually refers to post-04. Version 0.14.1 helps, but then when you move to post-05 you'll face following error. As for now, as @JakubGawron23 wrote, the best solution is to use older nightly build of Rust.

error[E0308]: mismatched types
 --> src/interrupts.rs:6:35
  |
6 |     idt.breakpoint.set_handler_fn(breakpoint_handler);
  |                                   ^^^^^^^^^^^^^^^^^^ expected struct `InterruptStackFrame`, found `&mut InterruptStackFrame`
  |
  = note: expected fn pointer `extern "x86-interrupt" fn(InterruptStackFrame)`
                found fn item `extern "x86-interrupt" for<'r> fn(&'r mut InterruptStackFrame) {breakpoint_handler}`

@phil-opp
Copy link
Owner

This should be fixed with #990. Please let me know if you still have problems!

@phil-opp phil-opp unpinned this issue Jun 26, 2021
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.

2 participants