[Bug 240148] devel/spdlog: unbundle fmtlib or update to 6.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Aug 27 14:34:01 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240148

            Bug ID: 240148
           Summary: devel/spdlog: unbundle fmtlib or update to 6.0.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: vanilla at FreeBSD.org
          Reporter: jbeich at FreeBSD.org
            Blocks: 240141
          Assignee: vanilla at FreeBSD.org
             Flags: maintainer-feedback?(vanilla at FreeBSD.org)

spdlog is currently built against bundled fmt 5.3.0. If both fmt and spdlog are
used at the same time but fmt version is different the following may happen:

$ cat a.cc
#include <spdlog/spdlog.h>
#include <fmt/chrono.h>
int main() {}

$ c++ a.cc $(pkg-config --cflags --libs fmt spdlog)
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:12:
/usr/local/include/fmt/locale.h:19:35: error: parameter type
'fmt::v5::internal::buffer'
      (aka 'basic_buffer<char>') is an abstract class
    const std::locale& loc, buffer<Char>& buf,
                                  ^
/usr/local/include/spdlog/fmt/bundled/core.h:238:16: note: unimplemented pure
virtual method 'grow' in
      'basic_buffer'
  virtual void grow(std::size_t capacity) = 0;
               ^
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:12:
/usr/local/include/fmt/locale.h:19:35: error: expected ')'
    const std::locale& loc, buffer<Char>& buf,
                                  ^
/usr/local/include/fmt/locale.h:18:51: note: to match this '('
typename buffer_context<Char>::iterator vformat_to(
                                                  ^
/usr/local/include/fmt/locale.h:22:17: error: no template named 'buffer_range'
  using range = buffer_range<Char>;
                ^
/usr/local/include/fmt/locale.h:23:35: error: use of undeclared identifier
'range'
  return vformat_to<arg_formatter<range>>(buf, to_string_view(format_str),
args,
                                  ^
/usr/local/include/fmt/locale.h:24:69: error: expected a type
                                          internal::locale_ref(loc));
                                                                    ^
/usr/local/include/fmt/locale.h:49:18: error: no template named
'make_args_checked' in namespace
      'fmt::v5::internal'; did you mean 'make_checked'?
      {internal::make_args_checked<Args...>(format_str, args...)});
       ~~~~~~~~~~^~~~~~~~~~~~~~~~~
                 make_checked
/usr/local/include/spdlog/fmt/bundled/format.h:389:11: note: 'make_checked'
declared here
inline T *make_checked(T *p, std::size_t) { return p; }
          ^
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:12:
/usr/local/include/fmt/locale.h:53:27: error: no template named 'enable_if_t';
did you mean 'std::enable_if_t'?
          typename Char = enable_if_t<
                          ^~~~~~~~~~~
                          std::enable_if_t
/usr/include/c++/v1/type_traits:444:39: note: 'std::enable_if_t' declared here
template <bool _Bp, class _Tp = void> using enable_if_t = typename
enable_if<_Bp, _Tp>::type;
                                      ^
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:12:
/usr/local/include/fmt/locale.h:58:17: error: no template named 'output_range'
in namespace 'fmt::v5::internal';
      did you mean simply 'output_range'?
  using range = internal::output_range<OutputIt, Char>;
                ^~~~~~~~~~~~~~~~~~~~~~
                output_range
/usr/local/include/spdlog/fmt/bundled/format.h:333:7: note: 'output_range'
declared here
class output_range {
      ^
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:12:
/usr/local/include/fmt/locale.h:64:25: error: missing 'typename' prior to
dependent type name
      'internal::is_output_iterator<OutputIt>::value'
          FMT_ENABLE_IF(internal::is_output_iterator<OutputIt>::value&&
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        typename
/usr/local/include/fmt/locale.h:65:53: error: parameter declarator cannot be
qualified
                            internal::is_string<S>::value)>
                            ~~~~~~~~~~~~~~~~~~~~~~~~^
/usr/local/include/fmt/locale.h:65:59: error: expected template parameter
                            internal::is_string<S>::value)>
                                                          ^
In file included from a.cc:2:
In file included from /usr/local/include/fmt/chrono.h:25:
/usr/local/include/fmt/safe-duration-cast.h:24:25: error: expected parameter
declarator
          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
                        ^
/usr/local/include/fmt/safe-duration-cast.h:24:25: error: expected ')'
/usr/local/include/fmt/safe-duration-cast.h:24:24: note: to match this '('
          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
                       ^
/usr/local/include/fmt/safe-duration-cast.h:26:64: error: expected template
parameter
                            std::numeric_limits<To>::is_signed)>
                                                               ^
/usr/local/include/fmt/safe-duration-cast.h:53:25: error: expected parameter
declarator
          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
                        ^
/usr/local/include/fmt/safe-duration-cast.h:53:25: error: expected ')'
/usr/local/include/fmt/safe-duration-cast.h:53:24: note: to match this '('
          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
                       ^
/usr/local/include/fmt/safe-duration-cast.h:55:64: error: expected template
parameter
                            std::numeric_limits<To>::is_signed)>
                                                               ^
/usr/local/include/fmt/safe-duration-cast.h:56:18: error: redefinition of
'lossless_integral_conversion'
FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
                 ^
/usr/local/include/fmt/safe-duration-cast.h:27:18: note: previous definition is
here
FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
                 ^
/usr/local/include/fmt/safe-duration-cast.h:102:11: error: unknown type name
'FMT_ENABLE_IF'
          FMT_ENABLE_IF(std::is_same<From, To>::value)>
          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240141
[Bug 240141] devel/libfmt: Update to 6.0.0
-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list