Skip to content

[Build] Build failure with fmt 11 for version 3.9.0 #3596

Description

@carlocab

Building ArrayFire with fmt 11.0.2 fails.

Description

Attempting to build ArrayFire 3.9.0 with fmt 11.0.2 fails. The CMake configuration is the same as in #3595.

Error Log

There seem to be two types of errors.

Missing #include?
  /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/opencl/compile_module.cpp:214:19: error: no member named 'join' in namespace 'fmt'
               fmt::join(options, " "),
               ~~~~~^
  /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/Logger.hpp:68:58: note: expanded from macro 'AF_TRACE'
                         ":" AF_STR_HELPER(__LINE__) " ] " __VA_ARGS__)
                                                           ^~~~~~~~~~~
  1 error generated.

https://github.com/Homebrew/homebrew-core/actions/runs/10618004937/job/29432344606?pr=182828#step:3:2641

Bad Function Signature
  In file included from /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/DependencyModule.cpp:10:
  In file included from /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/ArrayFireTypesIO.hpp:12:
  In file included from /opt/homebrew/include/spdlog/fmt/ostr.h:21:
  In file included from /opt/homebrew/include/fmt/ostream.h:23:
  In file included from /opt/homebrew/include/fmt/chrono.h:23:
  In file included from /opt/homebrew/include/fmt/format.h:41:
  /opt/homebrew/include/fmt/base.h:1402:23: error: no matching member function for call to 'format'
      ctx.advance_to(cf.format(*static_cast<qualified_type*>(arg), ctx));
                     ~~~^~~~~~
  /opt/homebrew/include/fmt/base.h:1383:21: note: in instantiation of function template specialization 'fmt::detail::value<fmt::context>::format_custom_arg<arrayfire::common::Version, fmt::formatter<arrayfire::common::Version>>' requested here
      custom.format = format_custom_arg<
                      ^
  /opt/homebrew/include/fmt/base.h:1647:10: note: in instantiation of function template specialization 'fmt::detail::value<fmt::context>::value<arrayfire::common::Version>' requested here
    return {arg_mapper<Context>().map(val)};
           ^
  /opt/homebrew/include/spdlog/logger.h:80:9: note: in instantiation of function template specialization 'spdlog::logger::log_<std::string &, arrayfire::common::Version &>' requested here
          log_(loc, lvl, details::to_string_view(fmt), std::forward<Args>(args)...);
          ^
  /opt/homebrew/include/spdlog/logger.h:85:9: note: in instantiation of function template specialization 'spdlog::logger::log<std::string &, arrayfire::common::Version &>' requested here
          log(source_loc{}, lvl, fmt, std::forward<Args>(args)...);
          ^
  /opt/homebrew/include/spdlog/logger.h:130:9: note: in instantiation of function template specialization 'spdlog::logger::log<std::string &, arrayfire::common::Version &>' requested here
          log(level::trace, fmt, std::forward<Args>(args)...);
          ^
  /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/DependencyModule.cpp:137:33: note: in instantiation of function template specialization 'spdlog::logger::trace<std::string &, arrayfire::common::Version &>' requested here
                                  AF_TRACE("Found: {}({})", fileName, version);
                                  ^
  /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/Logger.hpp:67:18: note: expanded from macro 'AF_TRACE'
      getLogger()->trace("[ " __FILE__ \
                   ^
  /tmp/arrayfire-20240829-12034-t794xk/arrayfire-full-v3.9.0/src/backend/common/ArrayFireTypesIO.hpp:76:10: note: candidate function template not viable: 'this' argument has type 'const fmt::formatter<arrayfire::common::Version>', but method is not marked const
      auto format(const arrayfire::common::Version& ver, FormatContext& ctx)
           ^
  1 error generated.

https://github.com/Homebrew/homebrew-core/actions/runs/10618004937/job/29432344606?pr=182828#step:3:3152

Complete logs are available here.

Build Environment

The same as in #3595.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions