Bug #36618
closedluminous 12.2.9 doesn't build on Fedora 32-bit arch
0%
Description
see https://kojipkgs.fedoraproject.org//work/tasks/1474/30541474/build.log
/builddir/build/BUILD/ceph-12.2.9/src/osd/PrimaryLogPG.cc: In member function 'virtual void PrimaryLogPG::calc_trim_to()':
/builddir/build/BUILD/ceph-12.2.9/src/osd/PrimaryLogPG.cc:1590:38: error: no matching function for call to 'min(size_t, uint64_t&)'
cct->_conf->osd_pg_log_trim_max);
suggested fix:
--- ceph-12.2.9/src/osd/PrimaryLogPG.cc.orig 2018-10-29 09:12:57.766116270 0400 size_t num_to_trim = std::min(pg_log.get_log().approx_size() - target,
++ ceph-12.2.9/src/osd/PrimaryLogPG.cc 2018-10-29 09:32:37.146116270 -0400@ -20,6 +20,7
@
#include "PG.h"
#include "PrimaryLogPG.h"
#include "OSD.h"
#include <algorithm>
#include "OpRequest.h"
#include "ScrubStore.h"
#include "Session.h" @ -1586,7 +1587,7
@
pg_log.get_log().approx_size() > target) {
dout(10) << func << " approx pg log length = "
<< pg_log.get_log().approx_size() << dendl;
+ size_t num_to_trim = std::min<uint64_t>(pg_log.get_log().approx_size() - target,
cct->_conf->osd_pg_log_trim_max);
dout(10) << func << " num_to_trim = " << num_to_trim << dendl;
if (num_to_trim < cct->_conf->osd_pg_log_trim_min &&
Updated by Xin Li over 5 years ago
std::min is a function template, the type of both parameters of the function should be the same.
so modify ceph-12.2.9/src/osd/PrimaryLogPG.cc:1590
--cct->_conf->osd_pg_log_trim_max);
++static_cast<size_t>(cct->_conf->osd_pg_log_trim_max));
Updated by Kaleb KEITHLEY about 5 years ago
This can be closed. ceph-12.2.11 is currently in f29