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

Build leaf error #18

Closed
mikexxma opened this issue Sep 1, 2021 · 4 comments
Closed

Build leaf error #18

mikexxma opened this issue Sep 1, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@mikexxma
Copy link

mikexxma commented Sep 1, 2021

error[E0599]: no method named raw found for struct Handle in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\fs.rs:360:29
|
360 | self.handle.raw(),
| ^^^ method not found in Handle
|
::: C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\handle.rs:17:1
|
17 | pub struct Handle(OwnedHandle);
| ------------------------------- method raw not found for this

error[E0599]: no method named raw found for struct Handle in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\fs.rs:388:29
|
388 | self.handle.raw(),
| ^^^ method not found in Handle
|
::: C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\handle.rs:17:1
|
17 | pub struct Handle(OwnedHandle);
| ------------------------------- method raw not found for this

error[E0599]: no function or associated item named new found for struct Handle in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\stdio_uwp.rs:28:26
|
28 | let handle = Handle::new(handle);
| ^^^ function or associated item not found in Handle
|
::: C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\handle.rs:17:1
|
17 | pub struct Handle(OwnedHandle);
| ------------------------------- function or associated item new not found for this

error[E0599]: no method named write found for struct ManuallyDrop<_> in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\stdio_uwp.rs:29:31
|
29 | ManuallyDrop::new(handle).write(data)
| ^^^^^ method not found in ManuallyDrop<_>
|
= note: ManuallyDrop::new(handle) is a function, perhaps you wish to call it
= help: items from traits can only be used if the trait is implemented and in scope
note: io::Write defines an item write, perhaps you need to implement it
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\io\mod.rs:1368:1
|
1368 | pub trait Write {
| ^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named new found for struct Handle in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\stdio_uwp.rs:41:30
|
41 | let handle = Handle::new(handle);
| ^^^ function or associated item not found in Handle
|
::: C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\handle.rs:17:1
|
17 | pub struct Handle(OwnedHandle);
| ------------------------------- function or associated item new not found for this

error[E0599]: no method named read found for struct ManuallyDrop<_> in the current scope
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\windows\stdio_uwp.rs:42:35
|
42 | ManuallyDrop::new(handle).read(buf)
| ^^^^ method not found in ManuallyDrop<_>
|
= note: ManuallyDrop::new(handle) is a function, perhaps you wish to call it
= help: items from traits can only be used if the trait is implemented and in scope
note: io::Read defines an item read, perhaps you need to implement it
--> C:\Users\zenlayer.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\io\mod.rs:520:1
|
520 | pub trait Read {
| ^^^^^^^^^^^^^^

For more information about this error, try rustc --explain E0599.
error: could not compile std due to 6 previous errors

@mikexxma
Copy link
Author

mikexxma commented Sep 1, 2021

this is my version and I have installed “nightly-x86_64-pc-windows-msvc'

\leaf-ffi> rustc --version
rustc 1.56.0-nightly (29ef6cf16 2021-08-31)
\leaf-ffi> rustup toolchain add nightly
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'

@bdbai bdbai added the bug Something isn't working label Sep 1, 2021
@bdbai
Copy link
Member

bdbai commented Sep 1, 2021

Seems like recent changes of libstd broke UWP targets. Before we start to look into it, please try the nightly toolchain on 2021-08-13, which is the one I am using.

rustup toolchain install nightly-2021-08-13

@mikexxma
Copy link
Author

mikexxma commented Sep 1, 2021

rustup toolchain install nightly-2021-08-13

it works fine thks

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 23, 2021
Fix WinUWP std compilation errors due to I/O safety

I/O safety for Windows has landed in rust-lang#87329. However, it does not cover UWP specific parts and prevents all UWP targets from building. See YtFlow/Maple#18. This PR fixes these compile errors when building std for UWP targets.
@bdbai
Copy link
Member

bdbai commented Sep 25, 2021

Given rust-lang/rust#88587 has been merged and building libstd no longer fails since toolchain nightly-2021-09-24, I will close this issue. Feel free to open another one in case build fails again.

@bdbai bdbai closed this as completed Sep 25, 2021
ehuss pushed a commit to ehuss/rust that referenced this issue Oct 4, 2021
Fix WinUWP std compilation errors due to I/O safety

I/O safety for Windows has landed in rust-lang#87329. However, it does not cover UWP specific parts and prevents all UWP targets from building. See YtFlow/Maple#18. This PR fixes these compile errors when building std for UWP targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants