boost::optional<> in librados

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi guys,

i just found that librados now depends on boost because of the newly
introduced boost::optional<sha1_digest_t> ceph::buffer::list::sha1()
method in [0]. and it turns out to be an issue when compiling an
librados application [1] in a clean-room environment.

so we have two options:

1. claim that librados's C++ binding is now moving to C++17. and use
std::optional<> instead of boost<> in librados.hpp.
  - pros: libboost won't be a dependency of librados-dev / librados-devel.
  - cons: our users are forced to use C++17 for compiling their C++
application with librados since nautilus
2. make libboost-dev / libboot-devel a dependency of librados-dev. et voilà.
  - pros: users can choose to stay with C++11.
  - cons: another dependency at build time. user will need to install
libboost-dev or libboost-devel in their CI script or building host.
3. change the sha1() method to a more complicated form, for example,
it could return an std::pair<bool, sha1_digest_t>.

any thoughts?

cheers,

--
[0] https://github.com/ceph/ceph/pull/22987
[1] http://pulpito.ceph.com/kchai-2018-09-12_06:54:12-rados-wip-kefu-testing-2018-09-12-1250-distro-basic-smithi/3010589/
==== 8< =====
2018-09-12T08:18:06.540
INFO:tasks.workunit.client.0.smithi018.stdout:[100%] Building CXX
object CMakeFiles/rocksdb-shared.dir/utilities/env_librados.cc.o
2018-09-12T08:18:06.643
INFO:tasks.workunit.client.0.smithi018.stderr:In file included from
/usr/include/rados/librados.hpp:11:0,
2018-09-12T08:18:06.644 INFO:tasks.workunit.client.0.smithi018.stderr:
                from
/home/ubuntu/cephtest/mnt.0/client.0/tmp/rocksdb/include/rocksdb/utilities/env_librados.h:14,
2018-09-12T08:18:06.644 INFO:tasks.workunit.client.0.smithi018.stderr:
                from
/home/ubuntu/cephtest/mnt.0/client.0/tmp/rocksdb/utilities/env_librados.cc:4:
2018-09-12T08:18:06.644
INFO:tasks.workunit.client.0.smithi018.stderr:/usr/include/rados/buffer.h:64:30:
fatal error: boost/optional.hpp: No such file or directory
2018-09-12T08:18:06.644 INFO:tasks.workunit.client.0.smithi018.stderr:
#include <boost/optional.hpp>
2018-09-12T08:18:06.644 INFO:tasks.workunit.client.0.smithi018.stderr:
                             ^
2018-09-12T08:18:06.644
INFO:tasks.workunit.client.0.smithi018.stderr:compilation terminated.
2018-09-12T08:18:06.918
INFO:tasks.workunit.client.0.smithi018.stderr:make[3]: ***
[CMakeFiles/rocksdb-shared.dir/utilities/env_librados.cc.o] Error 1
==== >8 =====

-- 
Regards
Kefu Chai




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux