-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
regressionSomething that used to work, but was broken, especially between releasesSomething that used to work, but was broken, especially between releases
Milestone
Description
@ridiculousfish The rust libc changes fail to build under OpenBSD 7.7. Build fails on several of the RLIMIT_*
variables and _CS_PATH
:
error[E0425]: cannot find value `RLIMIT_AS` in crate `libc`
--> src/builtins/ulimit.rs:26:43
|
26 | pub const AS: libc::c_int = libc::RLIMIT_AS as _;
| ^^^^^^^^^ help: a constant with a similar name exists: `RLIMIT_RSS`
|
::: /home/darkshadow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/bsd/netbsdlike/mod.rs:419:1
|
419 | pub const RLIMIT_RSS: c_int = 5;
| --------------------------- similarly named constant `RLIMIT_RSS` defined here
error[E0425]: cannot find value `RLIMIT_SBSIZE` in crate `libc`
--> src/builtins/ulimit.rs:73:47
|
73 | pub const SBSIZE: libc::c_int = libc::RLIMIT_SBSIZE;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: `RLIMIT_FSIZE`
|
::: /home/darkshadow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/bsd/netbsdlike/mod.rs:415:1
|
415 | pub const RLIMIT_FSIZE: c_int = 1;
| ----------------------------- similarly named constant `RLIMIT_FSIZE` defined here
error[E0425]: cannot find value `RLIMIT_NICE` in crate `libc`
--> src/builtins/ulimit.rs:74:45
|
74 | pub const NICE: libc::c_int = libc::RLIMIT_NICE;
| ^^^^^^^^^^^ help: a constant with a similar name exists: `RLIMIT_CORE`
|
::: /home/darkshadow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/bsd/netbsdlike/mod.rs:418:1
|
418 | pub const RLIMIT_CORE: c_int = 4;
| ---------------------------- similarly named constant `RLIMIT_CORE` defined here
error[E0425]: cannot find value `RLIMIT_NTHR` in crate `libc`
--> src/builtins/ulimit.rs:76:45
|
76 | pub const NTHR: libc::c_int = libc::RLIMIT_NTHR;
| ^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `RLIMIT_SWAP` in crate `libc`
--> src/builtins/ulimit.rs:77:45
|
77 | pub const SWAP: libc::c_int = libc::RLIMIT_SWAP;
| ^^^^^^^^^^^ help: a constant with a similar name exists: `RLIMIT_STACK`
|
::: /home/darkshadow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/bsd/netbsdlike/mod.rs:417:1
|
417 | pub const RLIMIT_STACK: c_int = 3;
| ----------------------------- similarly named constant `RLIMIT_STACK` defined here
error[E0425]: cannot find value `RLIMIT_KQUEUES` in crate `libc`
--> src/builtins/ulimit.rs:78:48
|
78 | pub const KQUEUES: libc::c_int = libc::RLIMIT_KQUEUES;
| ^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `RLIMIT_NPTS` in crate `libc`
--> src/builtins/ulimit.rs:79:45
|
79 | pub const NPTS: libc::c_int = libc::RLIMIT_NPTS;
| ^^^^^^^^^^^ help: a constant with a similar name exists: `RLIMIT_CPU`
|
::: /home/darkshadow/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.176/src/unix/bsd/netbsdlike/mod.rs:414:1
|
414 | pub const RLIMIT_CPU: c_int = 0;
| --------------------------- similarly named constant `RLIMIT_CPU` defined here
error[E0425]: cannot find value `_CS_PATH` in crate `libc`
--> src/env/environment.rs:570:43
|
570 | let buf_size = unsafe { confstr(libc::_CS_PATH, std::ptr::null_mut(), 0) };
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `_CS_PATH` in crate `libc`
--> src/env/environment.rs:574:36
|
574 | unsafe { confstr(libc::_CS_PATH, buf.as_mut_ptr(), buf_size) };
| ^^^^^^^^ not found in `libc`
limits supported by OpenBSD:
#define RLIMIT_CPU 0 /* cpu time in milliseconds */
#define RLIMIT_FSIZE 1 /* maximum file size */
#define RLIMIT_DATA 2 /* data size */
#define RLIMIT_STACK 3 /* stack size */
#define RLIMIT_CORE 4 /* core file size */
#define RLIMIT_RSS 5 /* resident set size */
#define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */
#define RLIMIT_NPROC 7 /* number of processes */
#define RLIMIT_NOFILE 8 /* number of open files */
#define RLIM_NLIMITS 9 /* number of resource limits */
OpenBSD does have _CS_PATH
in unistd.h
(defined to 1), guess the libc
crate I get just doesn't have it defined.
Rust version being used is 1.86.0. There's no easy way to update rust on OpenBSD, the only way I could is to upgrade from using the stable version of the OS to the unstable version.
Metadata
Metadata
Assignees
Labels
regressionSomething that used to work, but was broken, especially between releasesSomething that used to work, but was broken, especially between releases