1f1c83
From 84b4c8fbff60f534ce14db050b321b8c7c62f7dd Mon Sep 17 00:00:00 2001
1f1c83
From: Kefu Chai <kchai@redhat.com>
1f1c83
Date: Fri, 23 Jul 2021 18:02:36 +0800
1f1c83
Subject: [PATCH 3/3] ceph.spec.in: build with header only fmt on RHEL
1f1c83
1f1c83
because fmt is packaged in EPEL, while librados is packaged
1f1c83
in RHEL, so we cannot have fmt as a runtime dependency of librados.
1f1c83
to address this issue, we should compile librados either with static library
1f1c83
or with header-only library of fmt. but because the fedora packaging
1f1c83
guideline does no encourage us to package static libraries, and it would
1f1c83
be complicated to package both static and dynamic library for fmt.
1f1c83
1f1c83
the simpler solution would be to compile Ceph with the header-only
1f1c83
version of fmt.
1f1c83
1f1c83
in this change, we compile ceph with the header-only version of fmt
1f1c83
on RHEL to address the runtime dependency issue.
1f1c83
1f1c83
Signed-off-by: Kefu Chai <kchai@redhat.com>
1f1c83
---
1f1c83
 ceph.spec.in | 3 +++
1f1c83
 1 file changed, 3 insertions(+)
1f1c83
1f1c83
diff --git a/ceph.spec.in b/ceph.spec.in
1f1c83
index 718421ca901..fd7ebe92d8b 100644
1f1c83
--- a/ceph.spec.in
1f1c83
+++ b/ceph.spec.in
1f1c83
@@ -1335,6 +1335,9 @@ ${CMAKE} .. \
1f1c83
     -DWITH_SYSTEM_PMDK:BOOL=ON \
1f1c83
 %endif
1f1c83
     -DBOOST_J=$CEPH_SMP_NCPUS \
1f1c83
+%if 0%{?rhel}
1f1c83
+    -DWITH_FMT_HEADER_ONLY:BOOL=ON \
1f1c83
+%endif
1f1c83
     -DWITH_GRAFANA=ON
1f1c83
 
1f1c83
 %if %{with cmake_verbose_logging}
1f1c83
-- 
1f1c83
2.31.1
1f1c83