[Tile-serving] [openstreetmap/osm2pgsql] Does not build with fmt 8.1.1 (Issue #1653)
Dmitry Marakasov
notifications at github.com
Mon Mar 14 19:02:35 UTC 2022
I'm working on an update for FreeBSD port of osm2pgsql to 1.6.0. The project currently does not build with libfmt version is 8.1.1. Bundled fmt builds fine, but that will not be used due to packaging policies.
```
/usr/local/include/fmt/core.h:1727:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
static_assert(
^
/usr/local/include/fmt/core.h:1853:23: note: in instantiation of function template specialization 'fmt::v8::detail::make_arg<true, fmt::v8::basic_format_context<fmt::v8::appender, char>, fmt::v8::detail::type::custom_type, const table_column_type &, 0>' requested here
data_{detail::make_arg<
^
/usr/local/include/fmt/format.h:844:10: note: in instantiation of function template specialization 'fmt::v8::format_arg_store<fmt::v8::basic_format_context<fmt::v8::appender, char>, table_column_type>::format_arg_store<const table_column_type &>' requested here
return {args...};
^
/usr/local/include/fmt/format.h:2391:30: note: in instantiation of function template specialization 'fmt::v8::make_args_checked<table_column_type, fmt::v8::basic_string_view<char>, char>' requested here
return vformat(str, fmt::make_args_checked<T...>(str, args...));
^
/wrkdirs/usr/ports/converters/osm2pgsql/work/osm2pgsql-1.6.0/src/output-flex.cpp:639:53: note: in instantiation of function template specialization 'fmt::v8::detail::udl_formatter<char>::operator()<table_column_type>' requested here
"Column type {} not implemented."_format(column.type())};
^
```
Probably I'll patch it like this for now:
```
--- src/output-flex.cpp.orig 2022-01-24 15:04:03 UTC
+++ src/output-flex.cpp
@@ -636,7 +636,7 @@ void output_flex_t::write_column(
}
} else {
throw std::runtime_error{
- "Column type {} not implemented."_format(column.type())};
+ "Column type {} not implemented."_format(static_cast<uint8_t>(column.type()))};
}
lua_pop(lua_state(), 1);
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1653
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/issues/1653 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220314/130f4b6b/attachment.htm>
More information about the Tile-serving
mailing list