ok, thanks! @kefu chai 2017-02-06 19:15 GMT+08:00 kefu chai <tchaikov@xxxxxxxxx>: > On Mon, Feb 6, 2017 at 7:00 PM, liuchang0812 <liuchang0812@xxxxxxxxx> wrote: >> hi, Sage and Cephers >> >> I tried to use boost::algorithm in os/bluefs.cc this afternoon. I got >> such error when i included "boost/algorithm/string.hpp". >> >> /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueFS.cc: In member >> function ‘int BlueFS::add_block_device(unsigned int, >> std::__cxx11::string)’: >> /home/liuchang/WorkSpace/ceph/src/common/dout.h:81:12: error: base >> operand of ‘->’ is not a pointer >> _ASSERT_H->_log->submit_entry(_dout_e); \ >> >> >> I have found this commit[1] that includes _ASSERT_H. i can't >> understand why replace _dout_cct with _ASSERT_H and what >> boost::algorithm confilicts with _ASSERT_H。 > > because boost/algorithm/string.hpp includes "assert.h" from libc. you > need to re-included "include/assert.h" to override the `assert()` from > libc. > >> >> thanks, any comments are appreciated. >> >> >> [1]: https://github.com/ceph/ceph/commit/a30601a1b69c3f1ac5cfa592050877aec8b5be9d >> >> [2]: more log as : >> >> /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueFS.cc: In member >> function ‘int BlueFS::add_block_device(unsigned int, >> std::__cxx11::string)’: >> /home/liuchang/WorkSpace/ceph/src/common/dout.h:81:12: error: base >> operand of ‘->’ is not a pointer >> _ASSERT_H->_log->submit_entry(_dout_e); \ >> ^ >> /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueFS.cc:119:65: note: >> in expansion of macro ‘dendl’ >> dout(10) << __func__ << " bdev " << id << " path " << path << dendl; >> ^ >> /home/liuchang/WorkSpace/ceph/src/common/dout.h:62:18: warning: unused >> variable ‘_dout_cct’ [-Wunused-variable] >> CephContext *_dout_cct = cct; \ >> ^ >> /home/liuchang/WorkSpace/ceph/src/common/dout.h:66:24: note: in >> expansion of macro ‘dout_impl’ >> #define ldout(cct, v) dout_impl(cct, dout_subsys, v) dout_prefix >> ^ >> /home/liuchang/WorkSpace/ceph/src/common/debug.h:23:17: note: in >> expansion of macro ‘ldout’ >> #define dout(v) ldout((dout_context), v) >> ^ >> /home/liuchang/WorkSpace/ceph/src/os/bluestore/BlueFS.cc:119:3: note: >> in expansion of macro ‘dout’ >> dout(10) << __func__ << " bdev " << id << " path " << path << dendl; >> -- >> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > Regards > Kefu Chai -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html