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

Fail to build cachelib due to fmt build failed #186

Open
kevinzs2048 opened this issue Jan 13, 2023 · 5 comments
Open

Fail to build cachelib due to fmt build failed #186

kevinzs2048 opened this issue Jan 13, 2023 · 5 comments

Comments

@kevinzs2048
Copy link

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 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
Copy link
Author

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

@kevinzs2048
Copy link
Author

/assign

@KYUNGSOO-LEE
Copy link

I fix fmt version 9.0.0. after resolve this problem.

@therealgymmy
Copy link
Contributor

@kevinzs2048: do you still see this issue?

@vaavaav
Copy link

vaavaav commented Feb 2, 2023

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

wonglkd added a commit to wonglkd/CacheLib-1 that referenced this issue Feb 22, 2023
Change build script to pin fmt version at same version that folly uses to minimize future breaks.

_Context:_ OSS build broke between 3-5 Jan 2023, likely due to changes in folly. While switching to v9.1.0 or 9.0.0 fixes the issue at hand, it seems sensible to match folly, which specifies fmt v8.0.1: https://github.com/facebook/folly/blob/main/build/fbcode_builder/manifests/fmt

Changed it on a fresh clone of CacheLib and got it to build. (Also had to change `external_git_branch=dev` for zstd to deal with the cmake/zstd issue in facebook#194, but that should resolve when gets merged into release)

> facebook#62 @agordon: For the other packages, you'll notice we do use a specific git tag or branch… I notice `fmt` is an exception - not pinned to a specific git tag or revision - likely an omission that can be fixed.

Related CacheLib issues: facebook#186, facebook#189, facebook#107, facebook#97, facebook#62
Related CacheLib commit: 67cc11a

Last working (Jan 3): https://github.com/facebook/CacheLib/actions/runs/3826992478
First failed (Jan 5): https://github.com/facebook/CacheLib/actions/runs/3844002307/jobs/6546742348
```error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt```
facebook-github-bot pushed a commit that referenced this issue Feb 24, 2023
Summary:
Change build script to pin fmt version to same as folly's to minimize future breaks.

Pull Request resolved: #196

Test Plan:
Built successfully on a fresh clone of CacheLib. (Also had to change `external_git_branch=dev` for zstd to deal with the cmake/zstd issue in #194, but that should resolve when gets merged into release)

**Context:** OSS build broke between 3-5 Jan 2023, likely due to changes in folly. While switching to v9.1.0 or 9.0.0 fixes the issue at hand, it seems sensible to match folly, which specifies fmt v8.0.1: https://github.com/facebook/folly/blob/main/build/fbcode_builder/manifests/fmt

> #62 agordon: For the other packages, you'll notice we do use a specific git tag or branch… I notice `fmt` is an exception - not pinned to a specific git tag or revision - likely an omission that can be fixed.

Related CacheLib issues: #186, #189, #107, #97, #62
Possibly related CacheLib commit: 67cc11a

Last working (Jan 3): https://github.com/facebook/CacheLib/actions/runs/3826992478
First failed (Jan 5): https://github.com/facebook/CacheLib/actions/runs/3844002307/jobs/6546742348
Error: `error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt`

Reviewed By: therealgymmy

Differential Revision: D43517927

Pulled By: jiayuebao

fbshipit-source-id: 2d28791f7804d862b646263b96b10b835f843d8c
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

4 participants