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 fails on i386 (with FMT_USE_INT128=0) #2829

Closed
jwt27 opened this issue Mar 23, 2022 · 1 comment
Closed

Build fails on i386 (with FMT_USE_INT128=0) #2829

jwt27 opened this issue Mar 23, 2022 · 1 comment

Comments

@jwt27
Copy link

jwt27 commented Mar 23, 2022

The library currently does not compile on i386 due to:

In file included from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format-inl.h: In instantiation of 'bool fmt::v8::detail::basic_fp<F>::assign(Float) [with Float = long double; F = fmt::v8::detail::uint128_fallback]':
/home/jw/fmt/include/fmt/format-inl.h:216:69:   required from 'fmt::v8::detail::basic_fp<F>::basic_fp(Float) [with Float = long double; F = fmt::v8::detail::uint128_fallback]'
/home/jw/fmt/include/fmt/format-inl.h:2212:20:   required from 'int fmt::v8::detail::format_float(T, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&) [with T = long double]'
/home/jw/fmt/src/format.cc:92:64:   required from here
/home/jw/fmt/include/fmt/format-inl.h:228:51: error: call to non-'constexpr' function 'fmt::v8::detail::uint128_fallback fmt::v8::detail::uint128_fallback::operator<<(int) const'
  228 |     constexpr auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
      |                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jw/fmt/include/fmt/format-inl.h:29,
                 from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format.h:360:22: note: 'fmt::v8::detail::uint128_fallback fmt::v8::detail::uint128_fallback::operator<<(int) const' declared here
  360 |   FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
      |                      ^~~~~~~~
In file included from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format-inl.h:229:52: error: call to non-'constexpr' function 'fmt::v8::detail::uint128_fallback fmt::v8::detail::operator-(const fmt::v8::detail::uint128_fallback&, uint64_t)'
  229 |     constexpr auto significand_mask = implicit_bit - 1;
      |                                       ~~~~~~~~~~~~~^~~
In file included from /home/jw/fmt/include/fmt/format-inl.h:29,
                 from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format.h:351:15: note: 'fmt::v8::detail::uint128_fallback fmt::v8::detail::operator-(const fmt::v8::detail::uint128_fallback&, uint64_t)' declared here
  351 |   friend auto operator-(const uint128_fallback& lhs, uint64_t rhs)
      |               ^~~~~~~~
In file included from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format-inl.h:238:9: error: no match for 'operator+=' (operand types are 'fmt::v8::detail::uint128_fallback' and 'fmt::v8::detail::uint128_fallback')
  238 |       f += static_cast<F>(implicit_bit);
      |       ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jw/fmt/include/fmt/format-inl.h:29,
                 from /home/jw/fmt/src/format.cc:8:
/home/jw/fmt/include/fmt/format.h:367:22: note: candidate: 'void fmt::v8::detail::uint128_fallback::operator+=(uint64_t)'
  367 |   FMT_CONSTEXPR void operator+=(uint64_t n) {
      |                      ^~~~~~~~
/home/jw/fmt/include/fmt/format.h:367:42: note:   no known conversion for argument 1 from 'fmt::v8::detail::uint128_fallback' to 'uint64_t' {aka 'long long unsigned int'}
  367 |   FMT_CONSTEXPR void operator+=(uint64_t n) {
      |                                 ~~~~~~~~~^

This is caused by commit db74598.

@vitaut
Copy link
Contributor

vitaut commented Mar 24, 2022

Should be fixed in 17dda58. Thanks for reporting.

@vitaut vitaut closed this as completed Mar 24, 2022
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