Closed kpcyrd closed 7 years ago
I've applied the following patch:
diff --git a/zmq-sys/src/errno.rs b/zmq-sys/src/errno.rs
index fc5993f..1faa3fd 100644
--- a/zmq-sys/src/errno.rs
+++ b/zmq-sys/src/errno.rs
@@ -20,7 +20,10 @@ pub const ENOENT: i32 = errno::ENOENT;
pub const ENOMEM: i32 = errno::ENOMEM;
pub const ENOTCONN: i32 = errno::ENOTCONN;
pub const ENOTSOCK: i32 = errno::ENOTSOCK;
+#[cfg(not(target_os = "openbsd"))]
pub const EPROTO: i32 = errno::EPROTO;
+#[cfg(target_os = "openbsd")]
+pub const EPROTO: i32 = errno::EIO;
pub const EPROTONOSUPPORT: i32 = errno::EPROTONOSUPPORT;
#[cfg(not(target_os = "windows"))]
and the build now looks like this:
Compiling zmq v0.9.0 (file:///home/user/rust-zmq)
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
src/lib.rs:32:20: 32:23 error: unexpected token: `unsafe`
src/lib.rs:32 let rc = $($tt)*;
^~~
error: aborting due to 19 previous errors
error: Could not compile `zmq`.
To learn more, run the command again with --verbose.
I was able to resolve this issue by bumping my openbsd install to a 6.1 snapshot and installing rustc 1.15.1
Steps to reproduce: 1) install openbsd 6.0 2)
pkg_add -v cargo zeromq
3)cargo new --bin foo
4) Addzmq = "0.8"
to Cargo.toml 5)cargo build
See these links about openbsd not having
EPROTO
: https://github.com/networkupstools/nut/issues/44 https://github.com/performancecopilot/pcp/issues/71 https://bugs.freedesktop.org/show_bug.cgi?id=84665