RPM install
cat ceph.spec | grep BuildRequires | awk -F' ' '{print $2}' | xargs -i yum install -y {}
# 缺少rpm包
libxio-devel redhat-rpm-config FastCGI-devel libexpat-devel babeltrace-devel Cython redhat-lsb-core python-Sphinx openldap2-devel lsb-release libopenssl-devel keyutils-devel mozilla-nss-devel btrfsprogs libbz2-devel systemd-rpm-macros python-nose python-devel
make ERROR:
1. signal error 找不到 sys_siglist
# define sig_str(signum) strsignal(signum)
//#ifndef HAVE_REENTRANT_STRSIGNAL
//# define sig_str(signum) sys_siglist[signum]
//#else
//# define sig_str(signum) strsignal(signum)
//#endif
2. boost错误,删除调用函数
rbd_replay/Replayer.cc: In member function ‘void rbd_replay::Replayer::wait_for_actions(const Dependencies&)’:
rbd_replay/Replayer.cc:342:141: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>::subsecond_duration(float)’
342 | boost::system_time sub_release_time(action_completed_time + boost::posix_time::microseconds(dep.time_delta * m_latency_multiplier / 1000));
| ^
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
from /usr/include/boost/thread/thread_time.hpp:11,
from /usr/include/boost/thread/lock_types.hpp:18,
from /usr/include/boost/thread/pthread/mutex.hpp:16,
from /usr/include/boost/thread/mutex.hpp:16,
from rbd_replay/Replayer.hpp:18,
from rbd_replay/Replayer.cc:15:
/usr/include/boost/date_time/time_duration.hpp:296:36: note: candidate: ‘template<class T> constexpr boost::date_time::subsecond_duration<base_duration, frac_of_second>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T= T; base_duration = boost::posix_time::time_duration; long int frac_of_second = 1000000]’
296 | BOOST_CXX14_CONSTEXPR explicit subsecond_duration(T const& ss,
| ^~~~~~~~~~~~~~~~~~
/usr/include/boost/date_time/time_duration.hpp:296:36: note: template argument deduction/substitution failed:
/usr/include/boost/date_time/time_duration.hpp: In substitution of ‘template<class T> constexpr boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<T>, void>::type*) [with T = float]’:
rbd_replay/Replayer.cc:342:141: required from here
/usr/include/boost/date_time/time_duration.hpp:296:36: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_integral<float>, void>’
In file included from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:12,
from /usr/include/boost/thread/thread_time.hpp:11,
from /usr/include/boost/thread/lock_types.hpp:18,
from /usr/include/boost/thread/pthread/mutex.hpp:16,
from /usr/include/boost/thread/mutex.hpp:16,
from rbd_replay/Replayer.hpp:18,
from rbd_replay/Replayer.cc:15:
/usr/include/boost/date_time/time_duration.hpp:281:30: note: candidate: ‘constexpr boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>::subsecond_duration(const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>&
3. 指针问题
./common/dout.h:82:12: error: base operand of ‘->’ is not a pointer
82 | _ASSERT_H->_log->submit_entry(_dout_e); \
| ^~
./common/dout.h:82:12: note: in definition of macro ‘dendl’
82 | _ASSERT_H->_log->submit_entry(_dout_e); \
| ^~
./common/dout.h:62:18: warning: unused variable ‘_dout_cct’ [-Wunused-variable]
62 | CephContext *_dout_cct = cct; \
| ^~~~~~~~~
./common/dout.h:62:18: note: in definition of macro ‘dout_impl’
62 | CephContext *_dout_cct = cct; \
| ^~~~~~~~~
test/librados_test_stub/TestWatchNotify.cc:267:5: note: in expansion of macro ‘ldout’
267 | ldout(m_cct, 10) << "oid=" << oid << ", notify_id=" << notify_id
| ^~~~~
./common/dout.h:82:12: error: base operand of ‘->’ is not a pointer
82 | _ASSERT_H->_log->submit_entry(_dout_e);