facebook / CacheLib

Pluggable in-process caching engine to build and scale high performance services
https://www.cachelib.org
Apache License 2.0
1.18k stars 254 forks source link

Build is failing with error: ‘fmt::v10::detail::type_is_unformattable_for<const facebook::cachelib::navy::Status, char> _’ has incomplete type 1600 | type_is_unformattable_for<T, typename Context::char_type> _; | ^ #323

Open sairahul-chalamalasetti opened 2 months ago

sairahul-chalamalasetti commented 2 months ago

Describe the bug While building the cachelib with ./contrib/build.sh -j -T the build is failing with below error

error: ‘fmt::v10::detail::type_is_unformattablefor<const facebook::cachelib::navy::Status, char> ’ has incomplete type 1600 | type_is_unformattable_for<T, typename Context::chartype> ; | ^

To Reproduce Steps to reproduce the behavior: Clone the cachelib and run "./contrib/build.sh -j -T "

Expected behavior The build the failing with already defined above error

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Ubuntu 22:04.4 LTS Kernel: 6.9.0-060900-generic g++ version: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

fan982 commented 1 month ago

I have meet the same error, waiting for a solution.

tang-hi commented 1 month ago

Put the code below in cachelib/navy/common/Types.h. It works for me.

inline auto format_as(Status status) {
  return fmt::underlying(status);
}
sairahul-chalamalasetti commented 1 month ago

This fix helped to build on Kernel 6.9. Can this be merged to the repository ?

tang-hi commented 1 month ago

I will try to raise a PR to merge it into the repo later