Closed sinaaghli closed 4 years ago
After some more searching, I found that "apt" version of libzmq (libzmq-dev & libzmq3-dev) cause this problem. I installed a local version (specifically tags/v4.6.0) and it compiled fine.
Just for future reference.
I addressed these linking problems when libzmq
was built without draft APIs, while cppzmq
was being built with them enabled.
I don't think it is related to the platform/architecture, but IMO it may be that pre-built packages from distributions are built with default options and so without draft APIs.
In particular, the default value for the option ENABLE_DRAFTS
in cppzmq
is detected with this snippet of code
https://github.com/zeromq/cppzmq/blob/18db4568f9ff1568193d3a496d87bed4bc9ec59e/CMakeLists.txt#L29-L33
so, if cppzmq source directory is a cloned git repository, draft APIs are enabled by default.
The solutions I see are either
libzmq
with ENABLE_DRAFTS=on
(in cmake, for autotools the equivalent is --enable-drafts
) cppzmq
with ENABLE_DRAFTS=off
(if draft APIs are not needed)It may be worth pointing out this option in the README.
After some more searching, I found that "apt" version of libzmq (libzmq-dev & libzmq3-dev) cause this problem. I installed a local version (specifically tags/v4.6.0) and it compiled fine.
Hi.I'm new to cpp. Could you tell what command you use to install that local version?thanks
Just for future reference.
I addressed these linking problems when
libzmq
was built without draft APIs, whilecppzmq
was being built with them enabled. I don't think it is related to the platform/architecture, but IMO it may be that pre-built packages from distributions are built with default options and so without draft APIs.In particular, the default value for the option
ENABLE_DRAFTS
incppzmq
is detected with this snippet of codeso, if cppzmq source directory is a cloned git repository, draft APIs are enabled by default. The solutions I see are either
- build
libzmq
withENABLE_DRAFTS=on
(in cmake, for autotools the equivalent is--enable-drafts
)- build
cppzmq
withENABLE_DRAFTS=off
(if draft APIs are not needed)It may be worth pointing out this option in the README.
thanks!!problem fixed
I'm trying to compile cppzmq on RPI3 and it fails to link unit_tests, here is the compilation output. Any feedback is appreciated