Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error on Debian 12: mixing character types in fmt #2172

Open
ShamimShahraeini opened this issue Apr 7, 2024 · 2 comments
Open

Build Error on Debian 12: mixing character types in fmt #2172

ShamimShahraeini opened this issue Apr 7, 2024 · 2 comments

Comments

@ShamimShahraeini
Copy link

Issue Summary:
Encountering build errors while attempting to compile Folly on Debian 12, even after ensuring all dependencies are installed and trying different compiler versions. The error message indicates issues with mixing character types in fmt::v10 during compilation of IPAddress.cpp, IPAddressV4.cpp, and IPAddressV6.cpp.

Error Message:

/root/mc/install/include/fmt/base.h: In instantiation of ‘constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’:
/root/mc/install/include/fmt/base.h:2006:74:   required from ‘constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
/root/mc/install/include/fmt/format.h:4386:44:   required from ‘std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, folly::Range<const char*>&>]’
/root/mc/pkgs/folly/folly/IPAddress.cpp:102:20:   required from here
/root/mc/install/include/fmt/base.h:1598:17: error: static assertion failed: Mixing character types is disallowed.
 1598 |   static_assert(formattable_char, "Mixing character types is disallowed.");
      |                 ^~~~~~~~~~~~~~~~
/root/mc/install/include/fmt/base.h: In instantiation of ‘constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = const folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’:
/root/mc/install/include/fmt/base.h:2006:74:   required from ‘constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {const folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
/root/mc/install/include/fmt/format.h:4386:44:   required from ‘std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {const folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const folly::Range<const char*>&>]’
/root/mc/pkgs/folly/folly/IPAddress.cpp:113:57:   required from here
/root/mc/install/include/fmt/base.h:1598:17: error: static assertion failed: Mixing character types is disallowed.
In file included from /root/mc/install/include/fmt/format.h:54,
                 from /root/mc/pkgs/folly/folly/FBString.h:34,
                 from /root/mc/pkgs/folly/folly/IPAddressV4.h:34,
                 from /root/mc/pkgs/folly/folly/IPAddressV4.cpp:17:
/root/mc/install/include/fmt/base.h: In instantiation of ‘constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’:
/root/mc/install/include/fmt/base.h:2006:74:   required from ‘constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
/root/mc/install/include/fmt/format.h:4386:44:   required from ‘std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, folly::Range<const char*>&>]’
/root/mc/pkgs/folly/folly/IPAddressV4.cpp:73:64:   required from here
/root/mc/install/include/fmt/base.h:1598:17: error: static assertion failed: Mixing character types is disallowed.
 1598 |   static_assert(formattable_char, "Mixing character types is disallowed.");
      |                 ^~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/folly_base.dir/build.make:245: CMakeFiles/folly_base.dir/IPAddress.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/folly_base.dir/build.make:258: CMakeFiles/folly_base.dir/IPAddressV4.cpp.o] Error 1
In file included from /root/mc/install/include/fmt/format.h:54,
                 from /root/mc/pkgs/folly/folly/FBString.h:34,
                 from /root/mc/pkgs/folly/folly/IPAddressV6.h:37,
                 from /root/mc/pkgs/folly/folly/IPAddressV6.cpp:17:
/root/mc/install/include/fmt/base.h: In instantiation of ‘constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]’:
/root/mc/install/include/fmt/base.h:2006:74:   required from ‘constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]’
/root/mc/install/include/fmt/format.h:4386:44:   required from ‘std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, folly::Range<const char*>&>]’
/root/mc/pkgs/folly/folly/IPAddressV6.cpp:216:53:   required from here
/root/mc/install/include/fmt/base.h:1598:17: error: static assertion failed: Mixing character types is disallowed.
 1598 |   static_assert(formattable_char, "Mixing character types is disallowed.");
      |                 ^~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/folly_base.dir/build.make:271: CMakeFiles/folly_base.dir/IPAddressV6.cpp.o] Error 1

Steps to Reproduce:

  • Try to install mcrouter and as it depends on Folly, it tries to build and install it
    or:
  • Clone Folly repository.
  • Configure build environment on Debian 12.
  • Run build command (cmake, make).
  • Observe error during compilation.

Expected Behavior:
Folly compiles successfully without encountering errors.

Attempts to Resolve:

  • Ensured all dependencies are installed.
  • Tried different tag versions of Folly.
  • Attempted to use different versions of gcc/g++ (9, 11, 12, 13).
  • Tested on Ubuntu 20.04.

Question:
What am I missing? What could be causing the mixing character types error during compilation of Folly on Debian 12, and how can this issue be resolved?

Any insights or suggestions would be greatly appreciated. Thank you!

@zhangzq
Copy link

zhangzq commented Apr 30, 2024

I has the same problem, with latest fmt library and ubuntu 24.04.

@zhangzq
Copy link

zhangzq commented Apr 30, 2024

I degrade the fmt library from 10.2 to 10.1, everything go well now.

so folly not compatitable the newest 10.2 fmt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants