cmake: ensure fmt lib is at least 8.1.1#48705
Conversation
3885b7a to
0c792ef
Compare
|
There is ceph.spec.in also where we set fmt-devel >= 6.3.1, I suppose this can also be changed? But not so sure if many distros package such a newer version. |
Let's update ceph.spec.in as well since we already introduced fmtlib 8.1 features. @ronen-fr |
So tried this on my centos8 box and here since we don't have system packages of fmtlib > 8.1.1 the install-deps step fails. Don't know what the current distro support matrix is for master (I see fc36 packages newer version), but since we do use fmt as a submodule and anyway can build regardless of system packages don't know whether it is worth failing install-deps. Happy to update |
|
I ran into this issue now. This will fix compilation, but my question is whether the original usage of |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
From core PR scrub: @ktdreyer would you mind taking a look? It seems this PR pokes with packages we need to install. |
|
I'm sorry, I cannot review this PR now with my other priorities |
ktdreyer
left a comment
There was a problem hiding this comment.
I've made time to look at this today, since I've hit this build failure myself.
../src/osd/scrubber/osd_scrub_sched.cc:552:24: error: ‘group_digits’ is not a member of ‘fmt’
fmt::group_digits(conf()->osd_scrub_max_interval),
On RHEL 8:
- fmt is in EPEL 8,
fmt-6.2.1-1.el8 - In an el8 build:
-DWITH_FMT_HEADER_ONLY:BOOL=ONleads toCould not find fmt, will build it
On RHEL 9:
- fmt is in EPEL 9,
fmt-8.1.1-5.el9 - In an el9 build,
-DWITH_FMT_HEADER_ONLY:BOOL=ONuses the system package, though CMake'sfind_package()does not print the version it successfully found (maybe theQUIEToption hides that success output?)
I'm good with merging this and backporting to reef.
Separately, I do think the version mis-match in ceph.spec.in is confusing (7.0.0 and 8.1.1 here in CMake vs 6.2.1 in ceph.spec.in). If we bump that number in the RPM packaging, though, then we'll fail to build on el8, since EPEL 8 will no longer be able to satisfy that. My recommendation (separate PR!) is:
- Set
BuildRequires: fmt-devel >= 8.1.1behind a conditional so it takes effect only on Fedora and RHEL 9+, not on RHEL 8 - Better yet, drop el8 altogether for
main
I'm wholeheartedly for that. |
|
@ronen-fr Do you mind giving your approval on this PR so we can merge it to |
|
@theanalyst could you rebase this onto the latest |
yeah, It is really confusing.
Why not always building the fmt? |
i think the idea is to respect the philosophy of how the downstream distributions are structured. in general, package maintainers are encouraged to reuse the the shared libraries and facilities shipped along with the distribution instead of vendering by the packages themselves. have you imagined a distribution full of with packages each of which embeds their own libc? the same applies to other 3rd party libraries like fmtlib. there are more reasons for sure, among other things, like better maintainability like a bug in shared library can be fixed right away, without requiring "make world". |
|
Right @tchaikov . Also, pre-built packages lower Ceph's build times. |
Since we depend on newer api features like `group_digits` ensure that the system version of fmt we use is at least as new as the submodules we bring. Signed-off-by: Abhishek Lekshmanan <abhishek.l@cern.ch>
d3556f7 to
eead42d
Compare
done! |
|
jenkins test make check |
|
jenkins test make check |
idryomov
left a comment
There was a problem hiding this comment.
I went ahead and merged since this has been pending for months. Highlighting Ken's recommendation:
Separately, I do think the version mis-match in
ceph.spec.inis confusing (7.0.0and8.1.1here in CMake vs6.2.1inceph.spec.in). If we bump that number in the RPM packaging, though, then we'll fail to build on el8, since EPEL 8 will no longer be able to satisfy that. My recommendation (separate PR!) is:
Set
BuildRequires: fmt-devel >= 8.1.1behind a conditional so it takes effect only on Fedora and RHEL 9+, not on RHEL 8
|
Opened a reef backport since |
Since we depend on newer api features like
group_digitsensure that the system version of fmt we use is at least as new as the submodules we bring.Signed-Off-By: Abhishek Lekshmanan abhishek.l@cern.ch
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows