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

_umul128 was not declared error when building Boost library #210

Closed
vejbomar opened this issue Oct 16, 2024 · 3 comments
Closed

_umul128 was not declared error when building Boost library #210

vejbomar opened this issue Oct 16, 2024 · 3 comments
Assignees

Comments

@vejbomar
Copy link
Member

When building Boost library with either x86_64-pc-linux-gnu -> aarch64-w64-mingw32 or aarch64-pc-linux-gnu -> aarch64-w64-mingw32 toolchain I got the following errors about missing _umul128 from json and charconv modules.

json module

In file included from ./boost/json/detail/charconv/detail/fast_float/fast_float.hpp:11,
                 from ./boost/json/detail/charconv/impl/from_chars.ipp:14,
                 from ./boost/json/src.hpp:58,
                 from /home/vejby/boost-build-19-full/libs/json/src/src.cpp:10:
./boost/json/detail/charconv/detail/fast_float/float_common.hpp: In function ‘boost::json::detail::charconv::detail::fast_float::value128 boost::json::detail::charconv::detail::fast_float::full_multiplication(uint64_t, uint64_t)’:
./boost/json/detail/charconv/detail/fast_float/float_common.hpp:212:16: error: ‘_umul128’ was not declared in this scope
  212 |   answer.low = _umul128(a, b, &high); // _umul128 not available on ARM64
      |                ^~~~~~~~

charconv module

In file included from ./boost/charconv/detail/fast_float/fast_float.hpp:11,
                 from libs/charconv/build/../src/from_chars.cpp:16:
./boost/charconv/detail/fast_float/float_common.hpp: In function ‘boost::charconv::detail::fast_float::value128 boost::charconv::detail::fast_float::full_multiplication(uint64_t, uint64_t)’:
./boost/charconv/detail/fast_float/float_common.hpp:254:16: error: ‘_umul128’ was not declared in this scope; did you mean ‘umul128’?
  254 |   answer.low = _umul128(a, b, &high); // _umul128 not available on ARM64
      |                ^~~~~~~~
      |                umul128

The code seems to come originally from fast_float library https://github.com/fastfloat/fast_float/blob/4266c34620b3120718d8d631c354ba22e9607b36/include/fast_float/float_common.h#L348 and there're multiple versions of the function, so I think the problem is just that the wrong version is selected for arm64 + win + mingw combination.

@eukarpov
Copy link
Member

please apply a fix in a similar way to how it was done here
fastfloat/fast_float#269

@vejbomar
Copy link
Member Author

PR with fix accepted in Boost.charconv: boostorg/charconv#230

Created similar PR in Boost.JSON: boostorg/json#1057

@vejbomar vejbomar self-assigned this Oct 22, 2024
@vejbomar
Copy link
Member Author

Both PRs were accepted and merged into develop branches of charconv and JSON modules, so the fixes should be available in the next Boost release.

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