Skip to content

nix issues on Illumos #2675

@extrowerk

Description

@extrowerk

Trying to compile latest fish shell git master on AMD 64 bit Illumos (OmniOS) results in the following errors. As I don't know too much about rust, I don't try to tell where the problem lies.

szilard@build:~/projekt/fish-shell$ cargo b
warning: [email protected]: Cannot find sphinx-build to build man pages.
warning: [email protected]: If you install it now you need to run `cargo clean` and rebuild, or set $FISH_BUILD_DOCS=1 explicitly.
   Compiling fish v4.1.0-alpha0 (/export/home/szilard/projekt/fish-shell)
error[E0433]: failed to resolve: could not find `resource` in `sys`
  --> src/builtins/ulimit.rs:18:66
   |
18 |     let resource = unsafe { std::mem::transmute::<i32, nix::sys::resource::Resource>(resource) };
   |                                                                  ^^^^^^^^ could not find `resource` in `sys`

error[E0433]: failed to resolve: could not find `resource` in `sys`
  --> src/builtins/ulimit.rs:19:15
   |
19 |     nix::sys::resource::getrlimit(resource)
   |               ^^^^^^^^ could not find `resource` in `sys`

error[E0433]: failed to resolve: could not find `resource` in `sys`
  --> src/builtins/ulimit.rs:27:66
   |
27 |     let resource = unsafe { std::mem::transmute::<i32, nix::sys::resource::Resource>(resource) };
   |                                                                  ^^^^^^^^ could not find `resource` in `sys`

error[E0433]: failed to resolve: could not find `resource` in `sys`
  --> src/builtins/ulimit.rs:28:15
   |
28 |     nix::sys::resource::setrlimit(resource, rlim_cur, rlim_max)
   |               ^^^^^^^^ could not find `resource` in `sys`

error[E0425]: cannot find function `mkostemp` in crate `libc`
    --> src/fs.rs:31:24
     |
31   |         unsafe { libc::mkostemp(name, O_CLOEXEC) }
     |                        ^^^^^^^^ help: a function with a similar name exists: `mkstemp`
     |
    ::: /export/home/szilard/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.175/src/unix/mod.rs:1584:5
     |
1584 |     pub fn mkstemp(template: *mut c_char) -> c_int;
     |     ----------------------------------------------- similarly named function `mkstemp` defined here

error[E0425]: cannot find value `statfs` in crate `libc`
    --> src/path.rs:734:19
     |
734  |             libc::statfs,
     |                   ^^^^^^ help: a function with a similar name exists: `statvfs`
     |
    ::: /export/home/szilard/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.175/src/unix/mod.rs:1539:5
     |
1539 |     pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> c_int;
     |     ---------------------------------------------------------------- similarly named function `statvfs` defined here

error[E0412]: cannot find type `statfs` in crate `libc`
   --> src/path.rs:735:27
    |
735 |               |stat: &libc::statfs| stat.f_flags,
    |                             ^^^^^^ help: a struct with a similar name exists: `statvfs`
    |
   ::: /export/home/szilard/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.175/src/unix/solarish/mod.rs:76:1
    |
76  | / s! {
77  | |     pub struct in_addr {
78  | |         pub s_addr: crate::in_addr_t,
...   |
500 | | }
    | |_- similarly named struct `statvfs` defined here

error[E0609]: no field `d_type` on type `&dirent`
   --> src/wutil/dir_iter.rs:296:50
    |
296 |         let typ = dirent_type_to_entry_type(dent.d_type);
    |                                                  ^^^^^^ unknown field
    |
    = note: available fields are: `d_ino`, `d_off`, `d_reclen`, `d_name`

error[E0308]: mismatched types
   --> src/fork_exec/spawn.rs:121:18
    |
121 |         flags |= libc::POSIX_SPAWN_SETSIGDEF;
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `i16`

error[E0277]: no implementation for `i32 |= i16`
   --> src/fork_exec/spawn.rs:121:15
    |
121 |         flags |= libc::POSIX_SPAWN_SETSIGDEF;
    |               ^^ no implementation for `i32 |= i16`
    |
    = help: the trait `BitOrAssign<i16>` is not implemented for `i32`
    = help: the following other types implement trait `BitOrAssign<Rhs>`:
              `i32` implements `BitOrAssign<&i32>`
              `i32` implements `BitOrAssign`

error[E0308]: mismatched types
   --> src/fork_exec/spawn.rs:122:18
    |
122 |         flags |= libc::POSIX_SPAWN_SETSIGMASK;
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `i16`

error[E0277]: no implementation for `i32 |= i16`
   --> src/fork_exec/spawn.rs:122:15
    |
122 |         flags |= libc::POSIX_SPAWN_SETSIGMASK;
    |               ^^ no implementation for `i32 |= i16`
    |
    = help: the trait `BitOrAssign<i16>` is not implemented for `i32`
    = help: the following other types implement trait `BitOrAssign<Rhs>`:
              `i32` implements `BitOrAssign<&i32>`
              `i32` implements `BitOrAssign`

error[E0308]: mismatched types
   --> src/fork_exec/spawn.rs:124:22
    |
124 |             flags |= libc::POSIX_SPAWN_SETPGROUP;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `i16`

error[E0277]: no implementation for `i32 |= i16`
   --> src/fork_exec/spawn.rs:124:19
    |
124 |             flags |= libc::POSIX_SPAWN_SETPGROUP;
    |                   ^^ no implementation for `i32 |= i16`
    |
    = help: the trait `BitOrAssign<i16>` is not implemented for `i32`
    = help: the following other types implement trait `BitOrAssign<Rhs>`:
              `i32` implements `BitOrAssign<&i32>`
              `i32` implements `BitOrAssign`

Some errors have detailed explanations: E0277, E0308, E0412, E0425, E0433, E0609.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `fish` (lib) due to 14 previous errors
szilard@build:~/projekt/fish-shell$ uname -a
SunOS build 5.11 omnios-r151054-f66c95f374 i86pc i386 i86pc
szilard@build:~/projekt/fish-shell$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions