Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34206

compile failure: fmt use incompatible with libfmt-10.2.[2]+

    XMLWordPrintable

Details

    Description

      fmt as of https://github.com/fmtlib/fmt/commit/b81761068b5cc346b30a023cc6077d34afba1e01

      ref: https://fmt.dev/latest/api.html#args-api

      https://buildbot.mariadb.org/#/builders/622/builds/1847/steps/4/logs/stdio

       
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc: In member function 'virtual String* Item_func_sformat::val_str(String*)':
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:1423:62: warning: 'new' of type 'fmt::v10::basic_format_args<fmt::v10::context>::format_arg' {aka 'fmt::v10::basic_format_arg<fmt::v10::context>'} with extended alignment 16 [-Waligned-new=]
       1423 |   if (!(vargs= new fmt::format_args::format_arg[arg_count - 1]))
            |                                                              ^
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:1423:62: note: uses 'void* operator new [](std::size_t)', which does not have an alignment parameter
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:1423:62: note: use '-faligned-new' to enable C++17 over-aligned new support
      [ 80%] Building CXX object sql/CMakeFiles/sql.dir/rpl_record_old.cc.o
      [ 80%] Building CXX object sql/CMakeFiles/sql.dir/mf_iocache.cc.o
      In file included from /home/buildbot/inst-fmt/include/fmt/format.h:56,
                       from /home/buildbot/inst-fmt/include/fmt/format-inl.h:27,
                       from /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:61:
      /home/buildbot/inst-fmt/include/fmt/base.h: In instantiation of 'static void fmt::v10::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = String; Formatter = fmt::v10::formatter<String>; Context = fmt::v10::context; typename Context::parse_context_type = fmt::v10::basic_format_parse_context<char>]':
      /home/buildbot/inst-fmt/include/fmt/base.h:1381:19:   required from 'fmt::v10::detail::value<Context>::value(T&) [with T = String; Context = fmt::v10::context]'
      /home/buildbot/inst-fmt/include/fmt/base.h:1639:41:   required from 'fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = String; typename std::enable_if<PACKED, int>::type <anonymous> = 0]'
      /home/buildbot/inst-fmt/include/fmt/base.h:1646:39:   required from 'fmt::v10::basic_format_arg<Context> fmt::v10::detail::make_arg(T&) [with Context = fmt::v10::context; T = String]'
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:1461:48:   required from here
      /home/buildbot/inst-fmt/include/fmt/base.h:1400:29: error: passing 'const fmt::v10::formatter<String>' as 'this' argument discards qualifiers [-fpermissive]
       1400 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
            |                    ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/buildbot/ppc64be-aix-71/build/mariadb-10.11.9/sql/item_strfunc.cc:1385:10: note:   in call to 'decltype (ctx.out()) fmt::v10::formatter<String>::format(String, FormatContext&) [with FormatContext = fmt::v10::context; decltype (ctx.out()) = fmt::v10::basic_appender<char>]'
       1385 |     auto format(String c, FormatContext& ctx) -> decltype(ctx.out()) {
            |          ^~~~~~
      make[2]: *** [sql/CMakeFiles/sql.dir/build.make:431: sql/CMakeFiles/sql.dir/item_strfunc.cc.o] Error 1
      

      $ b  --target sql
      [28/208] Building CXX object sql/CMakeFiles/sql.dir/item_strfunc.cc.o
      FAILED: sql/CMakeFiles/sql.dir/item_strfunc.cc.o 
      /usr/lib64/ccache/clang++ -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER -D_FILE_OFFSET_BITS=64 -I/home/dan/repos/mariadb-server-10.11/wsrep-lib/include -I/home/dan/repos/mariadb-server-10.11/wsrep-lib/wsrep-API/v26 -I/home/dan/repos/build-mariadb-server-10.11/include -I/home/dan/repos/mariadb-server-10.11/include/providers -I/home/dan/repos/mariadb-server-10.11/include -I/home/dan/repos/mariadb-server-10.11/sql -I/home/dan/repos/build-mariadb-server-10.11/sql -I/home/dan/repos/mariadb-server-10.11/tpool -I/home/dan/repos/inst-fmt/include -fstack-protector --param=ssp-buffer-size=4 -O2 -g -DNDEBUG -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wdeclaration-after-statement -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-init-self -Wno-null-conversion -Wno-unused-parameter -Wno-unused-private-field -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -std=gnu++11   -DHAVE_OPENSSL -DOPENSSL_API_COMPAT=0x10100000L -MD -MT sql/CMakeFiles/sql.dir/item_strfunc.cc.o -MF sql/CMakeFiles/sql.dir/item_strfunc.cc.o.d -o sql/CMakeFiles/sql.dir/item_strfunc.cc.o -c /home/dan/repos/mariadb-server-10.11/sql/item_strfunc.cc
      In file included from /home/dan/repos/mariadb-server-10.11/sql/item_strfunc.cc:61:
      In file included from /home/dan/repos/inst-fmt/include/fmt/format-inl.h:27:
      In file included from /home/dan/repos/inst-fmt/include/fmt/format.h:56:
      /home/dan/repos/inst-fmt/include/fmt/base.h:1400:23: error: no matching member function for call to 'format'
       1400 |     ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
            |                    ~~~^~~~~~
      /home/dan/repos/inst-fmt/include/fmt/base.h:1381:21: note: in instantiation of function template specialization 'fmt::detail::value<fmt::context>::format_custom_arg<String, fmt::formatter<String>>' requested here
       1381 |     custom.format = format_custom_arg<
            |                     ^
      /home/dan/repos/inst-fmt/include/fmt/base.h:1639:10: note: in instantiation of function template specialization 'fmt::detail::value<fmt::context>::value<String>' requested here
       1639 |   return {arg_mapper<Context>().map(val)};
            |          ^
      /home/dan/repos/inst-fmt/include/fmt/base.h:1646:16: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::context, String, 0>' requested here
       1646 |   arg.value_ = make_arg<true, Context>(val);
            |                ^
      /home/dan/repos/mariadb-server-10.11/sql/item_strfunc.cc:1461:35: note: in instantiation of function template specialization 'fmt::detail::make_arg<fmt::context, String>' requested here
       1461 |       vargs[carg-1]= fmt::detail::make_arg<ctx>(*parg);
            |                                   ^
      /home/dan/repos/mariadb-server-10.11/sql/item_strfunc.cc:1385:10: note: candidate function template not viable: 'this' argument has type 'const fmt::formatter<String>', but method is not marked const
       1385 |     auto format(String c, FormatContext& ctx) -> decltype(ctx.out()) {
            |          ^
      1 error generated.
      

      doesn't appear in the fmt-10.0.0 (fc39) or 10.2.1 (fc40)

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.