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

fails to build on openbsd #63

Open
brahin2 opened this issue Oct 17, 2023 · 2 comments
Open

fails to build on openbsd #63

brahin2 opened this issue Oct 17, 2023 · 2 comments

Comments

@brahin2
Copy link

brahin2 commented Oct 17, 2023

using the Cargo.toml and example code from the README on openbsd i get the following:

% cargo run
   Compiling sysctl v0.5.4
error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> /home/MYUSER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sysctl-0.5.4/src/lib.rs:77:9
   |
77 | pub use sys::ctl::*;
   |         ^^^ maybe a missing crate `sys`?
   |
   = help: consider adding `extern crate sys` to use the `sys` crate

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> /home/MYUSER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sysctl-0.5.4/src/lib.rs:78:9
   |
78 | pub use sys::ctl_iter::*;
   |         ^^^ maybe a missing crate `sys`?
   |
   = help: consider adding `extern crate sys` to use the `sys` crate

error[E0432]: unresolved imports `sys::ctl::*`, `sys::ctl_iter::*`
  --> /home/MYUSER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sysctl-0.5.4/src/lib.rs:77:9
   |
77 | pub use sys::ctl::*;
   |         ^^^^^^^^^^^
78 | pub use sys::ctl_iter::*;
   |         ^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `sysctl` (lib) due to 3 previous errors

adding target_os = "openbsd" to the lib where freebsd is ends up in a whole other errors and fails too.

@johalun
Copy link
Owner

johalun commented Oct 17, 2023

Thanks for the report.

As it says in the README

FreeBSD, Linux, macOS and iOS are supported. Contributions for improvements and other platforms are welcome.

It's unlikely to work on any other OS out of the box. PRs for OpenBSD support are welcome.

@unrushed-boots
Copy link

unrushed-boots commented Jan 5, 2024

just ran into this issue too.
maybe @semarie has thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants