efi icon indicating copy to clipboard operation
efi copied to clipboard

Compilation fails on latest nightly

Open netthier opened this issue 4 years ago • 7 comments

error[E0425]: cannot find function `utf8_char_width` in module `core_str`
    --> /home/lmt/.cargo/registry/src/github.com-1ecc6299db9ec823/efi-0.2.1/src/io/mod.rs:1960:31
     |
1960 |         let width = core_str::utf8_char_width(first_byte);
     |                               ^^^^^^^^^^^^^^^ not found in `core_str`

% rustc --version
rustc 1.54.0-nightly (5c0292654 2021-05-11)

netthier avatar May 12 '21 15:05 netthier

This issue doesn't occur when building from git master, maybe bump crate version?

netthier avatar May 12 '21 18:05 netthier

@netthier Apologies for the late reply. I've been really busy with some other stuff.

I know that the compilation situation is a bit broken. Will try to find time to fix it, but can't promise anything unfortunately :(. In the meanwhile if you can raise a PR I'll be happy to accept it :)

gurry avatar Jun 08 '21 13:06 gurry

Ah, no problem. This should be fixable by just releasing a new crate version, since master actually runs fine, while the latest version available on crates.io doesn't.

netthier avatar Jun 08 '21 14:06 netthier

Okay. I'll take a look. Thanks :)

gurry avatar Jun 09 '21 01:06 gurry

I just checked (it's been a while since I worked with this code) and the master builds fine, but the sample application in examples fails to build. I'll have to fix that. If you have time, please feel free to do so because like I said I may not have time :(. I'll update the crate version once this issue is fixed (whether it is me or someone else who fixes it)

gurry avatar Jun 09 '21 01:06 gurry

Seems to build fine for me by adding -Z build-std-features=compiler-builtins-mem Full command:

cargo build --example sample_efi_app -Z build-std=core,alloc -Z build-std-features=compiler-builtins-mem --target x86_64-unknown-uefi

netthier avatar Jun 09 '21 10:06 netthier

I see. Thanks for noticing that.

I'll probably find some time soon and look into it.

gurry avatar Jun 10 '21 05:06 gurry