On 2015/11/03 13:36, Antoine Jacoutot wrote:
> On Mon, Nov 02, 2015 at 11:15:56AM -0700, Stuart Henderson wrote:
> > CVSROOT: /cvs
> > Module name: ports
> > Changes by: [email protected] 2015/11/02 11:15:56
> >
> > Modified files:
> > security/libsodium: Makefile distinfo
> >
> > Log message:
> > update to libsodium-1.0.6
>
> This broke net/zeromq :
>
> src/curve_client.cpp: In constructor
> 'zmq::curve_client_t::curve_client_t(const zmq::options_t&)':
> src/curve_client.cpp:61: warning: ignoring return value of 'int
> sodium_init()', declared with attribute warn_unused_result
OK... So zeromq is doing the wrong thing here by not checking the
result, and they know it.
// todo check return code
sodium_init();
libsodium-1.0.6 adds "__attribute__ ((warn_unused_result))" to the
definition of sodium_init to warn users about the API misuse, and
libzmq uses -Werror so build fails.
I've opened a libzmq bug but here's a dirty hack that will restore it
to building,
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure 3 Nov 2015 13:35:06 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+https://github.com/zeromq/libzmq/issues/1632
+
+--- configure.orig Tue Nov 3 13:32:41 2015
++++ configure Tue Nov 3 13:33:02 2015
+@@ -17086,7 +17086,7 @@ fi
+
+
+ # By default compiling with -Werror except OSX.
+-libzmq_werror="yes"
++libzmq_werror="no" # XXX
+
+ # By default use DSO visibility
+ libzmq_dso_visibility="yes"
....
though it does look like curve doesn't work correctly as is;
regression tests have issues (though they still report PASS) -
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client HELLO -- wrong server key?
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
CURVE I: cannot open client INITIATE vouch
PASS: test_security_curve
Probably all connected with the same thing; if I wrap the
sodium_init i.e. "zmq_assert (sodium_init() == 0);", it aborts.