From: Piotr Dałek Date: Fri, 11 Dec 2015 15:42:51 +0000 (+0100) Subject: rbd: fix build with "--without-rbd" X-Git-Tag: v10.0.2~41^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=15c840c1d79357d2b909342979da7e7036b3d94e;p=ceph-ci.git rbd: fix build with "--without-rbd" It's not possible to build Ceph configured with "--without-rbd", as tests and FileStore depends on components provided by RBD. This changeset fixes this. Fixes: #14058 Signed-off-by: Piotr Dałek --- diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 4e1ce9bc2ea..182295f9e6d 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -97,12 +97,11 @@ libcommon_internal_la_SOURCES += \ common/aix_errno.cc endif -if WITH_RBD +# used by RBD and FileStore if LINUX libcommon_internal_la_SOURCES += \ common/blkdev.cc endif -endif if ENABLE_XIO libcommon_internal_la_SOURCES += \ diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 3d6353534d1..ab665040060 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -433,9 +433,11 @@ bin_DEBUGPROGRAMS += ceph_test_objectcacher_stress ceph_test_cfuse_cache_invalidate_SOURCES = test/test_cfuse_cache_invalidate.cc bin_DEBUGPROGRAMS += ceph_test_cfuse_cache_invalidate +if LINUX ceph_test_get_blkdev_size_SOURCES = test/test_get_blkdev_size.cc ceph_test_get_blkdev_size_LDADD = $(LIBCOMMON) bin_DEBUGPROGRAMS += ceph_test_get_blkdev_size +endif noinst_HEADERS += \ test/bench/backend.h \ diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index 5e06c2c9e6c..26e672c7349 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -226,6 +226,7 @@ TYPE(ETableServer) #include "mds/events/EUpdate.h" TYPE(EUpdate) +#ifdef WITH_RBD #include "librbd/JournalTypes.h" TYPE(librbd::journal::EventEntry) #include "librbd/WatchNotifyTypes.h" @@ -235,6 +236,7 @@ TYPE(librbd::watch_notify::ResponseMessage) #include "rbd_replay/ActionTypes.h" TYPE(rbd_replay::action::Dependency) TYPE(rbd_replay::action::ActionEntry); +#endif #ifdef WITH_RADOSGW @@ -331,12 +333,14 @@ TYPE(rgw_obj) #include "rgw/rgw_log.h" TYPE(rgw_log_entry) +#ifdef WITH_RBD #include "cls/rbd/cls_rbd.h" TYPE(cls_rbd_parent) TYPE(cls_rbd_snap) #include "cls/rbd/cls_rbd_types.h" TYPE(cls::rbd::MirrorPeer) +#endif #endif