From f14c74324fa5468a02ced7ba8d049f833e8825b37eb270ba5dc5f69e5bd9f258 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Mon, 21 Sep 2020 11:36:43 +0000 Subject: [PATCH] Accepting request 835666 from home:mnhauke:sdr-devel - Add patches to build with boost >= 1.73.0: * 0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch * 0002-boost_qualify_placeholders_with_their_full_namespace.patch * revert-23cece0d0.patch For details see: * https://github.com/gnuradio/gnuradio/pull/3441 * https://github.com/gnuradio/gnuradio/pull/3566 OBS-URL: https://build.opensuse.org/request/show/835666 OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/gnuradio?expand=0&rev=85 --- ....h-drop-boost-cstdint.hpp-and-use-cs.patch | 39 + ...aceholders_with_their_full_namespace.patch | 1025 +++++++++++++++++ gnuradio.changes | 11 + gnuradio.spec | 6 + revert-23cece0d0.patch | 555 +++++++++ 5 files changed, 1636 insertions(+) create mode 100644 0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch create mode 100644 0002-boost_qualify_placeholders_with_their_full_namespace.patch create mode 100644 revert-23cece0d0.patch diff --git a/0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch b/0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch new file mode 100644 index 0000000..1382208 --- /dev/null +++ b/0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch @@ -0,0 +1,39 @@ +From f643bc12100c67288adda3699a9e61d6a66fb529 Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou +Date: Fri, 7 Feb 2020 16:49:30 +0100 +Subject: [PATCH] gr-digital:glfsr.h: drop boost/cstdint.hpp and use cstdint + +gr-digital/glfsr.h include boost/cstdint.hpp to have uintxx_t. +These types are in boost namespace but nor using namespace xxx, nor boost:: are used. +The result is : +In file included from /home/buildroot/autobuild/instance-0/output-1/build/gnuradio-3.8.0.0/gr-digital/lib/glfsr.cc:23: +/home/buildroot/autobuild/instance-0/output-1/build/gnuradio-3.8.0.0/gr-digital/lib/../include/gnuradio/digital/glfsr.h:42:5: error: 'uint32_t' does not name a type; did you mean 'u_int32_t'? +uint32_t d_shift_register; +^~~~~~~~ +u_int32_t + +Since Gnuradio policy is Less boost == better and C++11 is used, use cstdint +instead of boost/cstdint.hpp. + +[backported from 475e4a156b516c089175afb998acdc80b740b437] +Signed-off-by: Gwenhael Goavec-Merou +--- + gr-digital/include/gnuradio/digital/glfsr.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gr-digital/include/gnuradio/digital/glfsr.h b/gr-digital/include/gnuradio/digital/glfsr.h +index 0b5141f1f..1003bcd01 100644 +--- a/gr-digital/include/gnuradio/digital/glfsr.h ++++ b/gr-digital/include/gnuradio/digital/glfsr.h +@@ -24,7 +24,7 @@ + #define INCLUDED_DIGITAL_GLFSR_H + + #include +-#include ++#include + + namespace gr { + namespace digital { +-- +2.24.1 + diff --git a/0002-boost_qualify_placeholders_with_their_full_namespace.patch b/0002-boost_qualify_placeholders_with_their_full_namespace.patch new file mode 100644 index 0000000..c27cec9 --- /dev/null +++ b/0002-boost_qualify_placeholders_with_their_full_namespace.patch @@ -0,0 +1,1025 @@ +From 5752be31d17be80203d9fc44a73661712542bfe1 Mon Sep 17 00:00:00 2001 +From: ponce +Date: Sun, 17 May 2020 14:02:57 +0200 +Subject: [PATCH] boost: qualify placeholders with their full namespace. + +This is needed with boost >= 1.73.0. + +[Upstream status: https://github.com/gnuradio/gnuradio/pull/3566] + +Signed-off-by: ponce +Signed-off-by: Gwenhael Goavec-Merou +--- + .../(exported from wiki) Message Passing.txt | 8 +++--- + gnuradio-runtime/lib/block.cc | 3 ++- + gr-analog/lib/sig_source_impl.cc | 4 ++- + gr-blocks/lib/copy_impl.cc | 4 ++- + gr-blocks/lib/message_debug_impl.cc | 13 +++++++--- + gr-blocks/lib/message_strobe_impl.cc | 5 ++-- + gr-blocks/lib/message_strobe_random_impl.cc | 5 ++-- + gr-blocks/lib/multiply_matrix_impl.cc | 11 +++++--- + gr-blocks/lib/mute_impl.cc | 5 ++-- + gr-blocks/lib/nop_impl.cc | 5 ++-- + gr-blocks/lib/pdu_filter_impl.cc | 5 ++-- + gr-blocks/lib/pdu_remove_impl.cc | 5 ++-- + gr-blocks/lib/pdu_set_impl.cc | 4 ++- + gr-blocks/lib/random_pdu_impl.cc | 5 ++-- + gr-blocks/lib/repeat_impl.cc | 5 ++-- + gr-blocks/lib/socket_pdu_impl.cc | 18 ++++++++----- + .../lib/tagged_stream_multiply_length_impl.cc | 7 +++--- + gr-blocks/lib/tuntap_pdu_impl.cc | 3 ++- + gr-digital/lib/chunks_to_symbols_impl.cc | 5 ++-- + .../lib/constellation_receiver_cb_impl.cc | 14 ++++++----- + gr-digital/lib/costas_loop_cc_impl.cc | 4 ++- + gr-digital/lib/crc32_async_bb_impl.cc | 8 ++++-- + gr-digital/lib/header_payload_demux_impl.cc | 7 +++--- + .../lib/protocol_formatter_async_impl.cc | 4 ++- + gr-fec/lib/async_decoder_impl.cc | 8 ++++-- + gr-fec/lib/async_encoder_impl.cc | 8 ++++-- + gr-fec/lib/depuncture_bb_impl.cc | 4 ++- + gr-fec/lib/puncture_bb_impl.cc | 4 ++- + gr-fec/lib/puncture_ff_impl.cc | 4 ++- + gr-filter/lib/freq_xlating_fir_filter_impl.cc | 2 +- + gr-filter/lib/mmse_resampler_cc_impl.cc | 5 ++-- + gr-filter/lib/mmse_resampler_ff_impl.cc | 5 ++-- + gr-qtgui/lib/const_sink_c_impl.cc | 5 ++-- + gr-qtgui/lib/edit_box_msg_impl.cc | 4 ++- + gr-qtgui/lib/freq_sink_c_impl.cc | 12 ++++++--- + gr-qtgui/lib/freq_sink_f_impl.cc | 12 ++++++--- + gr-qtgui/lib/histogram_sink_f_impl.cc | 5 ++-- + gr-qtgui/lib/sink_c_impl.cc | 4 ++- + gr-qtgui/lib/sink_f_impl.cc | 4 ++- + gr-qtgui/lib/time_raster_sink_b_impl.cc | 4 ++- + gr-qtgui/lib/time_raster_sink_f_impl.cc | 4 ++- + gr-qtgui/lib/time_sink_c_impl.cc | 4 ++- + gr-qtgui/lib/time_sink_f_impl.cc | 4 ++- + gr-qtgui/lib/waterfall_sink_c_impl.cc | 13 +++++++--- + gr-qtgui/lib/waterfall_sink_f_impl.cc | 13 +++++++--- + gr-uhd/lib/usrp_block_impl.cc | 25 ++++++++++++------- + gr-uhd/lib/usrp_source_impl.cc | 5 ++-- + gr-zeromq/lib/pub_msg_sink_impl.cc | 4 ++- + gr-zeromq/lib/push_msg_sink_impl.cc | 4 ++- + 49 files changed, 216 insertions(+), 107 deletions(-) + +diff --git a/docs/usage-manual/(exported from wiki) Message Passing.txt b/docs/usage-manual/(exported from wiki) Message Passing.txt +index 4654bd5dac..551e710228 100644 +--- a/docs/usage-manual/(exported from wiki) Message Passing.txt ++++ b/docs/usage-manual/(exported from wiki) Message Passing.txt +@@ -94,7 +94,7 @@ must then bind this port to the message handler. For this, we use + Boost's 'bind' function: + + set_msg_handler(pmt::pmt_t port_id, +- boost::bind(&block_class::message_handler_function, this, _1)); ++ boost::bind(&block_class::message_handler_function, this, boost::placeholders::_1)); + + In Python: + +@@ -241,15 +241,15 @@ The constructor of this block looks like this: + { + message_port_register_in(pmt::mp("print")); + set_msg_handler(pmt::mp("print"), +- boost::bind(&message_debug_impl::print, this, _1)); ++ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1)); + + message_port_register_in(pmt::mp("store")); + set_msg_handler(pmt::mp("store"), +- boost::bind(&message_debug_impl::store, this, _1)); ++ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1)); + + message_port_register_in(pmt::mp("print_pdu")); + set_msg_handler(pmt::mp("print_pdu"), +- boost::bind(&message_debug_impl::print_pdu, this, _1)); ++ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1)); + } + + +diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc +index 5914283908..fca4cab97e 100644 +--- a/gnuradio-runtime/lib/block.cc ++++ b/gnuradio-runtime/lib/block.cc +@@ -61,7 +61,8 @@ block::block(const std::string& name, + { + global_block_registry.register_primitive(alias(), this); + message_port_register_in(d_system_port); +- set_msg_handler(d_system_port, boost::bind(&block::system_handler, this, _1)); ++ set_msg_handler(d_system_port, ++ boost::bind(&block::system_handler, this, boost::placeholders::_1)); + + configure_default_loggers(d_logger, d_debug_logger, symbol_name()); + } +diff --git a/gr-analog/lib/sig_source_impl.cc b/gr-analog/lib/sig_source_impl.cc +index b73b32982d..01c5fbfdb0 100644 +--- a/gr-analog/lib/sig_source_impl.cc ++++ b/gr-analog/lib/sig_source_impl.cc +@@ -67,7 +67,9 @@ sig_source_impl::sig_source_impl(double sampling_freq, + this->set_phase(phase); + this->message_port_register_in(pmt::mp("freq")); + this->set_msg_handler(pmt::mp("freq"), +- boost::bind(&sig_source_impl::set_frequency_msg, this, _1)); ++ boost::bind(&sig_source_impl::set_frequency_msg, ++ this, ++ boost::placeholders::_1)); + } + + template +diff --git a/gr-blocks/lib/copy_impl.cc b/gr-blocks/lib/copy_impl.cc +index c377e57b1e..b55196c24b 100644 +--- a/gr-blocks/lib/copy_impl.cc ++++ b/gr-blocks/lib/copy_impl.cc +@@ -44,7 +44,9 @@ copy_impl::copy_impl(size_t itemsize) + d_enabled(true) + { + message_port_register_in(pmt::mp("en")); +- set_msg_handler(pmt::mp("en"), boost::bind(©_impl::handle_enable, this, _1)); ++ set_msg_handler( ++ pmt::mp("en"), ++ boost::bind(©_impl::handle_enable, this, boost::placeholders::_1)); + } + + copy_impl::~copy_impl() {} +diff --git a/gr-blocks/lib/message_debug_impl.cc b/gr-blocks/lib/message_debug_impl.cc +index a8c84aa509..916f97ca3d 100644 +--- a/gr-blocks/lib/message_debug_impl.cc ++++ b/gr-blocks/lib/message_debug_impl.cc +@@ -90,14 +90,19 @@ message_debug_impl::message_debug_impl() + : block("message_debug", io_signature::make(0, 0, 0), io_signature::make(0, 0, 0)) + { + message_port_register_in(pmt::mp("print")); +- set_msg_handler(pmt::mp("print"), boost::bind(&message_debug_impl::print, this, _1)); ++ set_msg_handler( ++ pmt::mp("print"), ++ boost::bind(&message_debug_impl::print, this, boost::placeholders::_1)); + + message_port_register_in(pmt::mp("store")); +- set_msg_handler(pmt::mp("store"), boost::bind(&message_debug_impl::store, this, _1)); ++ set_msg_handler( ++ pmt::mp("store"), ++ boost::bind(&message_debug_impl::store, this, boost::placeholders::_1)); + + message_port_register_in(pmt::mp("print_pdu")); +- set_msg_handler(pmt::mp("print_pdu"), +- boost::bind(&message_debug_impl::print_pdu, this, _1)); ++ set_msg_handler( ++ pmt::mp("print_pdu"), ++ boost::bind(&message_debug_impl::print_pdu, this, boost::placeholders::_1)); + } + + message_debug_impl::~message_debug_impl() {} +diff --git a/gr-blocks/lib/message_strobe_impl.cc b/gr-blocks/lib/message_strobe_impl.cc +index 038eeae5a1..d131b81662 100644 +--- a/gr-blocks/lib/message_strobe_impl.cc ++++ b/gr-blocks/lib/message_strobe_impl.cc +@@ -53,8 +53,9 @@ message_strobe_impl::message_strobe_impl(pmt::pmt_t msg, long period_ms) + message_port_register_out(d_port); + + message_port_register_in(pmt::mp("set_msg")); +- set_msg_handler(pmt::mp("set_msg"), +- boost::bind(&message_strobe_impl::set_msg, this, _1)); ++ set_msg_handler( ++ pmt::mp("set_msg"), ++ boost::bind(&message_strobe_impl::set_msg, this, boost::placeholders::_1)); + } + + message_strobe_impl::~message_strobe_impl() {} +diff --git a/gr-blocks/lib/message_strobe_random_impl.cc b/gr-blocks/lib/message_strobe_random_impl.cc +index 0ab5d6adc7..53e641fba4 100644 +--- a/gr-blocks/lib/message_strobe_random_impl.cc ++++ b/gr-blocks/lib/message_strobe_random_impl.cc +@@ -74,8 +74,9 @@ message_strobe_random_impl::message_strobe_random_impl( + new gr::thread::thread(boost::bind(&message_strobe_random_impl::run, this))); + + message_port_register_in(pmt::mp("set_msg")); +- set_msg_handler(pmt::mp("set_msg"), +- boost::bind(&message_strobe_random_impl::set_msg, this, _1)); ++ set_msg_handler( ++ pmt::mp("set_msg"), ++ boost::bind(&message_strobe_random_impl::set_msg, this, boost::placeholders::_1)); + } + + long message_strobe_random_impl::next_delay() +diff --git a/gr-blocks/lib/multiply_matrix_impl.cc b/gr-blocks/lib/multiply_matrix_impl.cc +index e1b9c746c6..e38953baba 100644 +--- a/gr-blocks/lib/multiply_matrix_impl.cc ++++ b/gr-blocks/lib/multiply_matrix_impl.cc +@@ -235,9 +235,10 @@ multiply_matrix_impl::multiply_matrix_impl( + + pmt::pmt_t port_name = pmt::string_to_symbol("set_A"); + message_port_register_in(port_name); +- set_msg_handler( +- port_name, +- boost::bind(&multiply_matrix_impl::msg_handler_A, this, _1)); ++ set_msg_handler(port_name, ++ boost::bind(&multiply_matrix_impl::msg_handler_A, ++ this, ++ boost::placeholders::_1)); + } + + template <> +@@ -257,7 +258,9 @@ multiply_matrix_impl::multiply_matrix_impl( + pmt::pmt_t port_name = pmt::string_to_symbol("set_A"); + message_port_register_in(port_name); + set_msg_handler(port_name, +- boost::bind(&multiply_matrix_impl::msg_handler_A, this, _1)); ++ boost::bind(&multiply_matrix_impl::msg_handler_A, ++ this, ++ boost::placeholders::_1)); + } + + +diff --git a/gr-blocks/lib/mute_impl.cc b/gr-blocks/lib/mute_impl.cc +index bd65ce2075..5c732f8f4f 100644 +--- a/gr-blocks/lib/mute_impl.cc ++++ b/gr-blocks/lib/mute_impl.cc +@@ -47,8 +47,9 @@ mute_impl::mute_impl(bool mute) + d_mute(mute) + { + this->message_port_register_in(pmt::intern("set_mute")); +- this->set_msg_handler(pmt::intern("set_mute"), +- boost::bind(&mute_impl::set_mute_pmt, this, _1)); ++ this->set_msg_handler( ++ pmt::intern("set_mute"), ++ boost::bind(&mute_impl::set_mute_pmt, this, boost::placeholders::_1)); + } + + template +diff --git a/gr-blocks/lib/nop_impl.cc b/gr-blocks/lib/nop_impl.cc +index db216d97a4..e9baee5878 100644 +--- a/gr-blocks/lib/nop_impl.cc ++++ b/gr-blocks/lib/nop_impl.cc +@@ -44,8 +44,9 @@ nop_impl::nop_impl(size_t sizeof_stream_item) + { + // Arrange to have count_received_msgs called when messages are received. + message_port_register_in(pmt::mp("port")); +- set_msg_handler(pmt::mp("port"), +- boost::bind(&nop_impl::count_received_msgs, this, _1)); ++ set_msg_handler( ++ pmt::mp("port"), ++ boost::bind(&nop_impl::count_received_msgs, this, boost::placeholders::_1)); + } + + nop_impl::~nop_impl() {} +diff --git a/gr-blocks/lib/pdu_filter_impl.cc b/gr-blocks/lib/pdu_filter_impl.cc +index b0748eec02..63cfe47e4c 100644 +--- a/gr-blocks/lib/pdu_filter_impl.cc ++++ b/gr-blocks/lib/pdu_filter_impl.cc +@@ -44,8 +44,9 @@ pdu_filter_impl::pdu_filter_impl(pmt::pmt_t k, pmt::pmt_t v, bool invert) + { + message_port_register_out(pdu::pdu_port_id()); + message_port_register_in(pdu::pdu_port_id()); +- set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&pdu_filter_impl::handle_msg, this, _1)); ++ set_msg_handler( ++ pdu::pdu_port_id(), ++ boost::bind(&pdu_filter_impl::handle_msg, this, boost::placeholders::_1)); + } + + void pdu_filter_impl::handle_msg(pmt::pmt_t pdu) +diff --git a/gr-blocks/lib/pdu_remove_impl.cc b/gr-blocks/lib/pdu_remove_impl.cc +index 19cc4dc76a..2b97f827b2 100644 +--- a/gr-blocks/lib/pdu_remove_impl.cc ++++ b/gr-blocks/lib/pdu_remove_impl.cc +@@ -42,8 +42,9 @@ pdu_remove_impl::pdu_remove_impl(pmt::pmt_t k) + { + message_port_register_out(pdu::pdu_port_id()); + message_port_register_in(pdu::pdu_port_id()); +- set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&pdu_remove_impl::handle_msg, this, _1)); ++ set_msg_handler( ++ pdu::pdu_port_id(), ++ boost::bind(&pdu_remove_impl::handle_msg, this, boost::placeholders::_1)); + } + + void pdu_remove_impl::handle_msg(pmt::pmt_t pdu) +diff --git a/gr-blocks/lib/pdu_set_impl.cc b/gr-blocks/lib/pdu_set_impl.cc +index 40fbc3cd83..af59ef70f3 100644 +--- a/gr-blocks/lib/pdu_set_impl.cc ++++ b/gr-blocks/lib/pdu_set_impl.cc +@@ -43,7 +43,9 @@ pdu_set_impl::pdu_set_impl(pmt::pmt_t k, pmt::pmt_t v) + { + message_port_register_out(pdu::pdu_port_id()); + message_port_register_in(pdu::pdu_port_id()); +- set_msg_handler(pdu::pdu_port_id(), boost::bind(&pdu_set_impl::handle_msg, this, _1)); ++ set_msg_handler( ++ pdu::pdu_port_id(), ++ boost::bind(&pdu_set_impl::handle_msg, this, boost::placeholders::_1)); + } + + void pdu_set_impl::handle_msg(pmt::pmt_t pdu) +diff --git a/gr-blocks/lib/random_pdu_impl.cc b/gr-blocks/lib/random_pdu_impl.cc +index 75d825aefa..6c142c3531 100644 +--- a/gr-blocks/lib/random_pdu_impl.cc ++++ b/gr-blocks/lib/random_pdu_impl.cc +@@ -52,8 +52,9 @@ random_pdu_impl::random_pdu_impl(int min_items, + { + message_port_register_out(pdu::pdu_port_id()); + message_port_register_in(pmt::mp("generate")); +- set_msg_handler(pmt::mp("generate"), +- boost::bind(&random_pdu_impl::generate_pdu, this, _1)); ++ set_msg_handler( ++ pmt::mp("generate"), ++ boost::bind(&random_pdu_impl::generate_pdu, this, boost::placeholders::_1)); + if (length_modulo < 1) + throw std::runtime_error("length_module must be >= 1"); + if (max_items < length_modulo) +diff --git a/gr-blocks/lib/repeat_impl.cc b/gr-blocks/lib/repeat_impl.cc +index 189fbc8948..d6569625da 100644 +--- a/gr-blocks/lib/repeat_impl.cc ++++ b/gr-blocks/lib/repeat_impl.cc +@@ -44,8 +44,9 @@ repeat_impl::repeat_impl(size_t itemsize, int interp) + d_interp(interp) + { + message_port_register_in(pmt::mp("interpolation")); +- set_msg_handler(pmt::mp("interpolation"), +- boost::bind(&repeat_impl::msg_set_interpolation, this, _1)); ++ set_msg_handler( ++ pmt::mp("interpolation"), ++ boost::bind(&repeat_impl::msg_set_interpolation, this, boost::placeholders::_1)); + } + + void repeat_impl::msg_set_interpolation(pmt::pmt_t msg) +diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc +index df69f07ad2..163eec3a68 100644 +--- a/gr-blocks/lib/socket_pdu_impl.cc ++++ b/gr-blocks/lib/socket_pdu_impl.cc +@@ -101,7 +101,9 @@ socket_pdu_impl::socket_pdu_impl(std::string type, + start_tcp_accept(); + + set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&socket_pdu_impl::tcp_server_send, this, _1)); ++ boost::bind(&socket_pdu_impl::tcp_server_send, ++ this, ++ boost::placeholders::_1)); + } else if (type == "TCP_CLIENT") { + boost::system::error_code error = boost::asio::error::host_not_found; + d_tcp_socket.reset(new boost::asio::ip::tcp::socket(d_io_service)); +@@ -111,7 +113,9 @@ socket_pdu_impl::socket_pdu_impl(std::string type, + d_tcp_socket->set_option(boost::asio::ip::tcp::no_delay(d_tcp_no_delay)); + + set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&socket_pdu_impl::tcp_client_send, this, _1)); ++ boost::bind(&socket_pdu_impl::tcp_client_send, ++ this, ++ boost::placeholders::_1)); + + d_tcp_socket->async_read_some( + boost::asio::buffer(d_rxbuf), +@@ -130,8 +134,9 @@ socket_pdu_impl::socket_pdu_impl(std::string type, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred)); + +- set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&socket_pdu_impl::udp_send, this, _1)); ++ set_msg_handler( ++ pdu::pdu_port_id(), ++ boost::bind(&socket_pdu_impl::udp_send, this, boost::placeholders::_1)); + } else if (type == "UDP_CLIENT") { + d_udp_socket.reset( + new boost::asio::ip::udp::socket(d_io_service, d_udp_endpoint)); +@@ -143,8 +148,9 @@ socket_pdu_impl::socket_pdu_impl(std::string type, + boost::asio::placeholders::error, + boost::asio::placeholders::bytes_transferred)); + +- set_msg_handler(pdu::pdu_port_id(), +- boost::bind(&socket_pdu_impl::udp_send, this, _1)); ++ set_msg_handler( ++ pdu::pdu_port_id(), ++ boost::bind(&socket_pdu_impl::udp_send, this, boost::placeholders::_1)); + } else + throw std::runtime_error("gr::blocks:socket_pdu: unknown socket type"); + +diff --git a/gr-blocks/lib/tagged_stream_multiply_length_impl.cc b/gr-blocks/lib/tagged_stream_multiply_length_impl.cc +index 30f4c46dc6..34b95d647d 100644 +--- a/gr-blocks/lib/tagged_stream_multiply_length_impl.cc ++++ b/gr-blocks/lib/tagged_stream_multiply_length_impl.cc +@@ -49,9 +49,10 @@ tagged_stream_multiply_length_impl::tagged_stream_multiply_length_impl( + set_tag_propagation_policy(TPP_DONT); + set_relative_rate(1, 1); + message_port_register_in(pmt::intern("set_scalar")); +- set_msg_handler( +- pmt::intern("set_scalar"), +- boost::bind(&tagged_stream_multiply_length_impl::set_scalar_pmt, this, _1)); ++ set_msg_handler(pmt::intern("set_scalar"), ++ boost::bind(&tagged_stream_multiply_length_impl::set_scalar_pmt, ++ this, ++ boost::placeholders::_1)); + } + + tagged_stream_multiply_length_impl::~tagged_stream_multiply_length_impl() {} +diff --git a/gr-blocks/lib/tuntap_pdu_impl.cc b/gr-blocks/lib/tuntap_pdu_impl.cc +index 4343ae1dc3..0d9d7e28c7 100644 +--- a/gr-blocks/lib/tuntap_pdu_impl.cc ++++ b/gr-blocks/lib/tuntap_pdu_impl.cc +@@ -96,7 +96,8 @@ tuntap_pdu_impl::tuntap_pdu_impl(std::string dev, int MTU, bool istunflag) + + // set up input message port + message_port_register_in(pdu::pdu_port_id()); +- set_msg_handler(pdu::pdu_port_id(), boost::bind(&tuntap_pdu_impl::send, this, _1)); ++ set_msg_handler(pdu::pdu_port_id(), ++ boost::bind(&tuntap_pdu_impl::send, this, boost::placeholders::_1)); + } + + int tuntap_pdu_impl::tun_alloc(char* dev, int flags) +diff --git a/gr-digital/lib/chunks_to_symbols_impl.cc b/gr-digital/lib/chunks_to_symbols_impl.cc +index 26d590a66e..a6810a69eb 100644 +--- a/gr-digital/lib/chunks_to_symbols_impl.cc ++++ b/gr-digital/lib/chunks_to_symbols_impl.cc +@@ -53,8 +53,9 @@ chunks_to_symbols_impl::chunks_to_symbols_impl( + this->message_port_register_in(pmt::mp("set_symbol_table")); + this->set_msg_handler( + pmt::mp("set_symbol_table"), +- boost::bind( +- &chunks_to_symbols_impl::handle_set_symbol_table, this, _1)); ++ boost::bind(&chunks_to_symbols_impl::handle_set_symbol_table, ++ this, ++ boost::placeholders::_1)); + } + + template +diff --git a/gr-digital/lib/constellation_receiver_cb_impl.cc b/gr-digital/lib/constellation_receiver_cb_impl.cc +index 7fb7559d5e..7e216ece56 100644 +--- a/gr-digital/lib/constellation_receiver_cb_impl.cc ++++ b/gr-digital/lib/constellation_receiver_cb_impl.cc +@@ -61,14 +61,16 @@ constellation_receiver_cb_impl::constellation_receiver_cb_impl( + "This receiver only works with constellations of dimension 1."); + + message_port_register_in(pmt::mp("set_constellation")); +- set_msg_handler( +- pmt::mp("set_constellation"), +- boost::bind(&constellation_receiver_cb_impl::handle_set_constellation, this, _1)); ++ set_msg_handler(pmt::mp("set_constellation"), ++ boost::bind(&constellation_receiver_cb_impl::handle_set_constellation, ++ this, ++ boost::placeholders::_1)); + + message_port_register_in(pmt::mp("rotate_phase")); +- set_msg_handler( +- pmt::mp("rotate_phase"), +- boost::bind(&constellation_receiver_cb_impl::handle_rotate_phase, this, _1)); ++ set_msg_handler(pmt::mp("rotate_phase"), ++ boost::bind(&constellation_receiver_cb_impl::handle_rotate_phase, ++ this, ++ boost::placeholders::_1)); + } + + constellation_receiver_cb_impl::~constellation_receiver_cb_impl() {} +diff --git a/gr-digital/lib/costas_loop_cc_impl.cc b/gr-digital/lib/costas_loop_cc_impl.cc +index c3b30834eb..e1229e6f4a 100644 +--- a/gr-digital/lib/costas_loop_cc_impl.cc ++++ b/gr-digital/lib/costas_loop_cc_impl.cc +@@ -82,7 +82,9 @@ costas_loop_cc_impl::costas_loop_cc_impl(float loop_bw, int order, bool use_snr) + + message_port_register_in(pmt::mp("noise")); + set_msg_handler(pmt::mp("noise"), +- boost::bind(&costas_loop_cc_impl::handle_set_noise, this, _1)); ++ boost::bind(&costas_loop_cc_impl::handle_set_noise, ++ this, ++ boost::placeholders::_1)); + } + + costas_loop_cc_impl::~costas_loop_cc_impl() {} +diff --git a/gr-digital/lib/crc32_async_bb_impl.cc b/gr-digital/lib/crc32_async_bb_impl.cc +index bffbb2a737..66143866c0 100644 +--- a/gr-digital/lib/crc32_async_bb_impl.cc ++++ b/gr-digital/lib/crc32_async_bb_impl.cc +@@ -48,9 +48,13 @@ crc32_async_bb_impl::crc32_async_bb_impl(bool check) + message_port_register_out(d_out_port); + + if (check) +- set_msg_handler(d_in_port, boost::bind(&crc32_async_bb_impl::check, this, _1)); ++ set_msg_handler( ++ d_in_port, ++ boost::bind(&crc32_async_bb_impl::check, this, boost::placeholders::_1)); + else +- set_msg_handler(d_in_port, boost::bind(&crc32_async_bb_impl::calc, this, _1)); ++ set_msg_handler( ++ d_in_port, ++ boost::bind(&crc32_async_bb_impl::calc, this, boost::placeholders::_1)); + } + + crc32_async_bb_impl::~crc32_async_bb_impl() {} +diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc +index 98c805fb20..7cc1e0a4ed 100644 +--- a/gr-digital/lib/header_payload_demux_impl.cc ++++ b/gr-digital/lib/header_payload_demux_impl.cc +@@ -150,9 +150,10 @@ header_payload_demux_impl::header_payload_demux_impl( + } + set_tag_propagation_policy(TPP_DONT); + message_port_register_in(msg_port_id()); +- set_msg_handler( +- msg_port_id(), +- boost::bind(&header_payload_demux_impl::parse_header_data_msg, this, _1)); ++ set_msg_handler(msg_port_id(), ++ boost::bind(&header_payload_demux_impl::parse_header_data_msg, ++ this, ++ boost::placeholders::_1)); + for (size_t i = 0; i < special_tags.size(); i++) { + d_special_tags.push_back(pmt::string_to_symbol(special_tags[i])); + d_special_tags_last_value.push_back(pmt::PMT_NIL); +diff --git a/gr-digital/lib/protocol_formatter_async_impl.cc b/gr-digital/lib/protocol_formatter_async_impl.cc +index 84b693745d..c08bbb9aeb 100644 +--- a/gr-digital/lib/protocol_formatter_async_impl.cc ++++ b/gr-digital/lib/protocol_formatter_async_impl.cc +@@ -55,7 +55,9 @@ protocol_formatter_async_impl::protocol_formatter_async_impl( + message_port_register_out(d_pld_port); + + set_msg_handler(d_in_port, +- boost::bind(&protocol_formatter_async_impl::append, this, _1)); ++ boost::bind(&protocol_formatter_async_impl::append, ++ this, ++ boost::placeholders::_1)); + } + + protocol_formatter_async_impl::~protocol_formatter_async_impl() {} +diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc +index e7a668c832..5d68d13ae7 100644 +--- a/gr-fec/lib/async_decoder_impl.cc ++++ b/gr-fec/lib/async_decoder_impl.cc +@@ -65,10 +65,14 @@ async_decoder_impl::async_decoder_impl(generic_decoder::sptr my_decoder, + if (d_packed) { + d_pack = new blocks::kernel::pack_k_bits(8); + set_msg_handler(d_in_port, +- boost::bind(&async_decoder_impl::decode_packed, this, _1)); ++ boost::bind(&async_decoder_impl::decode_packed, ++ this, ++ boost::placeholders::_1)); + } else { + set_msg_handler(d_in_port, +- boost::bind(&async_decoder_impl::decode_unpacked, this, _1)); ++ boost::bind(&async_decoder_impl::decode_unpacked, ++ this, ++ boost::placeholders::_1)); + } + + // The maximum frame size is set by the initial frame size of the decoder. +diff --git a/gr-fec/lib/async_encoder_impl.cc b/gr-fec/lib/async_encoder_impl.cc +index 811d55601f..506ae5c7e9 100644 +--- a/gr-fec/lib/async_encoder_impl.cc ++++ b/gr-fec/lib/async_encoder_impl.cc +@@ -64,7 +64,9 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, + + if (d_packed) { + set_msg_handler(d_in_port, +- boost::bind(&async_encoder_impl::encode_packed, this, _1)); ++ boost::bind(&async_encoder_impl::encode_packed, ++ this, ++ boost::placeholders::_1)); + + d_unpack = new blocks::kernel::unpack_k_bits(8); + +@@ -74,7 +76,9 @@ async_encoder_impl::async_encoder_impl(generic_encoder::sptr my_encoder, + + } else { + set_msg_handler(d_in_port, +- boost::bind(&async_encoder_impl::encode_unpacked, this, _1)); ++ boost::bind(&async_encoder_impl::encode_unpacked, ++ this, ++ boost::placeholders::_1)); + } + + if (d_packed || (strncmp(d_encoder->get_input_conversion(), "pack", 4) == 0)) { +diff --git a/gr-fec/lib/depuncture_bb_impl.cc b/gr-fec/lib/depuncture_bb_impl.cc +index 27d00bb5bb..f64dad45fc 100644 +--- a/gr-fec/lib/depuncture_bb_impl.cc ++++ b/gr-fec/lib/depuncture_bb_impl.cc +@@ -74,7 +74,9 @@ depuncture_bb_impl::depuncture_bb_impl(int puncsize, int puncpat, int delay, cha + set_fixed_rate(true); + set_relative_rate((uint64_t)d_puncsize, (uint64_t)(d_puncsize - d_puncholes)); + set_output_multiple(d_puncsize); +- // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, this, _1)); ++ // set_msg_handler(boost::bind(&depuncture_bb_impl::catch_msg, ++ // this, ++ // boost::placeholders::_1)); + } + + depuncture_bb_impl::~depuncture_bb_impl() {} +diff --git a/gr-fec/lib/puncture_bb_impl.cc b/gr-fec/lib/puncture_bb_impl.cc +index a365d6a69f..f2078d8c57 100644 +--- a/gr-fec/lib/puncture_bb_impl.cc ++++ b/gr-fec/lib/puncture_bb_impl.cc +@@ -72,7 +72,9 @@ puncture_bb_impl::puncture_bb_impl(int puncsize, int puncpat, int delay) + set_fixed_rate(true); + set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); + set_output_multiple(d_puncsize - d_puncholes); +- // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, this, _1)); ++ // set_msg_handler(boost::bind(&puncture_bb_impl::catch_msg, ++ // this, ++ // boost::placeholders::_1)); + } + + puncture_bb_impl::~puncture_bb_impl() {} +diff --git a/gr-fec/lib/puncture_ff_impl.cc b/gr-fec/lib/puncture_ff_impl.cc +index c95288d691..95fb649a8b 100644 +--- a/gr-fec/lib/puncture_ff_impl.cc ++++ b/gr-fec/lib/puncture_ff_impl.cc +@@ -72,7 +72,9 @@ puncture_ff_impl::puncture_ff_impl(int puncsize, int puncpat, int delay) + set_fixed_rate(true); + set_relative_rate((uint64_t)(d_puncsize - d_puncholes), (uint64_t)d_puncsize); + set_output_multiple(d_puncsize - d_puncholes); +- // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, this, _1)); ++ // set_msg_handler(boost::bind(&puncture_ff_impl::catch_msg, ++ // this, ++ // boost::placeholders::_1)); + } + + puncture_ff_impl::~puncture_ff_impl() {} +diff --git a/gr-filter/lib/freq_xlating_fir_filter_impl.cc b/gr-filter/lib/freq_xlating_fir_filter_impl.cc +index 8ddc967ba1..50ec589472 100644 +--- a/gr-filter/lib/freq_xlating_fir_filter_impl.cc ++++ b/gr-filter/lib/freq_xlating_fir_filter_impl.cc +@@ -72,7 +72,7 @@ freq_xlating_fir_filter_impl::freq_xlating_fir_filter_impl( + boost::bind( + &freq_xlating_fir_filter_impl::handle_set_center_freq, + this, +- _1)); ++ boost::placeholders::_1)); + } + + template +diff --git a/gr-filter/lib/mmse_resampler_cc_impl.cc b/gr-filter/lib/mmse_resampler_cc_impl.cc +index 59f9eacfab..bdce51716a 100644 +--- a/gr-filter/lib/mmse_resampler_cc_impl.cc ++++ b/gr-filter/lib/mmse_resampler_cc_impl.cc +@@ -52,8 +52,9 @@ mmse_resampler_cc_impl::mmse_resampler_cc_impl(float phase_shift, float resamp_r + + set_inverse_relative_rate(d_mu_inc); + message_port_register_in(pmt::intern("msg_in")); +- set_msg_handler(pmt::intern("msg_in"), +- boost::bind(&mmse_resampler_cc_impl::handle_msg, this, _1)); ++ set_msg_handler( ++ pmt::intern("msg_in"), ++ boost::bind(&mmse_resampler_cc_impl::handle_msg, this, boost::placeholders::_1)); + } + + mmse_resampler_cc_impl::~mmse_resampler_cc_impl() { delete d_resamp; } +diff --git a/gr-filter/lib/mmse_resampler_ff_impl.cc b/gr-filter/lib/mmse_resampler_ff_impl.cc +index 342d9f7678..3d72727114 100644 +--- a/gr-filter/lib/mmse_resampler_ff_impl.cc ++++ b/gr-filter/lib/mmse_resampler_ff_impl.cc +@@ -53,8 +53,9 @@ mmse_resampler_ff_impl::mmse_resampler_ff_impl(float phase_shift, float resamp_r + set_inverse_relative_rate(d_mu_inc); + + message_port_register_in(pmt::intern("msg_in")); +- set_msg_handler(pmt::intern("msg_in"), +- boost::bind(&mmse_resampler_ff_impl::handle_msg, this, _1)); ++ set_msg_handler( ++ pmt::intern("msg_in"), ++ boost::bind(&mmse_resampler_ff_impl::handle_msg, this, boost::placeholders::_1)); + } + + mmse_resampler_ff_impl::~mmse_resampler_ff_impl() { delete d_resamp; } +diff --git a/gr-qtgui/lib/const_sink_c_impl.cc b/gr-qtgui/lib/const_sink_c_impl.cc +index 852f6ee109..04d421d037 100644 +--- a/gr-qtgui/lib/const_sink_c_impl.cc ++++ b/gr-qtgui/lib/const_sink_c_impl.cc +@@ -69,8 +69,9 @@ const_sink_c_impl::const_sink_c_impl(int size, + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), +- boost::bind(&const_sink_c_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&const_sink_c_impl::handle_pdus, this, boost::placeholders::_1)); + + for (int i = 0; i < d_nconnections; i++) { + d_residbufs_real.push_back( +diff --git a/gr-qtgui/lib/edit_box_msg_impl.cc b/gr-qtgui/lib/edit_box_msg_impl.cc +index 8713aa820e..39546cbf3a 100644 +--- a/gr-qtgui/lib/edit_box_msg_impl.cc ++++ b/gr-qtgui/lib/edit_box_msg_impl.cc +@@ -158,7 +158,9 @@ edit_box_msg_impl::edit_box_msg_impl(data_type_t type, + message_port_register_out(d_port); + message_port_register_in(pmt::mp("val")); + +- set_msg_handler(pmt::mp("val"), boost::bind(&edit_box_msg_impl::set_value, this, _1)); ++ set_msg_handler( ++ pmt::mp("val"), ++ boost::bind(&edit_box_msg_impl::set_value, this, boost::placeholders::_1)); + } + + edit_box_msg_impl::~edit_box_msg_impl() +diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc +index 3a34df6ec6..fe231699fd 100644 +--- a/gr-qtgui/lib/freq_sink_c_impl.cc ++++ b/gr-qtgui/lib/freq_sink_c_impl.cc +@@ -82,17 +82,23 @@ freq_sink_c_impl::freq_sink_c_impl(int fftsize, + + // setup bw input port + message_port_register_in(d_port_bw); +- set_msg_handler(d_port_bw, boost::bind(&freq_sink_c_impl::handle_set_bw, this, _1)); ++ set_msg_handler( ++ d_port_bw, ++ boost::bind(&freq_sink_c_impl::handle_set_bw, this, boost::placeholders::_1)); + + // setup output message port to post frequency when display is + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); +- set_msg_handler(d_port, boost::bind(&freq_sink_c_impl::handle_set_freq, this, _1)); ++ set_msg_handler( ++ d_port, ++ boost::bind(&freq_sink_c_impl::handle_set_freq, this, boost::placeholders::_1)); + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&freq_sink_c_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&freq_sink_c_impl::handle_pdus, this, boost::placeholders::_1)); + + d_main_gui = NULL; + +diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc +index c14bfc31fd..7090d8699e 100644 +--- a/gr-qtgui/lib/freq_sink_f_impl.cc ++++ b/gr-qtgui/lib/freq_sink_f_impl.cc +@@ -82,17 +82,23 @@ freq_sink_f_impl::freq_sink_f_impl(int fftsize, + + // setup bw input port + message_port_register_in(d_port_bw); +- set_msg_handler(d_port_bw, boost::bind(&freq_sink_f_impl::handle_set_bw, this, _1)); ++ set_msg_handler( ++ d_port_bw, ++ boost::bind(&freq_sink_f_impl::handle_set_bw, this, boost::placeholders::_1)); + + // setup output message port to post frequency when display is + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); +- set_msg_handler(d_port, boost::bind(&freq_sink_f_impl::handle_set_freq, this, _1)); ++ set_msg_handler( ++ d_port, ++ boost::bind(&freq_sink_f_impl::handle_set_freq, this, boost::placeholders::_1)); + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&freq_sink_f_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&freq_sink_f_impl::handle_pdus, this, boost::placeholders::_1)); + + d_main_gui = NULL; + +diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc b/gr-qtgui/lib/histogram_sink_f_impl.cc +index d16de932ca..1602d18968 100644 +--- a/gr-qtgui/lib/histogram_sink_f_impl.cc ++++ b/gr-qtgui/lib/histogram_sink_f_impl.cc +@@ -81,8 +81,9 @@ histogram_sink_f_impl::histogram_sink_f_impl(int size, + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), +- boost::bind(&histogram_sink_f_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&histogram_sink_f_impl::handle_pdus, this, boost::placeholders::_1)); + + // +1 for the PDU buffer + for (int i = 0; i < d_nconnections + 1; i++) { +diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc +index d3feb9d16c..73136e789e 100644 +--- a/gr-qtgui/lib/sink_c_impl.cc ++++ b/gr-qtgui/lib/sink_c_impl.cc +@@ -96,7 +96,9 @@ sink_c_impl::sink_c_impl(int fftsize, + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); +- set_msg_handler(d_port, boost::bind(&sink_c_impl::handle_set_freq, this, _1)); ++ set_msg_handler( ++ d_port, ++ boost::bind(&sink_c_impl::handle_set_freq, this, boost::placeholders::_1)); + + d_main_gui = NULL; + +diff --git a/gr-qtgui/lib/sink_f_impl.cc b/gr-qtgui/lib/sink_f_impl.cc +index 418b630b78..d31023a51d 100644 +--- a/gr-qtgui/lib/sink_f_impl.cc ++++ b/gr-qtgui/lib/sink_f_impl.cc +@@ -95,7 +95,9 @@ sink_f_impl::sink_f_impl(int fftsize, + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); +- set_msg_handler(d_port, boost::bind(&sink_f_impl::handle_set_freq, this, _1)); ++ set_msg_handler( ++ d_port, ++ boost::bind(&sink_f_impl::handle_set_freq, this, boost::placeholders::_1)); + + d_main_gui = NULL; + +diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc b/gr-qtgui/lib/time_raster_sink_b_impl.cc +index 045c216b00..3aa503ccfc 100644 +--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc +@@ -84,7 +84,9 @@ time_raster_sink_b_impl::time_raster_sink_b_impl(double samp_rate, + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); + set_msg_handler(pmt::mp("in"), +- boost::bind(&time_raster_sink_b_impl::handle_pdus, this, _1)); ++ boost::bind(&time_raster_sink_b_impl::handle_pdus, ++ this, ++ boost::placeholders::_1)); + + d_scale = 1.0f; + +diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc b/gr-qtgui/lib/time_raster_sink_f_impl.cc +index d186f319da..b3516e5be9 100644 +--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc +@@ -84,7 +84,9 @@ time_raster_sink_f_impl::time_raster_sink_f_impl(double samp_rate, + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); + set_msg_handler(pmt::mp("in"), +- boost::bind(&time_raster_sink_f_impl::handle_pdus, this, _1)); ++ boost::bind(&time_raster_sink_f_impl::handle_pdus, ++ this, ++ boost::placeholders::_1)); + + d_icols = static_cast(ceil(d_cols)); + d_tmpflt = (float*)volk_malloc(d_icols * sizeof(float), volk_get_alignment()); +diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc +index b73a1c1ad3..83fbda298a 100644 +--- a/gr-qtgui/lib/time_sink_c_impl.cc ++++ b/gr-qtgui/lib/time_sink_c_impl.cc +@@ -80,7 +80,9 @@ time_sink_c_impl::time_sink_c_impl(int size, + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&time_sink_c_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&time_sink_c_impl::handle_pdus, this, boost::placeholders::_1)); + + // +2 for the PDU message buffers + for (unsigned int n = 0; n < d_nconnections + 2; n++) { +diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc +index df13998d75..dd5ed12c8b 100644 +--- a/gr-qtgui/lib/time_sink_f_impl.cc ++++ b/gr-qtgui/lib/time_sink_f_impl.cc +@@ -80,7 +80,9 @@ time_sink_f_impl::time_sink_f_impl(int size, + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&time_sink_f_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&time_sink_f_impl::handle_pdus, this, boost::placeholders::_1)); + + // +1 for the PDU buffer + for (unsigned int n = 0; n < d_nconnections + 1; n++) { +diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc b/gr-qtgui/lib/waterfall_sink_c_impl.cc +index fcf2ed98bc..da38d32baa 100644 +--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc +@@ -118,19 +118,24 @@ waterfall_sink_c_impl::waterfall_sink_c_impl(int fftsize, + // setup bw input port + message_port_register_in(d_port_bw); + set_msg_handler(d_port_bw, +- boost::bind(&waterfall_sink_c_impl::handle_set_bw, this, _1)); ++ boost::bind(&waterfall_sink_c_impl::handle_set_bw, ++ this, ++ boost::placeholders::_1)); + + // setup output message port to post frequency when display is + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); + set_msg_handler(d_port, +- boost::bind(&waterfall_sink_c_impl::handle_set_freq, this, _1)); ++ boost::bind(&waterfall_sink_c_impl::handle_set_freq, ++ this, ++ boost::placeholders::_1)); + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), +- boost::bind(&waterfall_sink_c_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&waterfall_sink_c_impl::handle_pdus, this, boost::placeholders::_1)); + } + + waterfall_sink_c_impl::~waterfall_sink_c_impl() +diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc b/gr-qtgui/lib/waterfall_sink_f_impl.cc +index aa1037a472..d4231a564c 100644 +--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc ++++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc +@@ -116,19 +116,24 @@ waterfall_sink_f_impl::waterfall_sink_f_impl(int fftsize, + // setup bw input port + message_port_register_in(d_port_bw); + set_msg_handler(d_port_bw, +- boost::bind(&waterfall_sink_f_impl::handle_set_bw, this, _1)); ++ boost::bind(&waterfall_sink_f_impl::handle_set_bw, ++ this, ++ boost::placeholders::_1)); + + // setup output message port to post frequency when display is + // double-clicked + message_port_register_out(d_port); + message_port_register_in(d_port); + set_msg_handler(d_port, +- boost::bind(&waterfall_sink_f_impl::handle_set_freq, this, _1)); ++ boost::bind(&waterfall_sink_f_impl::handle_set_freq, ++ this, ++ boost::placeholders::_1)); + + // setup PDU handling input port + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), +- boost::bind(&waterfall_sink_f_impl::handle_pdus, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&waterfall_sink_f_impl::handle_pdus, this, boost::placeholders::_1)); + } + + waterfall_sink_f_impl::~waterfall_sink_f_impl() +diff --git a/gr-uhd/lib/usrp_block_impl.cc b/gr-uhd/lib/usrp_block_impl.cc +index 4f030159ff..697d633c1b 100644 +--- a/gr-uhd/lib/usrp_block_impl.cc ++++ b/gr-uhd/lib/usrp_block_impl.cc +@@ -137,12 +137,18 @@ usrp_block_impl::usrp_block_impl(const ::uhd::device_addr_t& device_addr, + // Set up message ports: + message_port_register_in(pmt::mp("command")); + set_msg_handler(pmt::mp("command"), +- boost::bind(&usrp_block_impl::msg_handler_command, this, _1)); ++ boost::bind(&usrp_block_impl::msg_handler_command, ++ this, ++ boost::placeholders::_1)); + + // cuz we lazy: +-#define REGISTER_CMD_HANDLER(key, _handler) \ +- register_msg_cmd_handler(key, \ +- boost::bind(&usrp_block_impl::_handler, this, _1, _2, _3)) ++#define REGISTER_CMD_HANDLER(key, _handler) \ ++ register_msg_cmd_handler(key, \ ++ boost::bind(&usrp_block_impl::_handler, \ ++ this, \ ++ boost::placeholders::_1, \ ++ boost::placeholders::_2, \ ++ boost::placeholders::_3)) + // Register default command handlers: + REGISTER_CMD_HANDLER(cmd_freq_key(), _cmd_handler_freq); + REGISTER_CMD_HANDLER(cmd_gain_key(), _cmd_handler_gain); +@@ -257,11 +263,12 @@ bool usrp_block_impl::_check_mboard_sensors_locked() + } else if (_dev->get_clock_source(mboard_index) == "mimo") { + sensor_name = "mimo_locked"; + } +- if (not _wait_for_locked_sensor( +- get_mboard_sensor_names(mboard_index), +- sensor_name, +- boost::bind( +- &usrp_block_impl::get_mboard_sensor, this, _1, mboard_index))) { ++ if (not _wait_for_locked_sensor(get_mboard_sensor_names(mboard_index), ++ sensor_name, ++ boost::bind(&usrp_block_impl::get_mboard_sensor, ++ this, ++ boost::placeholders::_1, ++ mboard_index))) { + GR_LOG_WARN( + d_logger, + boost::format( +diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc +index a2ff0821bd..5e6bd43285 100644 +--- a/gr-uhd/lib/usrp_source_impl.cc ++++ b/gr-uhd/lib/usrp_source_impl.cc +@@ -57,8 +57,9 @@ usrp_source_impl::usrp_source_impl(const ::uhd::device_addr_t& device_addr, + + _samp_rate = this->get_samp_rate(); + _samps_per_packet = 1; +- register_msg_cmd_handler(cmd_tag_key(), +- boost::bind(&usrp_source_impl::_cmd_handler_tag, this, _1)); ++ register_msg_cmd_handler( ++ cmd_tag_key(), ++ boost::bind(&usrp_source_impl::_cmd_handler_tag, this, boost::placeholders::_1)); + } + + usrp_source_impl::~usrp_source_impl() {} +diff --git a/gr-zeromq/lib/pub_msg_sink_impl.cc b/gr-zeromq/lib/pub_msg_sink_impl.cc +index b5da7421ef..957cfa411d 100644 +--- a/gr-zeromq/lib/pub_msg_sink_impl.cc ++++ b/gr-zeromq/lib/pub_msg_sink_impl.cc +@@ -62,7 +62,9 @@ pub_msg_sink_impl::pub_msg_sink_impl(char* address, int timeout, bool bind) + } + + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&pub_msg_sink_impl::handler, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&pub_msg_sink_impl::handler, this, boost::placeholders::_1)); + } + + pub_msg_sink_impl::~pub_msg_sink_impl() +diff --git a/gr-zeromq/lib/push_msg_sink_impl.cc b/gr-zeromq/lib/push_msg_sink_impl.cc +index 4140781ab9..7d07d3a30e 100644 +--- a/gr-zeromq/lib/push_msg_sink_impl.cc ++++ b/gr-zeromq/lib/push_msg_sink_impl.cc +@@ -62,7 +62,9 @@ push_msg_sink_impl::push_msg_sink_impl(char* address, int timeout, bool bind) + } + + message_port_register_in(pmt::mp("in")); +- set_msg_handler(pmt::mp("in"), boost::bind(&push_msg_sink_impl::handler, this, _1)); ++ set_msg_handler( ++ pmt::mp("in"), ++ boost::bind(&push_msg_sink_impl::handler, this, boost::placeholders::_1)); + } + + push_msg_sink_impl::~push_msg_sink_impl() diff --git a/gnuradio.changes b/gnuradio.changes index 8b5511a..f7634a7 100644 --- a/gnuradio.changes +++ b/gnuradio.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Sep 17 08:54:28 UTC 2020 - Martin Hauke + +- Add patches to build with boost >= 1.73.0: + * 0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch + * 0002-boost_qualify_placeholders_with_their_full_namespace.patch + * revert-23cece0d0.patch + For details see: + * https://github.com/gnuradio/gnuradio/pull/3441 + * https://github.com/gnuradio/gnuradio/pull/3566 + ------------------------------------------------------------------- Wed Aug 26 13:36:06 UTC 2020 - Matwey Kornilov diff --git a/gnuradio.spec b/gnuradio.spec index 4192962..63ab1ad 100644 --- a/gnuradio.spec +++ b/gnuradio.spec @@ -31,6 +31,9 @@ Source0: https://github.com/gnuradio/gnuradio/releases/download/v%{versio Source4: grc_to_37.sh Source99: %{name}-rpmlintrc Patch0: missing_library.patch +Patch1: revert-23cece0d0.patch +Patch2: 0001-gr-digital-glfsr.h-drop-boost-cstdint.hpp-and-use-cs.patch +Patch3: 0002-boost_qualify_placeholders_with_their_full_namespace.patch BuildRequires: alsa-devel BuildRequires: cmake >= 3.8 BuildRequires: cppunit-devel @@ -159,6 +162,9 @@ This package contains some examples of using GNU Radio. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 # remove buildtime from documentation sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' docs/doxygen/Doxyfile.in diff --git a/revert-23cece0d0.patch b/revert-23cece0d0.patch new file mode 100644 index 0000000..3935da2 --- /dev/null +++ b/revert-23cece0d0.patch @@ -0,0 +1,555 @@ +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 523f4bbda..90b785104 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -132,18 +132,6 @@ Older Logs can be found in `docs/RELEASE-NOTES-*`. + - global option to toggle showing of IDs + - Help "Keyboard Shortcut" entry + +-### Deprecated +- +-#### gr-analog +- +-- `sig_source`: `freq` port will be removed in the future +- +-### Added +-#### gr-analog +- +-- `sig_source`: `cmd` port adds support for dicts, setting of frequency, +- amplitude, offset and phase parameters +- + ## [3.8.0.0] - 2019-08-09 + + Witness me! +diff --git a/gr-analog/examples/sig_source_msg_ports.grc b/gr-analog/examples/sig_source_msg_ports.grc +deleted file mode 100644 +index 9cba1c62a..000000000 +--- a/gr-analog/examples/sig_source_msg_ports.grc ++++ /dev/null +@@ -1,242 +0,0 @@ +-options: +- parameters: +- author: "Marcus M\xFCller" +- catch_exceptions: 'True' +- category: '[GRC Hier Blocks]' +- cmake_opt: '' +- comment: '' +- copyright: 2020 Free Software Foundation +- description: '' +- gen_cmake: 'On' +- gen_linking: dynamic +- generate_options: qt_gui +- hier_block_src_path: '.:' +- id: demonstrate_signal_source_message_ports +- max_nouts: '0' +- output_language: python +- placement: (0,0) +- qt_qss_theme: '' +- realtime_scheduling: '' +- run: 'True' +- run_command: '{python} -u {filename}' +- run_options: prompt +- sizing_mode: fixed +- thread_safe_setters: '' +- title: 'Demonstration: Signal Source Message Ports' +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [0, 4.0] +- rotation: 0 +- state: enabled +- +-blocks: +-- name: analog_sig_source_x_0 +- id: analog_sig_source_x +- parameters: +- affinity: '' +- alias: '' +- amp: '1' +- comment: '' +- freq: '1000' +- maxoutbuf: '0' +- minoutbuf: '0' +- offset: '0' +- phase: '0' +- samp_rate: samp_rate +- type: complex +- waveform: analog.GR_COS_WAVE +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [296, 188.0] +- rotation: 0 +- state: true +-- name: blocks_message_strobe_0 +- id: blocks_message_strobe +- parameters: +- affinity: '' +- alias: '' +- comment: 'sets the amplitude +- +- and frequency every +- +- second' +- maxoutbuf: '0' +- minoutbuf: '0' +- msg: 'pmt.to_pmt({"freq": 2000, "ampl":1.5})' +- period: '1000' +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [40, 148.0] +- rotation: 0 +- state: true +-- name: blocks_message_strobe_random_0 +- id: blocks_message_strobe_random +- parameters: +- affinity: '' +- alias: '' +- comment: 'resets the phase +- +- at random points +- +- in time' +- dist: blocks.STROBE_GAUSSIAN +- maxoutbuf: '0' +- mean: '200' +- minoutbuf: '0' +- msg: pmt.to_pmt({"phase":0.0}) +- std: '40' +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [24, 292.0] +- rotation: 0 +- state: true +-- name: blocks_throttle_0 +- id: blocks_throttle +- parameters: +- affinity: '' +- alias: '' +- comment: '' +- ignoretag: 'True' +- maxoutbuf: '0' +- minoutbuf: '0' +- samples_per_second: samp_rate +- type: complex +- vlen: '1' +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [496, 228.0] +- rotation: 0 +- state: true +-- name: qtgui_time_sink_x_0 +- id: qtgui_time_sink_x +- parameters: +- affinity: '' +- alias: '' +- alpha1: '1.0' +- alpha10: '1.0' +- alpha2: '1.0' +- alpha3: '1.0' +- alpha4: '1.0' +- alpha5: '1.0' +- alpha6: '1.0' +- alpha7: '1.0' +- alpha8: '1.0' +- alpha9: '1.0' +- autoscale: 'False' +- axislabels: 'True' +- color1: blue +- color10: dark blue +- color2: red +- color3: green +- color4: black +- color5: cyan +- color6: magenta +- color7: yellow +- color8: dark red +- color9: dark green +- comment: '' +- ctrlpanel: 'False' +- entags: 'True' +- grid: 'False' +- gui_hint: '' +- label1: Signal 1 +- label10: Signal 10 +- label2: Signal 2 +- label3: Signal 3 +- label4: Signal 4 +- label5: Signal 5 +- label6: Signal 6 +- label7: Signal 7 +- label8: Signal 8 +- label9: Signal 9 +- legend: 'True' +- marker1: '-1' +- marker10: '-1' +- marker2: '-1' +- marker3: '-1' +- marker4: '-1' +- marker5: '-1' +- marker6: '-1' +- marker7: '-1' +- marker8: '-1' +- marker9: '-1' +- name: '""' +- nconnections: '1' +- size: '1024' +- srate: samp_rate +- stemplot: 'False' +- style1: '1' +- style10: '1' +- style2: '1' +- style3: '1' +- style4: '1' +- style5: '1' +- style6: '1' +- style7: '1' +- style8: '1' +- style9: '1' +- tr_chan: '0' +- tr_delay: '0' +- tr_level: '0.0' +- tr_mode: qtgui.TRIG_MODE_NORM +- tr_slope: qtgui.TRIG_SLOPE_POS +- tr_tag: '""' +- type: complex +- update_time: '0.10' +- width1: '1' +- width10: '1' +- width2: '1' +- width3: '1' +- width4: '1' +- width5: '1' +- width6: '1' +- width7: '1' +- width8: '1' +- width9: '1' +- ylabel: Amplitude +- ymax: '2' +- ymin: '-2' +- yunit: '""' +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [656, 212.0] +- rotation: 0 +- state: true +-- name: samp_rate +- id: parameter +- parameters: +- alias: '' +- comment: '' +- hide: none +- label: Sampling Rate [Hz] +- short_id: r +- type: eng_float +- value: 100e3 +- states: +- bus_sink: false +- bus_source: false +- bus_structure: null +- coordinate: [192, 4.0] +- rotation: 0 +- state: true +- +-connections: +-- [analog_sig_source_x_0, '0', blocks_throttle_0, '0'] +-- [blocks_message_strobe_0, strobe, analog_sig_source_x_0, cmd] +-- [blocks_message_strobe_random_0, strobe, analog_sig_source_x_0, cmd] +-- [blocks_throttle_0, '0', qtgui_time_sink_x_0, '0'] +- +-metadata: +- file_format: 1 +diff --git a/gr-analog/grc/analog_sig_source_x.block.yml b/gr-analog/grc/analog_sig_source_x.block.yml +index aa16061de..ebd55c2df 100644 +--- a/gr-analog/grc/analog_sig_source_x.block.yml ++++ b/gr-analog/grc/analog_sig_source_x.block.yml +@@ -40,10 +40,6 @@ parameters: + default: '0' + + inputs: +-- domain: message +- id: cmd +- optional: true +- + - domain: message + id: freq + optional: true +diff --git a/gr-analog/lib/sig_source_impl.cc b/gr-analog/lib/sig_source_impl.cc +index 0a6289f2d..b73b32982 100644 +--- a/gr-analog/lib/sig_source_impl.cc ++++ b/gr-analog/lib/sig_source_impl.cc +@@ -65,12 +65,9 @@ sig_source_impl::sig_source_impl(double sampling_freq, + { + this->set_frequency(frequency); + this->set_phase(phase); +- this->message_port_register_in(pmt::mp("cmd")); +- this->set_msg_handler(pmt::mp("cmd"), +- [this](pmt::pmt_t msg) { this->set_cmd_msg(msg); }); + this->message_port_register_in(pmt::mp("freq")); + this->set_msg_handler(pmt::mp("freq"), +- [this](pmt::pmt_t msg) { this->set_freq_msg(msg); }); ++ boost::bind(&sig_source_impl::set_frequency_msg, this, _1)); + } + + template +@@ -79,76 +76,32 @@ sig_source_impl::~sig_source_impl() + } + + template +-void sig_source_impl::set_freq_msg(pmt::pmt_t msg) ++void sig_source_impl::set_frequency_msg(pmt::pmt_t msg) + { +- GR_LOG_INFO(this->d_logger, +- "The `freq` port is deprecated and will be removed. Forwarding this " +- "message to the `cmd` handler."); ++ // Accepts either a number that is assumed to be the new ++ // frequency or a key:value pair message where the key must be ++ // "freq" and the value is the new frequency. ++ + if (pmt::is_number(msg)) { +- // if plain number, then interpret it as frequency + set_frequency(pmt::to_double(msg)); +- return; +- } +- set_cmd_msg(msg); +-} +- +-template +-void sig_source_impl::set_cmd_msg(pmt::pmt_t msg) +-{ +- static auto freq_key = pmt::intern("freq"); +- static auto ampl_key = pmt::intern("ampl"); +- static auto phase_key = pmt::intern("phase"); +- static auto offset_key = pmt::intern("offset"); +- +- // either a key:value pair or a dict +- pmt::pmt_t list_of_items; +- if (pmt::is_dict(msg)) { +- list_of_items = pmt::dict_items(msg); + } else if (pmt::is_pair(msg)) { +- list_of_items = pmt::list1(msg); +- } else { +- GR_LOG_WARN(this->d_logger, "malformed message: is not dict nor pair"); +- return; +- } +- +- do { +- auto item = pmt::car(list_of_items); +- +- auto key = pmt::car(item); +- auto val = pmt::cdr(item); +- +- if (key == freq_key) { ++ pmt::pmt_t key = pmt::car(msg); ++ pmt::pmt_t val = pmt::cdr(msg); ++ if (pmt::eq(key, pmt::intern("freq"))) { + if (pmt::is_number(val)) { + set_frequency(pmt::to_double(val)); +- } else { +- GR_LOG_WARN(this->d_logger, "frequency value needs to be a number") +- } +- } else if (key == ampl_key) { +- if (pmt::is_number(val)) { +- set_amplitude(pmt::to_double(val)); +- } else { +- GR_LOG_WARN(this->d_logger, "amplitude value needs to be a number") +- } +- } else if (key == phase_key) { +- if (pmt::is_number(val)) { +- set_phase(pmt::to_double(val)); +- } else { +- GR_LOG_WARN(this->d_logger, "phase value needs to be a number") +- } +- } else if (key == offset_key) { +- if (pmt::is_number(val)) { +- set_offset(pmt::to_double(val)); +- } else { +- GR_LOG_WARN(this->d_logger, "offset value needs to be a number") + } + } else { + GR_LOG_WARN(this->d_logger, +- "unsupported message key " + pmt::write_string(key)); ++ boost::format("Set Frequency Message must have " ++ "the key = 'freq'; got '%1%'.") % ++ pmt::write_string(key)); + } +- +- // advance to next item, if any +- list_of_items = pmt::cdr(list_of_items); +- } while (list_of_items != pmt::PMT_NIL); ++ } else { ++ GR_LOG_WARN(this->d_logger, ++ "Set Frequency Message must be either a number or a " ++ "key:value pair where the key is 'freq'."); ++ } + } + + template +@@ -371,5 +324,5 @@ template class sig_source; + template class sig_source; + template class sig_source; + template class sig_source; +-} // namespace analog ++} /* namespace analog */ + } /* namespace gr */ +diff --git a/gr-analog/lib/sig_source_impl.h b/gr-analog/lib/sig_source_impl.h +index 82740cb6a..6b6457a16 100644 +--- a/gr-analog/lib/sig_source_impl.h ++++ b/gr-analog/lib/sig_source_impl.h +@@ -1,6 +1,6 @@ + /* -*- c++ -*- */ + /* +- * Copyright 2004,2012,2018,2020 Free Software Foundation, Inc. ++ * Copyright 2004,2012,2018 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * +@@ -64,12 +64,7 @@ public: + + void set_sampling_freq(double sampling_freq); + void set_waveform(gr_waveform_t waveform); +- +- // Message handlers +- //!\brief deprecated handler. Use "cmd" port instead. +- void set_freq_msg(pmt::pmt_t msg); +- void set_cmd_msg(pmt::pmt_t msg); +- ++ void set_frequency_msg(pmt::pmt_t msg); + void set_frequency(double frequency); + void set_amplitude(double ampl); + void set_offset(T offset); +diff --git a/gr-analog/python/analog/qa_sig_source.py b/gr-analog/python/analog/qa_sig_source.py +index 81ba7e407..b5acf750c 100644 +--- a/gr-analog/python/analog/qa_sig_source.py ++++ b/gr-analog/python/analog/qa_sig_source.py +@@ -1,8 +1,8 @@ + #!/usr/bin/env python + # +-#Copyright 2004, 2007, 2010, 2012, 2013, 2020 Free Software Foundation, Inc. ++# Copyright 2004,2007,2010,2012,2013 Free Software Foundation, Inc. + # +-#This file is part of GNU Radio ++# This file is part of GNU Radio + # + # GNU Radio is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -26,8 +26,8 @@ import math + import pmt + from gnuradio import gr, gr_unittest, analog, blocks + +- + class test_sig_source(gr_unittest.TestCase): ++ + def setUp(self): + self.tb = gr.top_block() + +@@ -83,6 +83,7 @@ class test_sig_source(gr_unittest.TestCase): + dst_data = dst1.data() + self.assertFloatTuplesAlmostEqual(expected_result, dst_data, 5) + ++ + def test_sine_b(self): + tb = self.tb + sqrt2 = math.sqrt(2) / 2 +@@ -96,7 +97,7 @@ class test_sig_source(gr_unittest.TestCase): + tb.connect(op, dst1) + tb.run() + dst_data = dst1.data() +- #Let the python know we are dealing with signed int behind scenes ++ # Let the python know we are dealing with signed int behind scenes + dst_data_signed = [b if b < 127 else (256 - b) * -1 for b in dst_data] + self.assertFloatTuplesAlmostEqual(expected_result, dst_data_signed) + +@@ -117,10 +118,7 @@ class test_sig_source(gr_unittest.TestCase): + tb = self.tb + sqrt2 = math.sqrt(2) / 2 + sqrt2j = 1j * math.sqrt(2) / 2 +- expected_result = [ +- 1, sqrt2 + sqrt2j, 1j, -sqrt2 + sqrt2j, -1, -sqrt2 - sqrt2j, -1j, +- sqrt2 - sqrt2j, 1 +- ] ++ expected_result = (1, sqrt2 + sqrt2j, 1j, -sqrt2 + sqrt2j, -1, -sqrt2 - sqrt2j, -1j, sqrt2 - sqrt2j, 1) + src1 = analog.sig_source_c(8, analog.GR_COS_WAVE, 1.0, 1.0) + op = blocks.head(gr.sizeof_gr_complex, 9) + dst1 = blocks.vector_sink_c() +@@ -140,14 +138,12 @@ class test_sig_source(gr_unittest.TestCase): + tb.connect(op, dst1) + tb.run() + dst_data = dst1.data() +- self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 5) ++ self.assertEqual(expected_result, dst_data) + + def test_tri_c(self): + tb = self.tb +- expected_result = [ +- 1 + .5j, .75 + .75j, .5 + 1j, .25 + .75j, 0 + .5j, .25 + .25j, +- .5 + 0j, .75 + .25j, 1 + .5j +- ] ++ expected_result = (1+.5j, .75+.75j, .5+1j, .25+.75j, 0+.5j, ++ .25+.25j, .5+0j, .75+.25j, 1+.5j) + src1 = analog.sig_source_c(8, analog.GR_TRI_WAVE, 1.0, 1.0) + op = blocks.head(gr.sizeof_gr_complex, 9) + dst1 = blocks.vector_sink_c() +@@ -159,10 +155,8 @@ class test_sig_source(gr_unittest.TestCase): + + def test_saw_c(self): + tb = self.tb +- expected_result = [ +- .5 + .25j, .625 + .375j, .75 + .5j, .875 + .625j, 0 + .75j, +- .125 + .875j, .25 + 1j, .375 + .125j, .5 + .25j +- ] ++ expected_result = (.5+.25j, .625+.375j, .75+.5j, .875+.625j, ++ 0+.75j, .125+.875j, .25+1j, .375+.125j, .5+.25j) + src1 = analog.sig_source_c(8, analog.GR_SAW_WAVE, 1.0, 1.0) + op = blocks.head(gr.sizeof_gr_complex, 9) + dst1 = blocks.vector_sink_c() +@@ -208,7 +202,7 @@ class test_sig_source(gr_unittest.TestCase): + dst_data = dst1.data() + self.assertFloatTuplesAlmostEqual(expected_result, dst_data, 5) + +- def test_freq_msg(self): # deprecated but still tested ++ def test_freq_msg(self): + src = analog.sig_source_c(8, analog.GR_SIN_WAVE, 1.0, 1.0) + op = blocks.head(gr.sizeof_gr_complex, 9) + snk = blocks.vector_sink_c() +@@ -221,30 +215,6 @@ class test_sig_source(gr_unittest.TestCase): + + self.assertAlmostEqual(src.frequency(), frequency) + +- def test_cmd_msg(self): +- src = analog.sig_source_c(8, analog.GR_SIN_WAVE, 1.0, 1.0) +- op = blocks.head(gr.sizeof_gr_complex, 9) +- snk = blocks.vector_sink_c() +- self.tb.connect(src, op, snk) +- self.assertAlmostEqual(src.frequency(), 1.0) +- +- frequency = 3.0 +- amplitude = 10 +- offset = -1.0 +- +- src._post( +- pmt.to_pmt('freq'), +- pmt.to_pmt({ +- "freq": frequency, +- "ampl": amplitude, +- "offset": offset +- })) +- self.tb.run() +- +- self.assertAlmostEqual(src.frequency(), frequency) +- self.assertAlmostEqual(src.amplitude(), amplitude) +- self.assertAlmostEqual(src.offset(), offset) +- + + if __name__ == '__main__': + gr_unittest.run(test_sig_source, "test_sig_source.xml")