Message ID | 20240810134440.903175-1-ju.o@free.fr |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/mariadb: fix build with fmt >= 11.0.1 | expand |
On Sat, 10 Aug 2024 15:44:40 +0200 Julien Olivain <ju.o@free.fr> wrote: > MariaDB is failing to build since commit 6b86f076c3 "package/fmt: bump > to version 11.0.1" with output: > > /buildroot/output/build/aarch64-buildroot-linux-gnu/sysroot/usr/include/fmt/base.h:1402:29: error: passing 'const fmt::v11::formatter<String>' as 'this' argument discards qualifiers [-fpermissive] > 1402 | ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx)); > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This commit is fixing the issue by adding an upstream patch, rebased > on the package version. > > Fixes: > http://autobuild.buildroot.org/results/3106928a2d6b32acfb075a2840cf549a81784270/ > and many others. > > Signed-off-by: Julien Olivain <ju.o@free.fr> > --- > Note: at the time of this writing, there is a newer mariadb version > 10.11.9 available. It introduces new, unrelated build failures in > Buildroot. This patch backports the upstream fix on the current > package version in Buildroot, to be included in the upcoming > Buildroot 2024.08 version. > --- > ...le-failure-fmt-use-incompatible-with.patch | 35 +++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100644 package/mariadb/0002-MDEV-34206-compile-failure-fmt-use-incompatible-with.patch Applied to master, thanks. Thomas
diff --git a/package/mariadb/0002-MDEV-34206-compile-failure-fmt-use-incompatible-with.patch b/package/mariadb/0002-MDEV-34206-compile-failure-fmt-use-incompatible-with.patch new file mode 100644 index 0000000000..b6c8807f44 --- /dev/null +++ b/package/mariadb/0002-MDEV-34206-compile-failure-fmt-use-incompatible-with.patch @@ -0,0 +1,35 @@ +From 69935c10b95fc7f7a2e1c3ed02831958e1a9b6a4 Mon Sep 17 00:00:00 2001 +From: Daniel Black <daniel@mariadb.org> +Date: Wed, 22 May 2024 17:43:17 +1000 +Subject: [PATCH] MDEV-34206 compile failure: fmt use incompatible with + libfmt-10.2.[2]+ + +Upstream libfmt commit https://github.com/fmtlib/fmt/commit/d70729215fba1d54862e407b626abf86ddf409bf +now requires the format function to be const. + +Adjust the function prototype so it is const and can compile.a + +Signed-off-by: Daniel Black <daniel@mariadb.org> +[Julien: add SoB line with the original patch author name] +Upstream: https://github.com/MariaDB/server/commit/4375245d5d9f01cabb6e3fd6c637535e724eae38 +Signed-off-by: Julien Olivain <ju.o@free.fr> +--- + sql/item_strfunc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc +index 4bbf36ec1cf..2ad8a9b3ce5 100644 +--- a/sql/item_strfunc.cc ++++ b/sql/item_strfunc.cc +@@ -1392,7 +1392,7 @@ bool Item_func_sformat::fix_length_and_dec(THD *thd) + namespace fmt { + template <> struct formatter<String>: formatter<string_view> { + template <typename FormatContext> +- auto format(String c, FormatContext& ctx) -> decltype(ctx.out()) { ++ auto format(String c, FormatContext& ctx) const -> decltype(ctx.out()) { + string_view name = { c.ptr(), c.length() }; + return formatter<string_view>::format(name, ctx); + }; +-- +2.46.0 +
MariaDB is failing to build since commit 6b86f076c3 "package/fmt: bump to version 11.0.1" with output: /buildroot/output/build/aarch64-buildroot-linux-gnu/sysroot/usr/include/fmt/base.h:1402:29: error: passing 'const fmt::v11::formatter<String>' as 'this' argument discards qualifiers [-fpermissive] 1402 | ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx)); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This commit is fixing the issue by adding an upstream patch, rebased on the package version. Fixes: http://autobuild.buildroot.org/results/3106928a2d6b32acfb075a2840cf549a81784270/ and many others. Signed-off-by: Julien Olivain <ju.o@free.fr> --- Note: at the time of this writing, there is a newer mariadb version 10.11.9 available. It introduces new, unrelated build failures in Buildroot. This patch backports the upstream fix on the current package version in Buildroot, to be included in the upcoming Buildroot 2024.08 version. --- ...le-failure-fmt-use-incompatible-with.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/mariadb/0002-MDEV-34206-compile-failure-fmt-use-incompatible-with.patch