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

Compile failed on rustc 1.59.0-nightly #329

Closed
Martins3 opened this issue Dec 16, 2021 · 1 comment · Fixed by #331
Closed

Compile failed on rustc 1.59.0-nightly #329

Martins3 opened this issue Dec 16, 2021 · 1 comment · Fixed by #331

Comments

@Martins3
Copy link

Hi, I can't compile the template following the instructions:

After doing some search on Google, I found this:

It seems below minor modification can solve the problem:

diff --git a/uefi-services/src/lib.rs b/uefi-services/src/lib.rs
index c60621b..a2c066d 100644
--- a/uefi-services/src/lib.rs
+++ b/uefi-services/src/lib.rs
@@ -18,7 +18,6 @@

 #![no_std]
 #![feature(alloc_error_handler)]
-#![feature(asm)]
 #![feature(lang_items)]
 #![feature(panic_info_message)]
 #![feature(abi_efiapi)]
@@ -30,6 +29,7 @@ extern crate uefi;

 use core::ffi::c_void;
 use core::ptr::NonNull;
+use core::arch::asm;

 use cfg_if::cfg_if;

./build.py run would fail out of the same reason.

I'm just a beginner of Rust, maybe I'm wrong, thanks for your attention in advance.

nicholasbishop added a commit to toku-sa-n/uefi-rs that referenced this issue Dec 16, 2021
Add `use core::arch::asm` in a couple places, and add a temporary
override of the qemu-exit dep to point at a branch with the asm fix.

Partially fixes rust-osdev#329 (but
keep it open until qemu-exit can be switched back to a normal release.)
@nicholasbishop
Copy link
Member

Thanks for the report, should be fixed now.

I added a temporary override of the qemu-exit dep, so keeping this bug open until that's resolved.

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