Error building with new ZMQ

In MacPorts, the header is installed as “zmq.h”, not “zmq.hpp”. I can
easily fix this if somebody else doesn’t want to / if I need to, but I
have a lot on my queue right now. I’m just disabling ZMQ in the
MacPorts install for now. - MLD

{{{
:info:build In file included from
/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cb0bc7f070c41825ab7aee7f093dc326e62e2fdb/gr-zeromq/lib/pub_sink_impl.cc:28:
:info:build
/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cb0bc7f070c41825ab7aee7f093dc326e62e2fdb/gr-zeromq/lib/pub_sink_impl.h:27:10:
fatal error: ‘zmq.hpp’ file not found
:info:build #include <zmq.hpp>
}}}

If I look through the tarball for zmq 3.2.4 or 4.0.4, I find only zmq.h,
no zmq.hpp. From the look of it, zmq is written as mixed C/C++, and the
API header is purely C (wrapped with extern “C” if included as C++).
Hence, I think the CMake Find file needs to check for both zmq.hpp and
zmq.h as the header, then somehow get that info into the gr-zeromq
sources. - MLD


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

If I change all of the “zmq.hpp” #include lines to be instead “zmq.h”,
then I get the following errors:
{{{
:info:build In file included from
/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cb0bc7f070c41825ab7aee7f093dc326e62e2fdb/gr-zeromq/lib/sub_source_impl.cc:28:
:info:build
/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cb0bc7f070c41825ab7aee7f093dc326e62e2fdb/gr-zeromq/lib/sub_source_impl.h:38:7:
error: use of undeclared identifier ‘zmq’
:info:build zmq::context_t *d_context;
:info:build ^
:info:build
/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cb0bc7f070c41825ab7aee7f093dc326e62e2fdb/gr-zeromq/lib/sub_source_impl.h:39:7:
error: use of undeclared identifier ‘zmq’
:info:build zmq::socket_t *d_socket;
:info:build ^
}}}

So … it seems like unless there’s some standard way to get zmq.hpp
then we won’t be using gr-zeromq on OSX. Any ideas? Can someone send
me that file? - MLD

Yes, that’s what the issue is: YA dependency! Thanks for your prompt
feedback! I’ll look into creating a cppzmq port, since one does not
currently exist. We’ll need to add CMake support for checking for this
dependency, too. - MLD

https://github.com/zeromq/cppzmq/blob/master/zmq.hpp

On Tue, May 20, 2014 at 12:27 PM, Michael D.
<[email protected]

I added a “cppzmq” port that installs this header, which depends on one
of the various zmq* ports (2.0, 2.2, 3.2, 4.0). All is happy now within
MacPorts, but the FindZeroMQ.cmake file needs to be updated to look for
this header (it just looks for zmq.h and libzmq).

-Sometimes- the test “qa_zeromq_pub” fails with the appended error.
Otherwise, everything seems to be compiling and passing make test. One
step forward … - MLD

{{{
test 187
Start 187: qa_zeromq_pub

187: Test command: /bin/sh
“/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/build/gr-zeromq/python/zeromq/qa_zeromq_pub_test.sh”
187: Test timeout computed to be: 9.99988e+06
187: E
187:

187: ERROR: test_001 (main.qa_zeromq_pub)
187:

187: Traceback (most recent call last):
187: File
“/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cba2d184e2abb8a52353929a34b562ea4f9bd031/gr-zeromq/python/zeromq/qa_zeromq_pub.py”,
line 47, in test_001
187: self.assertFloatTuplesAlmostEqual(self.rx_data, src_data)
187: File
“/opt/local/var/macports/build/_opt_MacPorts_trunk_dports_science_gnuradio/gnuradio-devel/work/gnuradio-cba2d184e2abb8a52353929a34b562ea4f9bd031/gnuradio-runtime/python/gnuradio/gr_unittest.py”,
line 88, in assertFloatTuplesAlmostEqual
187: self.assertEqual (len(a), len(b))
187: TypeError: object of type ‘NoneType’ has no len()
}}}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs