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 failed. #2

Closed
mrunix opened this issue Oct 14, 2020 · 13 comments
Closed

Build failed. #2

mrunix opened this issue Oct 14, 2020 · 13 comments

Comments

@mrunix
Copy link

mrunix commented Oct 14, 2020

$ cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit
   Compiling std v0.0.0 (/home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0412]: cannot find type `CommandArgs` in module `imp`
    --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:1022:17
     |
1022 |     inner: imp::CommandArgs<'a>,
     |                 ^^^^^^^^^^^ not found in `imp`

error[E0412]: cannot find type `MovableMutex` in module `mutex_imp`
 --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/condvar.rs:8:33
  |
8 | type CondvarCheck = <mutex_imp::MovableMutex as check::CondvarCheck>::Check;
  |                                 ^^^^^^^^^^^^ not found in `mutex_imp`
  |
help: consider importing this struct
  |
1 | use crate::sys_common::mutex::MovableMutex;
  |

error[E0412]: cannot find type `MovableMutex` in module `imp`
  --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/mutex.rs:64:30
   |
64 | pub struct MovableMutex(imp::MovableMutex);
   |                              ^^^^^^^^^^^^ not found in `imp`
   |
help: consider importing this struct
   |
1  | use crate::sys_common::condvar::MovableMutex;
   |

error[E0433]: failed to resolve: could not find `MovableMutex` in `imp`
  --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/mutex.rs:71:30
   |
71 |         let mut mutex = imp::MovableMutex::from(imp::Mutex::new());
   |                              ^^^^^^^^^^^^ not found in `imp`
   |
help: consider importing this struct
   |
1  | use crate::sys_common::condvar::MovableMutex;
   |

error[E0599]: no method named `get_program` found for struct `hermit::process::Command` in the current scope
   --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:913:20
    |
913 |         self.inner.get_program()
    |                    ^^^^^^^^^^^ method not found in `hermit::process::Command`
    | 
   ::: /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/hermit/process.rs:15:1
    |
15  | pub struct Command {
    | ------------------ method `get_program` not found for this

error[E0599]: no method named `get_args` found for struct `hermit::process::Command` in the current scope
   --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:936:41
    |
936 |         CommandArgs { inner: self.inner.get_args() }
    |                                         ^^^^^^^^ method not found in `hermit::process::Command`
    | 
   ::: /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/hermit/process.rs:15:1
    |
15  | pub struct Command {
    | ------------------ method `get_args` not found for this

error[E0599]: no method named `get_envs` found for struct `hermit::process::Command` in the current scope
   --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:968:20
    |
968 |         self.inner.get_envs()
    |                    ^^^^^^^^ method not found in `hermit::process::Command`
    | 
   ::: /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/hermit/process.rs:15:1
    |
15  | pub struct Command {
    | ------------------ method `get_envs` not found for this

error[E0599]: no method named `get_current_dir` found for struct `hermit::process::Command` in the current scope
   --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:989:20
    |
989 |         self.inner.get_current_dir()
    |                    ^^^^^^^^^^^^^^^ method not found in `hermit::process::Command`
    | 
   ::: /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/hermit/process.rs:15:1
    |
15  | pub struct Command {
    | ------------------ method `get_current_dir` not found for this

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0412, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `std`

To learn more, run the command again with --verbose.
$ rustc --version
rustc 1.49.0-nightly (adef9da30 2020-10-13)
@stlankes
Copy link
Contributor

stlankes commented Oct 28, 2020

Yes, this is a disadvantage of using a nightly compiler. Sometimes the changes in Rust's standard library required also changes in our kernel. The current issue requires also some changes in the standard library (rust-lang/rust#77610).

I uploaded the latest version of our libOS. Please try again to build the demo with following commands:

cargo update
cargo build

Does it work on your system? If not, please update also the Rust' nightly compiler.

@stlankes
Copy link
Contributor

I got the feedback that it works.

@mrunix
Copy link
Author

mrunix commented Oct 29, 2020

thanks, I will try it.

@mrunix
Copy link
Author

mrunix commented Oct 30, 2020

Same errors.

lix@lixos:~/workspace/repos/os/rusty-demo$ cargo update  
    Updating crates.io index  
    Updating num-traits v0.2.12 -> v0.2.14  
lix@lixos:~/workspace/repos/os/rusty-demo$ cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit  
   Compiling num-traits v0.2.14
   Compiling std v0.0.0 (/home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0412]: cannot find type `CommandArgs` in module `imp`
    --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:1022:17
     |
1022 |     inner: imp::CommandArgs<'a>,
     |                 ^^^^^^^^^^^ not found in `imp`

error[E0412]: cannot find type `MovableMutex` in module `mutex_imp`
 --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/condvar.rs:8:33lix@lixos:~/workspace/repos/os/rusty-demo$ cargo update
    Updating crates.io index
    Updating num-traits v0.2.12 -> v0.2.14
lix@lixos:~/workspace/repos/os/rusty-demo$ cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit
   Compiling num-traits v0.2.14
   Compiling std v0.0.0 (/home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0412]: cannot find type `CommandArgs` in module `imp`
    --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/process.rs:1022:17
     |
1022 |     inner: imp::CommandArgs<'a>,
     |                 ^^^^^^^^^^^ not found in `imp`

error[E0412]: cannot find type `MovableMutex` in module `mutex_imp`
 --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/condvar.rs:8:33
  |
8 | type CondvarCheck = <mutex_imp::MovableMutex as check::CondvarCheck>::Check;
  |                                 ^^^^^^^^^^^^ not found in `mutex_imp`
  |
help: consider importing this struct
  |
1 | use crate::sys_common::mutex::MovableMutex;
  |
  |
8 | type CondvarCheck = <mutex_imp::MovableMutex as check::CondvarCheck>::Check;
  |                                 ^^^^^^^^^^^^ not found in `mutex_imp`
  |
help: consider importing this struct
  |
1 | use crate::sys_common::mutex::MovableMutex;
  |

error[E0412]: cannot find type `MovableMutex` in module `imp`
  --> /home/lix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/mutex.rs:64:30

@stlankes stlankes reopened this Oct 30, 2020
@stlankes
Copy link
Contributor

stlankes commented Oct 30, 2020

Do you use also rustfmt? It is currently broken https://rust-lang-nursery.github.io/rust-toolstate/. Consequently, rustup installs the latest nightly compiler, where rustfmt is available. Unfortunately it is not the latest version of the nightly compiler...

The TravisCI pipeline seems to work.

@mrunix
Copy link
Author

mrunix commented Oct 30, 2020

I uninstall rustfmt, then cargo update. Still error.

@stlankes
Copy link
Contributor

stlankes commented Oct 30, 2020

Do you also use rustup update? You can use rustup to update the toolchain, while cargo is used to update Cargo.lock.

@mrunix
Copy link
Author

mrunix commented Oct 30, 2020

still error

lix@lixos:~/workspace/repos/os/rusty-demo$ rustc --version
rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)

@stlankes
Copy link
Contributor

stlankes commented Oct 30, 2020

hm, the compiler is too old

$ rustc --version
rustc 1.49.0-nightly (fd542592f 2020-10-26)

Do you installed miri or rls?

@mrunix
Copy link
Author

mrunix commented Oct 31, 2020

yes, installed rls.

@stlankes
Copy link
Contributor

stlankes commented Nov 1, 2020

As long as rls is not built for the current nightly compiler, you have to uninstall it.

@stlankes
Copy link
Contributor

The rustup version allows to specify the toolchain exactly. I did for our demo. Does it now work?

@stlankes
Copy link
Contributor

I close this issue. I think that we solved it. At least GitActions are able to run the application.

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