Fail to build cachelib due to fmt build failed
Describe the bug Fail to build Cachelib due to build fmt. error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization:
To Reproduce ./contrib/build.sh -j -T
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Centos Stream 8, X86_64
Additional context Add any other context about the problem here.
for external/fmt, previously the commit b90895412f46e18e5b17efdea2c8f79e7d7504b3, build works well. But the master branch build failed.
/assign
I fix fmt version 9.0.0. after resolve this problem.
@kevinzs2048: do you still see this issue?
Correct me if I'm wrong, but I think the "problem" originates in version 9.0.0 of fmt. This is because:
In order to make a type formattable via std::ostream you should provide a formatter specialization inherited from ostream_formatter
So, what I did (and it fixed the problem for me) for now was adding external_git_tag="8.1.1" to CacheLib/contrib/build-package.sh like this:
NAME=fmt
REPO=https://github.com/fmtlib/fmt.git
REPODIR=cachelib/external/$NAME
SRCDIR=$REPODIR
external_git_tag="8.1.1"
external_git_clone=yes
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
if test "$build_tests" = "yes" ; then
cmake_custom_params="$cmake_custom_params -DFMT_TEST=YES"
else
cmake_custom_params="$cmake_custom_params -DFMT_TEST=NO"
fi
;;