Skip to content

cmake, ceph.spec.in: build with header only fmt on RHEL - #42464

Merged
tchaikov merged 3 commits into
ceph:masterfrom
tchaikov:wip-header-only-fmt
Jul 24, 2021
Merged

tchaikov merged 3 commits into
ceph:masterfrom
tchaikov:wip-header-only-fmt

Conversation

@tchaikov

Copy link
Copy Markdown
Contributor

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@tchaikov
tchaikov requested a review from jdurgin July 23, 2021 10:09
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch 2 times, most recently from 11fe5c7 to b11d275 Compare July 23, 2021 11:38
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch from b11d275 to 22fd282 Compare July 23, 2021 11:41
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch from 22fd282 to 8d29481 Compare July 23, 2021 11:46
@tchaikov

Copy link
Copy Markdown
Contributor Author

@tchaikov
tchaikov removed the request for review from jdurgin July 23, 2021 14:48
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch from 8d29481 to 096785b Compare July 23, 2021 16:20
so the linkage of fmt::fmt does not spill out to other compilation
units.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch 4 times, most recently from 0eabcfd to e6dd6eb Compare July 23, 2021 18:20
tchaikov added 2 commits July 24, 2021 02:26
in this change:

* an interface library named "fmt-header-only" is introduced. it brings
  the support to the header only fmt library.
* fmt::fmt is renamed to fmt
* an option named "WITH_FMT_HEADER_ONLY" is introduced
* fmt::fmt is an alias of "fmt-header-only" if "WITH_FMT_HEADER_ONLY"
  is "ON", and an alias of "fmt" otherwise.

because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue an option "WITH_FMT_HEADER_ONLY" is introduced, so
that we can enable it when building Ceph with the header version of fmt.
and the built packages won't have runtime dependency of fmt.

Signed-off-by: Kefu Chai <[email protected]>
because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue, we should compile librados either with static library
or with header-only library of fmt. but because the fedora packaging
guideline does no encourage us to package static libraries, and it would
be complicated to package both static and dynamic library for fmt.

the simpler solution would be to compile Ceph with the header-only
version of fmt.

in this change, we compile ceph with the header-only version of fmt
on RHEL to address the runtime dependency issue.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-header-only-fmt branch from e6dd6eb to 5419131 Compare July 23, 2021 18:26
@tchaikov

tchaikov commented Jul 24, 2021 •

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants