Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rlimit 0.8.1 compilation error on NetBSD #39

Closed
0-wiz-0 opened this issue Apr 5, 2022 · 1 comment · Fixed by #40
Closed

rlimit 0.8.1 compilation error on NetBSD #39

0-wiz-0 opened this issue Apr 5, 2022 · 1 comment · Fixed by #40
Labels
bug Something isn't working

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Apr 5, 2022

When compiling rlimit 0.8.1 on NetBSD, I see:

error[E0425]: cannot find value `RLIM_INFINITY` in module `C`
 --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/unix.rs:7:30
  |
7 | pub const INFINITY: u64 = C::RLIM_INFINITY as u64;
  |                              ^^^^^^^^^^^^^ not found in `C`
  |
help: consider importing this constant
  |
1 | use libc::RLIM_INFINITY;
  |

error[E0422]: cannot find struct, variant or union type `rlimit` in module `C`
  --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/unix.rs:23:19
   |
23 |     let rlim = C::rlimit {
   |                   ^^^^^^ not found in `C`
   |
help: consider importing this struct
   |
1  | use libc::rlimit;
   |

error[E0425]: cannot find function `setrlimit` in module `C`
  --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/unix.rs:28:27
   |
28 |     let ret = unsafe { C::setrlimit(resource.as_raw() as _, &rlim) };
   |                           ^^^^^^^^^ not found in `C`
   |
help: consider importing one of these items
   |
1  | use crate::setrlimit;
   |
1  | use libc::setrlimit;
   |

error[E0425]: cannot find function `getrlimit` in module `C`
  --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/unix.rs:44:27
   |
44 |     let ret = unsafe { C::getrlimit(resource.as_raw() as _, &mut rlim) };
   |                           ^^^^^^^^^ not found in `C`
   |
help: consider importing one of these items
   |
1  | use crate::getrlimit;
   |
1  | use libc::getrlimit;
   |

error[E0425]: cannot find value `RLIMIT_AS` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:221:15
    |
221 |     AS = 1 => RLIMIT_AS,
    |               ^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_AS;
    |

error[E0425]: cannot find value `RLIMIT_CORE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:226:17
    |
226 |     CORE = 2 => RLIMIT_CORE,
    |                 ^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_CORE;
    |

error[E0425]: cannot find value `RLIMIT_CPU` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:231:16
    |
231 |     CPU = 3 => RLIMIT_CPU,
    |                ^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_CPU;
    |

error[E0425]: cannot find value `RLIMIT_DATA` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:237:17
    |
237 |     DATA = 4 => RLIMIT_DATA,
    |                 ^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_DATA;
    |

error[E0425]: cannot find value `RLIMIT_FSIZE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:242:18
    |
242 |     FSIZE = 5 => RLIMIT_FSIZE,
    |                  ^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_FSIZE;
    |

error[E0425]: cannot find value `RLIMIT_KQUEUES` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:246:20
    |
246 |     KQUEUES = 6 => RLIMIT_KQUEUES,
    |                    ^^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_LOCKS` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:254:18
    |
254 |     LOCKS = 7 => RLIMIT_LOCKS,
    |                  ^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_MEMLOCK` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:259:20
    |
259 |     MEMLOCK = 8 => RLIMIT_MEMLOCK,
    |                    ^^^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_MEMLOCK;
    |

error[E0425]: cannot find value `RLIMIT_MSGQUEUE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:265:21
    |
265 |     MSGQUEUE = 9 => RLIMIT_MSGQUEUE,
    |                     ^^^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_NICE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:271:18
    |
271 |     NICE = 10 => RLIMIT_NICE,
    |                  ^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_NOFILE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:277:20
    |
277 |     NOFILE = 11 => RLIMIT_NOFILE,
    |                    ^^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_NOFILE;
    |

error[E0425]: cannot find value `RLIMIT_NOVMON` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:281:20
    |
281 |     NOVMON = 12 => RLIMIT_NOVMON,
    |                    ^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_NPROC` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:286:19
    |
286 |     NPROC = 13 => RLIMIT_NPROC,
    |                   ^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_NPROC;
    |

error[E0425]: cannot find value `RLIMIT_NPTS` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:290:18
    |
290 |     NPTS = 14 => RLIMIT_NPTS,
    |                  ^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_NTHR` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:297:18
    |
297 |     NTHR = 15 => RLIMIT_NTHR,
    |                  ^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_NTHR;
    |

error[E0425]: cannot find value `RLIMIT_POSIXLOCKS` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:301:24
    |
301 |     POSIXLOCKS = 16 => RLIMIT_POSIXLOCKS,
    |                        ^^^^^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_RSS` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:307:17
    |
307 |     RSS = 17 => RLIMIT_RSS,
    |                 ^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_RSS;
    |

error[E0425]: cannot find value `RLIMIT_RTPRIO` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:313:20
    |
313 |     RTPRIO = 18 => RLIMIT_RTPRIO,
    |                    ^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_RTTIME` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:319:20
    |
319 |     RTTIME = 19 => RLIMIT_RTTIME,
    |                    ^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_SBSIZE` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:326:20
    |
326 |     SBSIZE = 20 => RLIMIT_SBSIZE,
    |                    ^^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_SBSIZE;
    |

error[E0425]: cannot find value `RLIMIT_SIGPENDING` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:332:24
    |
332 |     SIGPENDING = 21 => RLIMIT_SIGPENDING,
    |                        ^^^^^^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_STACK` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:337:19
    |
337 |     STACK = 22 => RLIMIT_STACK,
    |                   ^^^^^^^^^^^^ not found in `C`
    |
help: consider importing this constant
    |
3   | use libc::RLIMIT_STACK;
    |

error[E0425]: cannot find value `RLIMIT_SWAP` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:342:18
    |
342 |     SWAP = 23 => RLIMIT_SWAP,
    |                  ^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_UMTXP` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:346:19
    |
346 |     UMTXP = 24 => RLIMIT_UMTXP,
    |                   ^^^^^^^^^^^^ not found in `C`

error[E0425]: cannot find value `RLIMIT_VMEM` in module `C`
   --> /home/wiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rlimit-0.8.1/src/resource.rs:350:18
    |
350 |     VMEM = 25 => RLIMIT_VMEM,
    |                  ^^^^^^^^^^^ not found in `C`


getrlimit and setrlimit exist on NetBSD. The man page says to include sys/resource.h.
See https://man.netbsd.org/getrlimit.2

@Nugine Nugine added the bug Something isn't working label Apr 6, 2022
@Nugine Nugine mentioned this issue Apr 6, 2022
@Nugine Nugine linked a pull request Apr 6, 2022 that will close this issue
@Nugine Nugine closed this as completed in #40 Apr 6, 2022
@0-wiz-0
Copy link
Author

0-wiz-0 commented Apr 6, 2022

git head now passes 'cargo test' on NetBSD. Thank you for the quick fix!

@Nugine Nugine mentioned this issue Apr 6, 2022
@Nugine Nugine mentioned this issue Jul 19, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants