CacheLib icon indicating copy to clipboard operation
CacheLib copied to clipboard

Fail to build cachelib due to fmt build failed

Open kevinzs2048 opened this issue 3 years ago • 5 comments

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.

kevinzs2048 avatar Jan 13 '23 02:01 kevinzs2048

for external/fmt, previously the commit b90895412f46e18e5b17efdea2c8f79e7d7504b3, build works well. But the master branch build failed.

kevinzs2048 avatar Jan 13 '23 02:01 kevinzs2048

/assign

kevinzs2048 avatar Jan 13 '23 02:01 kevinzs2048

I fix fmt version 9.0.0. after resolve this problem.

KYUNGSOO-LEE avatar Jan 18 '23 06:01 KYUNGSOO-LEE

@kevinzs2048: do you still see this issue?

therealgymmy avatar Jan 25 '23 22:01 therealgymmy

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
    ;;

vaavaav avatar Feb 02 '23 15:02 vaavaav