Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Can not compile libtango on Ubuntu 16 using libzmq3-dev package from apt #273

Closed
Ingvord opened this issue Sep 28, 2016 · 11 comments · Fixed by #561
Closed

Can not compile libtango on Ubuntu 16 using libzmq3-dev package from apt #273

Ingvord opened this issue Sep 28, 2016 · 11 comments · Fixed by #561

Comments

@Ingvord
Copy link
Member

Ingvord commented Sep 28, 2016

Error message

[ 17%] Building CXX object cppapi/client/CMakeFiles/client_objects.dir/zmqeventconsumer.cpp.o
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp: In member function ‘virtual void* Tango::ZmqEventConsumer::run_undetached(void*)’:
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp:186:18: error: cannot convert ‘zmq::socket_t’ to ‘void*’ in assignment
  items[0].socket = *control_sock;
                  ^
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp:187:18: error: cannot convert ‘zmq::socket_t’ to ‘void*’ in assignment
  items[1].socket = *heartbeat_sub_sock;
                  ^
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp:188:18: error: cannot convert ‘zmq::socket_t’ to ‘void*’ in assignment
  items[2].socket = *event_sub_sock;
                  ^
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp: In member function ‘bool Tango::ZmqEventConsumer::process_ctrl(zmq::message_t&, zmq::pollitem_t*, int&)’:
/home/ingvord/Projects/org.tango/git/cppTango/cppapi/client/zmqeventconsumer.cpp:1063:47: error: cannot convert ‘zmq::socket_t’ to ‘void*’ in assignment
                 poll_list[old_poll_nb].socket = *tmp_sock;

Linux ingvord-VirtualBox 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

libzmq3-dev 4.1.4-7

@Ingvord
Copy link
Member Author

Ingvord commented Sep 28, 2016

Current work-around:

Download, compile and install zmq-4.0.5

Download and copy into zmq-4.0.5 installation folder, e.g. /usr/local/zmq-4.0.5/include, *.hpp files from cppzmq

@jkotan
Copy link

jkotan commented Aug 3, 2017

I have the same problem for debian 9 (stretch).

@Ingvord
Copy link
Member Author

Ingvord commented Aug 3, 2017

@jkotan did the workaround work out for you?

@jkotan
Copy link

jkotan commented Aug 3, 2017

Sorry, I've tried. I have switched with my tests from stretch back to jessie and decided to wait with them for a proper implementation for zmq in tango, i.e. an adapter or factory for different zmq APIs.

@Ingvord
Copy link
Member Author

Ingvord commented Aug 3, 2017

I mean good point on adapter pattern

@t-b
Copy link
Collaborator

t-b commented Nov 1, 2017

Is that the offical zeromq API you are using? The socket type from https://github.com/zeromq/libzmq is void*.

@andygotz
Copy link
Collaborator

andygotz commented Nov 2, 2017

For now only zmq 4.0.5 is officially supported.

@Ingvord
Copy link
Member Author

Ingvord commented Nov 2, 2017

Well, as far as I remember. We are actually using https://github.com/zeromq/cppzmq which is not pure libzmq I believe, but a binding

@t-b
Copy link
Collaborator

t-b commented Nov 8, 2017

@andygotz Does that mean the debian package is doing it wrong as it uses zmq 4.2.x? Also 707f28e seems to be included in the tango 9.2.5a package which hints at some zmq 4.2.x support?

Is exactly 4.0.5 required or would 4.0.8 also work?

The reason I'm asking is that I'm currently trying to get tango9 working on debian stretch, from source, and are a bit confused about the requirements.

@andygotz
Copy link
Collaborator

andygotz commented Nov 8, 2017

@t-b the situation is even more complicated. I just checked on Ubuntu 17.10 and here tango is using libzmq.so.5.1.1 and works. So apparently my statement that tango has been tested only with 4.0.0 of zmq is not true. At least it works with more recent versions like 5.1.1. This does not mean it works with all recent versions. Let us know if it works with zmq 4.0.8.

@bourtemb
Copy link
Member

bourtemb commented Dec 8, 2017

#421 addresses this issue.
The solution to this issue is to install cppzmq (v4.2.2 for instance) and to use -DCPPZMQ_BASE= when compiling libtango.
With this solution, Travis CI tango-9-lts tests are passing for libzmq3-dev Debian packages from wheezy-backports, jessie and stretch (Debian 7, Debian 8 and Debian 9).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants