afrl-rq / OpenUxAS-SoI

Project for multi-UAV cooperative decision making

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation error regarding the use of zmq_send and zframe_recv. (develop branch)

chaosape opened this issue · comments

There are a number of sites with code like the zframe_recv(*m_zmqSocket);.
The function zframe_recv takes a void* but what is being passed is a zmq::socket_t.
A similar problem occurs with zmq_send in a number of places.

I was seeing this same issue and figured this out on my system. Some dependency caused a couple of versions of libzmq and libczmq to be installed on my ubuntu system. meson was detecting these "native" installed libraries and thought they correctly satisfied the dependency. I got around this by uninstalling the various libzmq and libczmq packages that were installed on my system -- nothing has broken yet that i've noticed.

I think the long term solution is digging into the meson.build file for libzmq and libczmq to see if there's a way to always ignore native dependencies.

In the meantime, this workaround might help you.

  • Josh.

Looks like we need to specify the version that we want to satisfy the dependency:

https://mesonbuild.com/Dependencies.html

Maybe something along the lines of:
version : '==1.2.8'

OR (and this seems safer), switch over to using find_library and specify the directory to pull the dependency from.

https://stackoverflow.com/questions/47010355/mesonbuild-how-to-define-dependency-to-a-library-that-cannot-be-found-by-pkg-c

I think this would solve the dependency that libczmq has on libzmq in libczmq's meson.build.

However, I believe that libzmq itself is being found by meson so the zeromq subproject is not being invoked. Not sure how to solve that part.