Broken build when using old libzmq, and wrong docs #6734

issue kanzure opened this issue on September 28, 2015
  1. kanzure commented at 5:12 PM on September 28, 2015: contributor

    Building with libzmq-dev from debian (so libzmq 2.x) results in the following error about an undefined symbol zmq_ctx_destroy:

    make[3]: Leaving directory '/home/kanzure/local/bitcoin/bitcoin/src/secp256k1'
      CXX      zmq/libbitcoin_zmq_a-zmqabstractnotifier.o
      CXX      zmq/libbitcoin_zmq_a-zmqnotificationinterface.o
    zmq/zmqnotificationinterface.cpp: In member function ‘void CZMQNotificationInterface::Shutdown()’:
    zmq/zmqnotificationinterface.cpp:117:33: error: ‘zmq_ctx_destroy’ was not declared in this scope
             zmq_ctx_destroy(pcontext);
                                     ^
    Makefile:4328: recipe for target 'zmq/libbitcoin_zmq_a-zmqnotificationinterface.o' failed
    make[2]: *** [zmq/libbitcoin_zmq_a-zmqnotificationinterface.o] Error 1
    

    Switching to libzmq3-dev results in a successful build for me.

    At doc/zmq.md there is text saying:

    The ZeroMQ feature in Bitcoin Core uses only a very small part of the ZeroMQ C API, and is thus compatible with any version of ZeroMQ from 2.1 onward, including all versions in the 3.x and 4.x release series. Typically, it is packaged by distributions as something like libzmq-dev.

    But see http://zeromq.org/intro:get-the-software which marks even libzmq 3.x as "legacy"; they follow semver and have major incompatibilities between major version field changes. Recent versions of libzmq should be compiled from source from here instead of APT repos.

    Also, you can't have sockets from 2.x and 3.x talk to 4.x anyway.

  2. luke-jr commented at 5:28 PM on September 28, 2015: member

    Minor note: Sockets in 4.0 will talk with 4.1, but there are apparently subtle incompatibilities.

  3. jonasschnelli commented at 9:15 AM on September 29, 2015: contributor

    I can confirm this issue. We should update configure.ac that it will only accept libzmq3 in cases of --enable-zmq.

  4. laanwj added the label Docs and Output on Sep 29, 2015
  5. laanwj added the label Build system on Sep 29, 2015
  6. jmcorgan commented at 3:58 PM on September 29, 2015: contributor

    I should have a PR with an update for configure.ac, the docs, and release notes soon.

  7. jmcorgan commented at 5:55 PM on September 29, 2015: contributor

    See #6736

  8. laanwj commented at 11:11 PM on September 29, 2015: member

    Closed by #6736 (thanks @jmcorgan)

  9. laanwj closed this on Sep 29, 2015

  10. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me