From f1361234091036fdf7e599c9596151732cbb5683 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 11 Jun 2020 09:44:48 +0200 Subject: python: radio_control: Explicitly import ALL_CHANS into Python bindings This avoids a dynamic linker error by copying the ALL_CHANS value into the the Python bindings before using it. --- host/lib/rfnoc/radio_control_python.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/host/lib/rfnoc/radio_control_python.hpp b/host/lib/rfnoc/radio_control_python.hpp index 21dfcb744..2f76209f2 100644 --- a/host/lib/rfnoc/radio_control_python.hpp +++ b/host/lib/rfnoc/radio_control_python.hpp @@ -13,6 +13,9 @@ using namespace uhd::rfnoc; void export_radio_control(py::module& m) { + // Re-import ALL_CHANS here to avoid linker errors + const auto ALL_CHANS = radio_control::ALL_CHANS; + py::class_(m, "radio_control") .def(py::init(&block_controller_factory::make_from)) .def("set_rate", &radio_control::set_rate) @@ -137,7 +140,7 @@ void export_radio_control(py::module& m) .def("set_rx_dc_offset", py::overload_cast(&radio_control::set_rx_dc_offset), py::arg("enb"), - py::arg("chan") = radio_control::ALL_CHANS) + py::arg("chan") = ALL_CHANS) .def("set_rx_dc_offset", py::overload_cast&, size_t>( &radio_control::set_rx_dc_offset), -- cgit v1.2.3