nsh
nsh copied to clipboard
Compile issues/my mistake
Issue: Compilation Errors with nsh v0.4.2
Description:
Attempting to install nsh v0.4.2 using cargo install nsh results in multiple compilation errors. The errors are related to unresolved imports and mismatched types, primarily due to missing features in the nix crate.
Steps to Reproduce:
- Run
cargo install nsh. - Observe the compilation errors.
Error Log:
error[E0432]: unresolved imports nix::unistd::{fork, setpgid, ForkResult, Pid} error[E0432]: unresolved imports nix::sys::signal::{kill, sigaction, SaFlags, SigAction, SigHandler, SigSet, Signal} error[E0433]: failed to resolve: could not find termios in sys error[E0432]: unresolved import nix::sys::termios error[E0432]: unresolved import nix::sys::wait error[E0432]: unresolved imports nix::unistd::{dup2, execv, fork, getpid, setpgid, tcsetpgrp, ForkResult, Pid} error[E0425]: cannot find function isatty in module nix::unistd error[E0425]: cannot find function gethostname in module unistd error[E0425]: cannot find function fsync in module unistd error[E0308]: mismatched types (expected i32, found OwnedFd) error[E0277]: the trait bound i32: AsFd is not satisfied
Possible Solution:
Enable the required features in the nix crate dependencies. For example:
[dependencies]
nix = { version = "0.29.0", features = ["process", "signal", "term", "fs", "hostname"] }
Thank!