Build error in the v6-26-00-patches branch fails to build on Ubuntu 18.04

This is Ubuntu 18.04 LTS / x86_64 / gcc, g++, gfortran 7.5.0 / cmake 3.20.3 here. The building of the current “v6-26-00-patches” branch (as of 2022.03.12) generates an error (“--std=c++14”):

(...)
In file included from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/src/ZeroMQSvc.cpp:14:0:
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h: In member function ‘void ZmqLingeringSocketPtrDeleter<PERIOD>::operator()(zmq::socket_t*)’:
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h:60:24: error: ‘class zmq::socket_t’ has no member named ‘set’; did you mean ‘send’?
                socket->set(zmq::sockopt::linger, PERIOD);
                        ^~~
                        send
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h:60:33: error: ‘zmq::sockopt’ has not been declared
                socket->set(zmq::sockopt::linger, PERIOD);
                                 ^~~~~~~
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h: At global scope:
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h:79:36: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
 using ZmqLingeringSocketPtr = std::unique_ptr<zmq::socket_t, ZmqLingeringSocketPtrDeleter<PERIOD>>;
                                    ^~~~~~~~~~
(...)
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h:103:6: error: no matching function for call to ‘zmq::socket_t::recv(std::reference_wrapper<zmq::message_t>&, int&)’
In file included from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQSvc.h:17:0,
                 from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQPoller.h:17,
                 from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/src/ZeroMQPoller.cpp:14:
/usr/include/zmq.hpp:625:23: note: candidate: size_t zmq::socket_t::recv(void*, size_t, int)
         inline size_t recv (void *buf_, size_t len_, int flags_ = 0)
                       ^~~~
/usr/include/zmq.hpp:625:23: note:   no known conversion for argument 1 from ‘std::reference_wrapper<zmq::message_t>’ to ‘void*’
/usr/include/zmq.hpp:635:21: note: candidate: bool zmq::socket_t::recv(zmq::message_t*, int)
         inline bool recv (message_t *msg_, int flags_ = 0)
                     ^~~~
/usr/include/zmq.hpp:635:21: note:   no known conversion for argument 1 from ‘std::reference_wrapper<zmq::message_t>’ to ‘zmq::message_t*’
In file included from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/res/RooFit_ZMQ/ZeroMQPoller.h:17:0,
                 from /tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/src/ZeroMQPoller.cpp:14:
(...)
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/src/ZeroMQPoller.cpp:231:14: error: ‘m_fds’ was not declared in this scope
    auto it = m_fds.find(fd);
              ^~~~~
/tmp/ROOT/v6-26-00-patches/roofit/roofitZMQ/src/ZeroMQPoller.cpp:231:14: note: suggested alternative: ‘m_free’
    auto it = m_fds.find(fd);
              ^~~~~
              m_free
Consolidate compiler generated dependencies of target obj.clingInterpreter
[ 73%] Built target obj.clingInterpreter
[ 73%] Built target clingInterpreter
[ 73%] Built target CLING
[ 73%] Built target clad
[ 73%] Built target LLVMRES
Consolidate compiler generated dependencies of target ClingUtils
roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/build.make:89: recipe for target 'roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/src/ZeroMQPoller.cpp.o' failed
make[2]: *** [roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/src/ZeroMQPoller.cpp.o] Error 1
make[2]: Target 'roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/build' not remade because of errors.
CMakeFiles/Makefile2:35161: recipe for target 'roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/all' failed
make[1]: *** [roofit/roofitZMQ/CMakeFiles/RooFitZMQ.dir/all] Error 2
(...)

It seems that the problem is related to the system provided “libzmq”.
The configuration step says:
-- ZeroMQ not found. Switching on builtin_zeromq option
but it also finds:
pkgcfg_lib_PC_LIBZMQ_zmq:FILEPATH=/usr/lib/x86_64-linux-gnu/libzmq.so
and then it uses the system provided /usr/include/zmq.hpp (from the “libzmq3-dev 4.2.5-1ubuntu0.2” package).

Hi Wile E., can you open a github issue for this?

Neither me nor myself have a github account. :wink:

OK, it is now v6-26-00-patches branch fails to build on ubuntu 18.04 · Issue #10107 · root-project/root · GitHub

Thanks for reporting, I have created a PR to fix this issue:

It will be integrated in the next patch release. In the meantime, you can compile ROOT with -Dbuiltin_cppzmq=ON to make it work (please let me know if it doesn’t).

Cheers,
Jonas

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.