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

build error with Fedora33 #107

Closed
gaowayne opened this issue Jan 1, 2022 · 6 comments
Closed

build error with Fedora33 #107

gaowayne opened this issue Jan 1, 2022 · 6 comments

Comments

@gaowayne
Copy link

gaowayne commented Jan 1, 2022

Describe the bug
A clear and concise description of what the bug is.
build error after follow cachelib steps

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
/root/wayne/cachelib/CacheLib/cachelib/../cachelib/cachebench/cache/ItemRecords.h:80:7:   required from ‘bool facebook::cachelib::cachebench::ItemRecords<Allocator>::validate(const DestructorData&) [with Allocator = facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>; facebook::cachelib::cachebench::ItemRecords<Allocator>::DestructorData = facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>::DestructorData]’
/root/wayne/cachelib/CacheLib/cachelib/../cachelib/cachebench/cache/Cache-inl.h:105:33:   required from ‘facebook::cachelib::cachebench::Cache<Allocator>::Cache(const facebook::cachelib::cachebench::CacheConfig&, facebook::cachelib::cachebench::Cache<Allocator>::ChainedItemMovingSync, std::string) [with Allocator = facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>; facebook::cachelib::cachebench::Cache<Allocator>::ChainedItemMovingSync = std::function<std::unique_ptr<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>::SyncObj, std::default_delete<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>::SyncObj> >(facebook::cachelib::KAllocation::Key)>; std::string = std::__cxx11::basic_string<char>]’
/usr/include/c++/10/bits/unique_ptr.h:962:30:   required from ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = facebook::cachelib::cachebench::Cache<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait> >; _Args = {facebook::cachelib::cachebench::CacheConfig&, std::function<std::unique_ptr<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>::SyncObj, std::default_delete<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>::SyncObj> >(facebook::cachelib::KAllocation::Key)>&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<facebook::cachelib::cachebench::Cache<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait> > >]’
/root/wayne/cachelib/CacheLib/cachelib/../cachelib/cachebench/runner/CacheStressor.h:96:38:   required from ‘facebook::cachelib::cachebench::CacheStressor<Allocator>::CacheStressor(facebook::cachelib::cachebench::CacheConfig, facebook::cachelib::cachebench::StressorConfig, std::unique_ptr<facebook::cachelib::cachebench::GeneratorBase>&&) [with Allocator = facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait>]’
/usr/include/c++/10/bits/unique_ptr.h:962:30:   required from ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = facebook::cachelib::cachebench::CacheStressor<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait> >; _Args = {const facebook::cachelib::cachebench::CacheConfig&, const facebook::cachelib::cachebench::StressorConfig&, std::unique_ptr<facebook::cachelib::cachebench::GeneratorBase, std::default_delete<facebook::cachelib::cachebench::GeneratorBase> >}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<facebook::cachelib::cachebench::CacheStressor<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait> >, std::default_delete<facebook::cachelib::cachebench::CacheStressor<facebook::cachelib::CacheAllocator<facebook::cachelib::LruCacheTrait> > > >’
/root/wayne/cachelib/CacheLib/cachelib/cachebench/runner/Stressor.cpp:166:60:   required from here
/root/wayne/cachelib/CacheLib/opt/cachelib/include/fmt/core.h:1715:7: 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
 1715 |       formattable,
      |       ^~~~~~~~~~~
make[2]: *** [cachebench/CMakeFiles/cachelib_cachebench.dir/build.make:173: cachebench/CMakeFiles/cachelib_cachebench.dir/runner/IntegrationStressor.cpp.o] Error 1
make[2]: *** [cachebench/CMakeFiles/cachelib_cachebench.dir/build.make:212: cachebench/CMakeFiles/cachelib_cachebench.dir/runner/Stressor.cpp.o] Error 1
make[2]: Leaving directory '/root/wayne/cachelib/CacheLib/build-cachelib'
make[1]: *** [CMakeFiles/Makefile2:698: cachebench/CMakeFiles/cachelib_cachebench.dir/all] Error 2
make[1]: Leaving directory '/root/wayne/cachelib/CacheLib/build-cachelib'
make: *** [Makefile:149: all] Error 2
build-package.sh: error: make failed
build.sh: error: failed to build cachelib
root@smfast:~/wayne/cachelib/CacheLib# 

Expected behavior
A clear and concise description of what you expected to happen.
no build error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]fedora33 server
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@jiayuebao
Copy link
Contributor

@gaowayne CacheLib doesn't support Fedora yet. CentOS 8, Ubuntu 18.04, 20.04, and Debian 10, 11 are the supported platforms (see Build Script). Could you try out CacheLib on these supported platforms?

@agordon
Copy link
Contributor

agordon commented Jan 4, 2022

Hi @jiayuebao @gaowayne - there is some support for Fedora but only tested with version 34.
As a quick check, can you try to run sudo ./contrib/prerequisites-fedora34.sh and see if it is able to install all the required packages ?

@1a1a11a
Copy link

1a1a11a commented Jan 4, 2022

I believe this is caused by a new commit in fmt, and can be fixed by using an earlier version of fmt

@agordon
Copy link
Contributor

agordon commented Jan 4, 2022

@1a1a11a - thanks, I'm checking this.

@gaowayne
Copy link
Author

gaowayne commented Jan 6, 2022

Hi @jiayuebao @gaowayne - there is some support for Fedora but only tested with version 34. As a quick check, can you try to run sudo ./contrib/prerequisites-fedora34.sh and see if it is able to install all the required packages ?

Yes, I already fixed this. :) just change fedora34 into fedora33 in the build.sh, if PRC network is OK, I can download all packages build and debug cachelib now. 👍
for above build issue, I checkout fmt code release version 8.0.1, then everything is OK. do not use fmt main branch, it break things

@erangi
Copy link

erangi commented Jan 6, 2022

FWIW, I experienced this issue when building on Ubuntu 20 now. Changing the fmt version as suggested above fixed the issue.

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

6 participants