]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: s/%cmake/cmake/ 39590/head
authorKefu Chai <kchai@redhat.com>
Sat, 20 Feb 2021 03:43:21 +0000 (11:43 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 20 Feb 2021 03:43:30 +0000 (11:43 +0800)
this change partially reverts da7030db79c5dbd480040eb249a76638caf52707
which use %cmake rpm macro in the place of "cmake". but

%cmake sets BUILD_SHARED_LIBS=ON. so quite a few internal libraries
defined using add_library() are now compiled into shared libraries which
are not installed or packagesd. when we are installing the rpm packages
compiled with this option, rpm compiles because the linked libraries are
missing, for instance, `libgmock.so.1.10.0` was compiled as a static
library before da7030db79c5dbd480040eb249a76638caf52707, and was
included by the test executables. but after that change it's compiled
as a shared library.

so we need to either package the linked shared libraries or just link
against them statically. at this moment, the latter approach is simpler,
albeit larger size of exectuable and dbg symbols.

Fixes: https://tracker.ceph.com/issues/49395
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in

index f9516fc2de765c01189aa87d9b100af415051099..c813681971b524850598b583f41cdfb26908303a 100644 (file)
@@ -1214,7 +1214,8 @@ env | sort
 
 mkdir build
 cd build
-%cmake .. \
+cmake .. \
+    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
     -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
     -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \
     -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \