Closed AsriFox closed 1 year ago
Trying to build gnuradio dev-4.0, I encountered an issue with this subproject. Ninja produced 32 errors of this kind:
/usr/include/fmt/format.h:3980:38: error: passing ‘const fmt::v9::formatter< /* stuff */ >::formatter_type’ {aka ‘const fmt::v9::formatter<std::complex<double>, char, void>’} as ‘this’ argument discards qualifiers [-fpermissive] 3980 | out = value_formatter_.format(map(*it), ctx); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ../include/pmtv/pmt.hpp:368:10: note: in call to ‘auto fmt::v9::formatter<T>::format(const C&, FormatContext&) [with FormatContext = fmt::v9::basic_format_context<fmt::v9::appender, char>; C = std::complex<double>]’ 368 | auto format(const C& arg, FormatContext& ctx) { | ^~~~~~
See ninja logs.
Workaround / possible solution: modify function declarations to be const methods, like so:
const
auto format(const pmtv::map_t::value_type& kv, FormatContext& ctx)
auto format(const pmtv::map_t::value_type& kv, FormatContext& ctx) const
auto format(const C& arg, FormatContext& ctx)
auto format(const C& arg, FormatContext& ctx) const
auto format(const P& value, FormatContext& ctx)
auto format(const P& arg, FormatContext& ctx) const
When applied, this change allowed pmt to build successfuly.
With #89 build succeeds. Thank you for your time. Excited to see GNU Radio 4.0 in the future!
Trying to build gnuradio dev-4.0, I encountered an issue with this subproject.
Ninja produced 32 errors of this kind:
See ninja logs.
Workaround / possible solution: modify function declarations to be
const
methods, like so:auto format(const pmtv::map_t::value_type& kv, FormatContext& ctx)
toauto format(const pmtv::map_t::value_type& kv, FormatContext& ctx) const
;auto format(const C& arg, FormatContext& ctx)
toauto format(const C& arg, FormatContext& ctx) const
;auto format(const P& value, FormatContext& ctx)
toauto format(const P& arg, FormatContext& ctx) const
.When applied, this change allowed pmt to build successfuly.