Skip to content

Add support for OpenBSD #685

Closed
Closed
@wezm

Description

@wezm

OpenBSD appears to be not currently supported. Attempting to compile nix v0.8.1 on OpenBSD 6.1 amd64 with rust 1.16.0 produces the errors below. I would like to use nix in a project that I'll be deploying on OpenBSD so will take an initial pass at adding support. I'll update the task list here as I get more details on what needs to be implemented:

  • Determine what is needed to get nix building on OpenBSD
   Compiling nix v0.8.1
error[E0425]: cannot find value `EV_DISPATCH` in module `libc`
   --> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
    |
144 |                 const $flag = libc::$flag,
    |                               ^ not found in `libc`
    | 
   ::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
    |
80  | libc_bitflags!{
    | - in this macro invocation
    |
    = help: possible candidate is found in another module, you can import it into scope:
              `use sys::event::EV_DISPATCH;`

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:447:15
|
447 | sigevent: libc::sigevent
| ^^^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:464:46
|
464 | let mut sev = unsafe { mem::zeroed::libc::sigevent()};
| ^^^^^^^^^^^^^^ not found in libc

error[E0425]: cannot find value SIGEV_NONE in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:466:39
|
466 | SigevNotify::SigevNone => libc::SIGEV_NONE,
| ^^^^^^^^^^^^^^^^ not found in libc

error[E0425]: cannot find value SIGEV_SIGNAL in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:467:45
|
467 | SigevNotify::SigevSignal{..} => libc::SIGEV_SIGNAL,
| ^^^^^^^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:506:27
|
506 | fn set_tid(_sev: &mut libc::sigevent, _sigev_notify: &SigevNotify) {
| ^^^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:509:31
|
509 | pub fn sigevent(&self) -> libc::sigevent {
| ^^^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:536:19
|
536 | impl<'a> From<&'a libc::sigevent> for SigEvent {
| ^^^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type sigevent in module libc
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/signal.rs:537:24
|
537 | fn from(sigevent: &libc::sigevent) -> Self {
| ^^^^^^^^^^^^^^ not found in libc

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error[E0308]: mismatched types
--> /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/macros.rs:144:31
|
144 | const $flag = libc::$flag,
| ^ expected u32, found u16
|
::: /home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.8.1/src/sys/event.rs
|
80 | libc_bitflags!{
| - in this macro invocation
|
= help: here are some functions which might fulfill your needs:
- .count_ones()
- .count_zeros()
- .leading_zeros()
- .trailing_zeros()

error: aborting due to 10 previous errors

error: Could not compile nix.

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