Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kanzure opened this issue Sep 28, 2015 · 5 comments
Closed

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

kanzure opened this issue Sep 28, 2015 · 5 comments

Comments

@kanzure
Copy link
Contributor

kanzure commented Sep 28, 2015

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.

@luke-jr
Copy link
Member

luke-jr commented Sep 28, 2015

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

@jonasschnelli
Copy link
Contributor

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

@jmcorgan
Copy link
Contributor

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

@jmcorgan
Copy link
Contributor

See #6736

@laanwj
Copy link
Member

laanwj commented Sep 29, 2015

Closed by #6736 (thanks @jmcorgan)

@laanwj laanwj closed this as completed Sep 29, 2015
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants