Skip to content

NetBSD 10.x compile fails (badly) #5506

Description

@isbm

Summary

Seems that we have a big problem with the libc constants on NetBSD 10.x

Details

error[E0432]: unresolved import `nix::sys::resource`
   --> vm/src/stdlib/time.rs:676:23
    |
676 |         use nix::sys::resource::{getrusage, UsageWho};
    |                       ^^^^^^^^ could not find `resource` in `sys`
    |
note: found an item that was configured out
   --> /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/mod.rs:96:13
    |
96  |     pub mod resource;
    |             ^^^^^^^^
note: the item is gated behind the `resource` feature
   --> /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.29.0/src/sys/mod.rs:95:8
    |
95  |     #![feature = "resource"]
    |        ^^^^^^^

error[E0425]: cannot find value `_SC_AIO_PRIO_DELTA_MAX` in crate `libc`
    --> vm/src/stdlib/posix.rs:2032:39
     |
2032 |         SC_AIO_PRIO_DELTA_MAX = libc::_SC_AIO_PRIO_DELTA_MAX,
     |                                       ^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_PRIORITIZED_IO` in crate `libc`
    --> vm/src/stdlib/posix.rs:2072:35
     |
2072 |         SC_PRIORITIZED_IO = libc::_SC_PRIORITIZED_IO,
     |                                   ^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_REALTIME_SIGNALS` in crate `libc`
    --> vm/src/stdlib/posix.rs:2074:37
     |
2074 |         SC_REALTIME_SIGNALS = libc::_SC_REALTIME_SIGNALS,
     |                                     ^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_RTSIG_MAX` in crate `libc`
    --> vm/src/stdlib/posix.rs:2076:30
     |
2076 |         SC_RTSIG_MAX = libc::_SC_RTSIG_MAX,
     |                              ^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_AIO_MAX`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1809:1
     |
1809 | pub const _SC_AIO_MAX: ::c_int = 52;
     | ------------------------------ similarly named constant `_SC_AIO_MAX` defined here

error[E0425]: cannot find value `_SC_SEM_VALUE_MAX` in crate `libc`
    --> vm/src/stdlib/posix.rs:2080:34
     |
2080 |         SC_SEM_VALUE_MAX = libc::_SC_SEM_VALUE_MAX,
     |                                  ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_SEM_NSEMS_MAX`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1844:1
     |
1844 | pub const _SC_SEM_NSEMS_MAX: ::c_int = 89;
     | ------------------------------------ similarly named constant `_SC_SEM_NSEMS_MAX` defined here

error[E0425]: cannot find value `_SC_SIGQUEUE_MAX` in crate `libc`
    --> vm/src/stdlib/posix.rs:2082:33
     |
2082 |         SC_SIGQUEUE_MAX = libc::_SC_SIGQUEUE_MAX,
     |                                 ^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XOPEN_CRYPT` in crate `libc`
    --> vm/src/stdlib/posix.rs:2102:32
     |
2102 |         SC_XOPEN_CRYPT = libc::_SC_XOPEN_CRYPT,
     |                                ^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_XOPEN_SHM`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/mod.rs:585:1
     |
585  | pub const _SC_XOPEN_SHM: ::c_int = 30;
     | -------------------------------- similarly named constant `_SC_XOPEN_SHM` defined here

error[E0425]: cannot find value `_SC_XOPEN_ENH_I18N` in crate `libc`
    --> vm/src/stdlib/posix.rs:2103:35
     |
2103 |         SC_XOPEN_ENH_I18N = libc::_SC_XOPEN_ENH_I18N,
     |                                   ^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XOPEN_LEGACY` in crate `libc`
    --> vm/src/stdlib/posix.rs:2104:33
     |
2104 |         SC_XOPEN_LEGACY = libc::_SC_XOPEN_LEGACY,
     |                                 ^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XOPEN_REALTIME` in crate `libc`
    --> vm/src/stdlib/posix.rs:2105:35
     |
2105 |         SC_XOPEN_REALTIME = libc::_SC_XOPEN_REALTIME,
     |                                   ^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XOPEN_REALTIME_THREADS` in crate `libc`
    --> vm/src/stdlib/posix.rs:2106:43
     |
2106 |         SC_XOPEN_REALTIME_THREADS = libc::_SC_XOPEN_REALTIME_THREADS,
     |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XOPEN_UNIX` in crate `libc`
    --> vm/src/stdlib/posix.rs:2108:31
     |
2108 |         SC_XOPEN_UNIX = libc::_SC_XOPEN_UNIX,
     |                               ^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_OPEN_MAX`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/mod.rs:559:1
     |
559  | pub const _SC_OPEN_MAX: ::c_int = 5;
     | ------------------------------- similarly named constant `_SC_OPEN_MAX` defined here

error[E0425]: cannot find value `_SC_XOPEN_VERSION` in crate `libc`
    --> vm/src/stdlib/posix.rs:2109:34
     |
2109 |         SC_XOPEN_VERSION = libc::_SC_XOPEN_VERSION,
     |                                  ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_2_VERSION`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/mod.rs:571:1
     |
571  | pub const _SC_2_VERSION: ::c_int = 17;
     | -------------------------------- similarly named constant `_SC_2_VERSION` defined here

error[E0425]: cannot find value `_SC_XOPEN_XCU_VERSION` in crate `libc`
    --> vm/src/stdlib/posix.rs:2110:38
     |
2110 |         SC_XOPEN_XCU_VERSION = libc::_SC_XOPEN_XCU_VERSION,
     |                                      ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `_SC_XBS5_ILP32_OFF32` in crate `libc`
    --> vm/src/stdlib/posix.rs:2117:37
     |
2117 |         SC_XBS5_ILP32_OFF32 = libc::_SC_XBS5_ILP32_OFF32,
     |                                     ^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_V6_ILP32_OFF32`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1831:1
     |
1831 | pub const _SC_V6_ILP32_OFF32: ::c_int = 74;
     | ------------------------------------- similarly named constant `_SC_V6_ILP32_OFF32` defined here

error[E0425]: cannot find value `_SC_XBS5_ILP32_OFFBIG` in crate `libc`
    --> vm/src/stdlib/posix.rs:2124:38
     |
2124 |         SC_XBS5_ILP32_OFFBIG = libc::_SC_XBS5_ILP32_OFFBIG,
     |                                      ^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_V6_ILP32_OFFBIG`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1832:1
     |
1832 | pub const _SC_V6_ILP32_OFFBIG: ::c_int = 75;
     | -------------------------------------- similarly named constant `_SC_V6_ILP32_OFFBIG` defined here

error[E0425]: cannot find value `_SC_XBS5_LP64_OFF64` in crate `libc`
    --> vm/src/stdlib/posix.rs:2131:36
     |
2131 |         SC_XBS5_LP64_OFF64 = libc::_SC_XBS5_LP64_OFF64,
     |                                    ^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_V6_LP64_OFF64`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1833:1
     |
1833 | pub const _SC_V6_LP64_OFF64: ::c_int = 76;
     | ------------------------------------ similarly named constant `_SC_V6_LP64_OFF64` defined here

error[E0425]: cannot find value `_SC_XBS5_LPBIG_OFFBIG` in crate `libc`
    --> vm/src/stdlib/posix.rs:2138:38
     |
2138 |         SC_XBS5_LPBIG_OFFBIG = libc::_SC_XBS5_LPBIG_OFFBIG,
     |                                      ^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `_SC_V6_LPBIG_OFFBIG`
     |
    ::: /home/bo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.159/src/unix/bsd/netbsdlike/netbsd/mod.rs:1834:1
     |
1834 | pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 77;
     | -------------------------------------- similarly named constant `_SC_V6_LPBIG_OFFBIG` defined here

error[E0081]: discriminant value `17` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2029 |         SC_2_VERSION = libc::_SC_2_VERSION,
     |                        ------------------- `17` assigned here
...
2076 |         SC_RTSIG_MAX = libc::_SC_RTSIG_MAX,
     |                        ------------------- `17` assigned here

error[E0081]: discriminant value `53` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2032 |         SC_AIO_PRIO_DELTA_MAX = libc::_SC_AIO_PRIO_DELTA_MAX,
     |                                 ---------------------------- `53` assigned here
...
2056 |         SC_MESSAGE_PASSING = libc::_SC_MESSAGE_PASSING,
     |                              ------------------------- `53` assigned here

error[E0081]: discriminant value `9` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2036 |         SC_BC_BASE_MAX = libc::_SC_BC_BASE_MAX,
     |                          --------------------- `9` assigned here
...
2102 |         SC_XOPEN_CRYPT = libc::_SC_XOPEN_CRYPT,
     |                          --------------------- `9` assigned here

error[E0081]: discriminant value `10` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2037 |         SC_BC_DIM_MAX = libc::_SC_BC_DIM_MAX,
     |                         -------------------- `10` assigned here
...
2103 |         SC_XOPEN_ENH_I18N = libc::_SC_XOPEN_ENH_I18N,
     |                             ------------------------ `10` assigned here

error[E0081]: discriminant value `11` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2038 |         SC_BC_SCALE_MAX = libc::_SC_BC_SCALE_MAX,
     |                           ---------------------- `11` assigned here
...
2104 |         SC_XOPEN_LEGACY = libc::_SC_XOPEN_LEGACY,
     |                           ---------------------- `11` assigned here

error[E0081]: discriminant value `12` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2039 |         SC_BC_STRING_MAX = libc::_SC_BC_STRING_MAX,
     |                            ----------------------- `12` assigned here
...
2105 |         SC_XOPEN_REALTIME = libc::_SC_XOPEN_REALTIME,
     |                             ------------------------ `12` assigned here

error[E0081]: discriminant value `13` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2042 |         SC_COLL_WEIGHTS_MAX = libc::_SC_COLL_WEIGHTS_MAX,
     |                               -------------------------- `13` assigned here
...
2106 |         SC_XOPEN_REALTIME_THREADS = libc::_SC_XOPEN_REALTIME_THREADS,
     |                                     -------------------------------- `13` assigned here

error[E0081]: discriminant value `32` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2048 |         SC_IOV_MAX = libc::_SC_IOV_MAX,
     |                      ----------------- `32` assigned here
...
2109 |         SC_XOPEN_VERSION = libc::_SC_XOPEN_VERSION,
     |                            ----------------------- `32` assigned here

error[E0081]: discriminant value `37` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2051 |         SC_LOGIN_NAME_MAX = libc::_SC_LOGIN_NAME_MAX,
     |                             ------------------------ `37` assigned here
...
2138 |         SC_XBS5_LPBIG_OFFBIG = libc::_SC_XBS5_LPBIG_OFFBIG,
     |                                --------------------------- `37` assigned here

error[E0081]: discriminant value `33` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2052 |         SC_MAPPED_FILES = libc::_SC_MAPPED_FILES,
     |                           ---------------------- `33` assigned here
...
2110 |         SC_XOPEN_XCU_VERSION = libc::_SC_XOPEN_XCU_VERSION,
     |                                --------------------------- `33` assigned here

error[E0081]: discriminant value `34` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2053 |         SC_MEMLOCK = libc::_SC_MEMLOCK,
     |                      ----------------- `34` assigned here
...
2117 |         SC_XBS5_ILP32_OFF32 = libc::_SC_XBS5_ILP32_OFF32,
     |                               -------------------------- `34` assigned here

error[E0081]: discriminant value `35` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2054 |         SC_MEMLOCK_RANGE = libc::_SC_MEMLOCK_RANGE,
     |                            ----------------------- `35` assigned here
...
2124 |         SC_XBS5_ILP32_OFFBIG = libc::_SC_XBS5_ILP32_OFFBIG,
     |                                --------------------------- `35` assigned here

error[E0081]: discriminant value `36` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2055 |         SC_MEMORY_PROTECTION = libc::_SC_MEMORY_PROTECTION,
     |                                --------------------------- `36` assigned here
...
2131 |         SC_XBS5_LP64_OFF64 = libc::_SC_XBS5_LP64_OFF64,
     |                              ------------------------- `36` assigned here

error[E0081]: discriminant value `57` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2074 |         SC_REALTIME_SIGNALS = libc::_SC_REALTIME_SIGNALS,
     |                               -------------------------- `57` assigned here
...
2088 |         SC_THREAD_DESTRUCTOR_ITERATIONS = libc::_SC_THREAD_DESTRUCTOR_ITERATIONS,
     |                                           -------------------------------------- `57` assigned here

error[E0081]: discriminant value `31` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2084 |         SC_SYNCHRONIZED_IO = libc::_SC_SYNCHRONIZED_IO,
     |                              ------------------------- `31` assigned here
...
2108 |         SC_XOPEN_UNIX = libc::_SC_XOPEN_UNIX,
     |                         -------------------- `31` assigned here

error[E0081]: discriminant value `88` assigned more than once
    --> vm/src/stdlib/posix.rs:2020:5
     |
2020 |     pub enum SysconfVar {
     |     ^^^^^^^^^^^^^^^^^^^
...
2082 |         SC_SIGQUEUE_MAX = libc::_SC_SIGQUEUE_MAX,
     |                           ---------------------- `88` assigned here
...
2098 |         SC_TIMER_MAX = libc::_SC_TIMER_MAX,
     |                        ------------------- `88` assigned here

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