[zeromq-dev] czmq master HEAD / zmq 4.0.4: make check assertion fail

Sven-Thorsten Dietrich thebigcorporation at gmail.com
Fri Jun 27 17:15:17 CEST 2014

Error running make check:

Running CZMQ selftests...
 * zrex: OK
 * zgossip: OK
lt-czmq_selftest: zcert.c:65: zcert_new: Assertion `rc == 0' failed.
 * zcert: /bin/bash: line 5:  5981 Aborted                 ${dir}$tst
FAIL: czmq_selftest
1 of 1 test failed
Please report to zeromq-dev at lists.zeromq.org
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/home/sven/checkout/build-iso/pkgs/libczmq/src'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/sven/checkout/build-iso/pkgs/libczmq/src'
make: *** [check-recursive] Error 1

Platform is Debian 7.5 standard gcc building _without_ libsodium.

zcert_new (void)
    zcert_t *self = (zcert_t *) zmalloc (sizeof (zcert_t));
    assert (self);

    //  Initialize metadata, even if keys aren't working
    self->metadata = zhash_new ();
    zhash_autofree (self->metadata);

    int rc = (self->public_txt, self->secret_txt);
    assert (rc == 0);
    zmq_z85_decode (self->public_key, self->public_txt);
    zmq_z85_decode (self->secret_key, self->secret_txt);
    strcpy (self->public_txt, "0000000000000000000000000000000000000000");
    strcpy (self->secret_txt, "0000000000000000000000000000000000000000");
    return self;

and zmq has

int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key)

#else // requires libsodium
    (void) z85_public_key, (void) z85_secret_key;
    errno = ENOTSUP;
    return -1;

so I'll always hit the return -1.

Is there a suggested workaround for building without libsodium?

otherwise it would seem, that correctly supported ! HAVE_LIBSODIUM should not be calling into zcert_new from make check.

I'm fine adding libsodium, but wondering what the bigger picture is when libsodium is not present, there seem to be some other related fixes in the commit logs.



More information about the zeromq-dev mailing list