Open null0x opened 2 years ago
This is probably because the install libzmq is without draft but when building cppzmq the default is to use draft, see ENABLE_DRAFTS in CMakeLists.txt. Try turning it off.
Thank you. But my problem is not that I don't know how to build this project. I just took me some time to find out what zmq version is required. My intention is to make you aware of this and to prevent others from losing time with the same problem.
You could just define the minimum lib version of zmq in CMake.
cppzmq does checks at compile to to see if using draft features, even if using the latest libzmq (without draft) it will result in an error if compiling cppzmq with draft. So it is a matter of compiling both libraries with compatible macro defines.
Short: To build the provided unit tests it necessary to install at least
libzmq.so.5.2.5
. However, the packagelibzmq3-dev
and the dependent packagelibzmq5
, that can be installed using apt, only providelibzmq.so.5.2.4
.Long: I am trying to build the provided unit tests of a freshly cloned copy of this repository. For this purpose, I first installed the
libzmq3-dev
package to get thelibzmq.so
library on my Ubuntu 20.04 LTS system. The dependent package libzmq5 package containslibzmq.so.5.2.4
:Whenever I call
cmake -B build && make -C build -j8
, I receive a bunch of linker errors:The problem is that the installed
libzmq.so.5.2.4
does not contain the missing functions:nm -D libzmq.so.5.2.4 | grep "routing_id"
returns nothingThe issue can be solved by manually building the most recent zmq version. Then I get
libzmq.so.5.2.5
that indeed includes the missing functions:The outdated system library needs to be manually replaced with
libzmq.so.5.2.5
. Then everything works fine.The requirement for zmq version 5.2.5 should be mentioned somewhere. It costs quite a lot time to figure out the problem.