Skip to content

Compile issues/my mistake #53

@ghost

Description

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:

  1. Run cargo install nsh.
  2. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions