From 45e9cd5bd4769d5e64c9a53a5a29096f81fbae30 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Sat, 10 Jan 2015 15:17:59 -0500 Subject: [PATCH] Fix make check blockers. Replace ceph-helpers.sh check for ms_nocrc with the new formula for this. Fixes make check for default build. Additionally, fix linkage of several unittests when building with --enable-xio. xio: add missing noinst headers The common/address_helper.h file was not mentioned, also msg/xio/XioSubmit.h. Fix for Message.cc compilation error when Xio disabled. Mention simple_dispatcher.h and xio_dispatcher.h in noinst_HEADERS. xio: require boost-regex. Make address_helper conditional on Xio. This carries over to simple_client/simple_server, for convenience. Signed-off-by: Matt Benjamin --- configure.ac | 9 ++++----- src/common/Makefile.am | 12 +++++++++++- src/messages/MDataPing.h | 7 +++---- src/messages/MPing.h | 2 -- src/messages/Makefile.am | 1 + src/msg/Makefile.am | 3 ++- src/test/Makefile.am | 14 +++++++------- src/test/ceph-helpers.sh | 2 +- src/test/messenger/Makefile.am | 10 +++++++++- 9 files changed, 38 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 782e5bb705873..7a9bfa270ef33 100644 --- a/configure.ac +++ b/configure.ac @@ -536,6 +536,10 @@ if test "x$enable_xio" = x"yes"; then AC_CHECK_LIB([ibverbs], [ibv_query_device], [], AC_MSG_FAILURE([OFED not found])) AC_CHECK_LIB([rdmacm], [rdma_connect], [], AC_MSG_FAILURE([OFED not found])) + # Also require boost-regex, used in address_helper + AC_CHECK_LIB(boost_regex, main, [], + AC_MSG_FAILURE(["Boost regex library not found."])) + AC_DEFINE([HAVE_XIO], [1], [Accelio conditional compilation]) XIO_LIBS="-lxio -libverbs -lrdmacm" @@ -748,11 +752,6 @@ AC_CHECK_LIB(boost_system-mt, main, [], [AC_CHECK_LIB(boost_system, main, [], AC_MSG_NOTICE(["Boost system library not found."]))]) -# Also regex, used in address_helper -AC_CHECK_LIB(boost_regex, main, [], - [AC_CHECK_LIB(boost_regex, main, [], - AC_MSG_NOTICE(["Boost regex library not found."]))]) - # Find the right boost_thread library. BOOST_THREAD_LIBS="" saved_LIBS="${LIBS}" diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 1223ccf1ae035..7408345b6abd6 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -61,7 +61,6 @@ libcommon_internal_la_SOURCES = \ common/ceph_json.cc \ common/ipaddr.cc \ common/pick_address.cc \ - common/address_helper.cc \ common/util.cc \ common/TextTable.cc \ common/ceph_fs.cc \ @@ -76,6 +75,11 @@ libcommon_internal_la_SOURCES = \ common/Readahead.cc \ common/Cycles.cc +if ENABLE_XIO +libcommon_internal_la_SOURCES += \ + common/address_helper.cc +endif + # these should go out of libcommon_internal libcommon_internal_la_SOURCES += \ mon/MonCap.cc \ @@ -223,6 +227,12 @@ noinst_HEADERS += \ common/Cycles.h \ common/Initialize.h +if ENABLE_XIO +noinst_HEADERS += \ + common/address_helper.h +endif + + libsecret_la_SOURCES = common/secret.c libsecret_la_LIBADD = $(KEYUTILS_LIB) if LINUX diff --git a/src/messages/MDataPing.h b/src/messages/MDataPing.h index 28bd283d0b7d4..16bf4d2fb5a66 100644 --- a/src/messages/MDataPing.h +++ b/src/messages/MDataPing.h @@ -17,15 +17,14 @@ #include "msg/Message.h" #include "messages/MPing.h" +#include "include/encoding.h" #if defined(HAVE_XIO) extern "C" { #include "libxio.h" } -#endif /* HAVE_XIO */ - -#if !defined(HAVE_XIO) +#else struct xio_mempool_obj {}; -#endif +#endif /* HAVE_XIO */ typedef void (*mdata_hook_func)(struct xio_mempool_obj *mp); diff --git a/src/messages/MPing.h b/src/messages/MPing.h index 3cd051497eaa5..60fb38b20d5fc 100644 --- a/src/messages/MPing.h +++ b/src/messages/MPing.h @@ -13,12 +13,10 @@ */ - #ifndef CEPH_MPING_H #define CEPH_MPING_H #include "msg/Message.h" -#include "include/encoding.h" class MPing : public Message { public: diff --git a/src/messages/Makefile.am b/src/messages/Makefile.am index d1be28b0614a9..5e962ce7f87b6 100644 --- a/src/messages/Makefile.am +++ b/src/messages/Makefile.am @@ -109,6 +109,7 @@ noinst_HEADERS += \ messages/MPGStats.h \ messages/MPGStatsAck.h \ messages/MPing.h \ + messages/MDataPing.h \ messages/MPoolOp.h \ messages/MPoolOpReply.h \ messages/MRemoveSnaps.h \ diff --git a/src/msg/Makefile.am b/src/msg/Makefile.am index 3d6ee10337c27..6ef821ba2a4c2 100644 --- a/src/msg/Makefile.am +++ b/src/msg/Makefile.am @@ -79,7 +79,8 @@ noinst_HEADERS += \ msg/xio/XioMessenger.h \ msg/xio/XioMsg.h \ msg/xio/XioPool.h \ - msg/xio/XioPortal.h + msg/xio/XioPortal.h \ + msg/xio/XioSubmit.h endif noinst_LTLIBRARIES += libmsg.la diff --git a/src/test/Makefile.am b/src/test/Makefile.am index afe713592ec1d..1dbf995048e22 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -290,7 +290,7 @@ UNITTEST_LDADD = \ $(PTHREAD_LIBS) unittest_encoding_SOURCES = test/encoding.cc -unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) -lm $(UNITTEST_LDADD) +unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD) unittest_encoding_CXXFLAGS = $(UNITTEST_CXXFLAGS) -fno-strict-aliasing check_PROGRAMS += unittest_encoding @@ -385,7 +385,7 @@ unittest_crush_wrapper_CXXFLAGS = $(UNITTEST_CXXFLAGS) -O2 check_PROGRAMS += unittest_crush_wrapper unittest_base64_SOURCES = test/base64.cc -unittest_base64_LDADD = $(LIBCEPHFS) -lm $(UNITTEST_LDADD) +unittest_base64_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD) unittest_base64_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_base64 @@ -443,7 +443,7 @@ unittest_gather_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_gather unittest_run_cmd_SOURCES = test/run_cmd.cc -unittest_run_cmd_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD) +unittest_run_cmd_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD) unittest_run_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_run_cmd @@ -453,12 +453,12 @@ unittest_signals_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_signals unittest_simple_spin_SOURCES = test/simple_spin.cc -unittest_simple_spin_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD) +unittest_simple_spin_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD) unittest_simple_spin_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_simple_spin unittest_librados_SOURCES = test/librados/librados.cc -unittest_librados_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) +unittest_librados_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD) unittest_librados_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_librados @@ -566,7 +566,7 @@ unittest_formatter_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_formatter unittest_libcephfs_config_SOURCES = test/libcephfs_config.cc -unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD) +unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD) unittest_libcephfs_config_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_libcephfs_config @@ -576,7 +576,7 @@ unittest_lfnindex_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_lfnindex unittest_librados_config_SOURCES = test/librados/librados_config.cc -unittest_librados_config_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) +unittest_librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD) unittest_librados_config_CXXFLAGS = $(UNITTEST_CXXFLAGS) check_PROGRAMS += unittest_librados_config diff --git a/src/test/ceph-helpers.sh b/src/test/ceph-helpers.sh index 14986eea59be2..15cda86ac64ce 100755 --- a/src/test/ceph-helpers.sh +++ b/src/test/ceph-helpers.sh @@ -574,7 +574,7 @@ function test_get_config() { setup $dir || return 1 run_mon $dir a --osd_pool_default_size=1 || return 1 - test $(get_config mon a ms_nocrc) = false || return 1 + test $(get_config mon a ms_crc_header) = true || return 1 teardown $dir || return 1 } diff --git a/src/test/messenger/Makefile.am b/src/test/messenger/Makefile.am index 27a4b68dc61a1..1449cbc9f7702 100644 --- a/src/test/messenger/Makefile.am +++ b/src/test/messenger/Makefile.am @@ -1,3 +1,8 @@ +if ENABLE_XIO + +noinst_HEADERS += \ + test/messenger/message_helper.h \ + test/messenger/simple_dispatcher.h simple_server_SOURCES = \ test/messenger/simple_server.cc \ @@ -31,7 +36,9 @@ noinst_PROGRAMS += \ simple_server \ simple_client -if ENABLE_XIO +noinst_HEADERS += \ + test/messenger/xio_dispatcher.h + xio_server_SOURCES = \ test/messenger/xio_server.cc \ test/messenger/xio_dispatcher.cc @@ -63,4 +70,5 @@ endif noinst_PROGRAMS += \ xio_server \ xio_client + endif -- 2.39.5