Skip to content

Commit 45e9cd5

Browse files
author
Matt Benjamin
committed
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 <[email protected]>
1 parent daefad7 commit 45e9cd5

File tree

9 files changed

+38
-22
lines changed

9 files changed

+38
-22
lines changed

configure.ac

+4-5
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,10 @@ if test "x$enable_xio" = x"yes"; then
536536
AC_CHECK_LIB([ibverbs], [ibv_query_device], [], AC_MSG_FAILURE([OFED not found]))
537537
AC_CHECK_LIB([rdmacm], [rdma_connect], [], AC_MSG_FAILURE([OFED not found]))
538538

539+
# Also require boost-regex, used in address_helper
540+
AC_CHECK_LIB(boost_regex, main, [],
541+
AC_MSG_FAILURE(["Boost regex library not found."]))
542+
539543
AC_DEFINE([HAVE_XIO], [1], [Accelio conditional compilation])
540544

541545
XIO_LIBS="-lxio -libverbs -lrdmacm"
@@ -748,11 +752,6 @@ AC_CHECK_LIB(boost_system-mt, main, [],
748752
[AC_CHECK_LIB(boost_system, main, [],
749753
AC_MSG_NOTICE(["Boost system library not found."]))])
750754

751-
# Also regex, used in address_helper
752-
AC_CHECK_LIB(boost_regex, main, [],
753-
[AC_CHECK_LIB(boost_regex, main, [],
754-
AC_MSG_NOTICE(["Boost regex library not found."]))])
755-
756755
# Find the right boost_thread library.
757756
BOOST_THREAD_LIBS=""
758757
saved_LIBS="${LIBS}"

src/common/Makefile.am

+11-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ libcommon_internal_la_SOURCES = \
6161
common/ceph_json.cc \
6262
common/ipaddr.cc \
6363
common/pick_address.cc \
64-
common/address_helper.cc \
6564
common/util.cc \
6665
common/TextTable.cc \
6766
common/ceph_fs.cc \
@@ -76,6 +75,11 @@ libcommon_internal_la_SOURCES = \
7675
common/Readahead.cc \
7776
common/Cycles.cc
7877

78+
if ENABLE_XIO
79+
libcommon_internal_la_SOURCES += \
80+
common/address_helper.cc
81+
endif
82+
7983
# these should go out of libcommon_internal
8084
libcommon_internal_la_SOURCES += \
8185
mon/MonCap.cc \
@@ -223,6 +227,12 @@ noinst_HEADERS += \
223227
common/Cycles.h \
224228
common/Initialize.h
225229

230+
if ENABLE_XIO
231+
noinst_HEADERS += \
232+
common/address_helper.h
233+
endif
234+
235+
226236
libsecret_la_SOURCES = common/secret.c
227237
libsecret_la_LIBADD = $(KEYUTILS_LIB)
228238
if LINUX

src/messages/MDataPing.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
#include "msg/Message.h"
1919
#include "messages/MPing.h"
20+
#include "include/encoding.h"
2021
#if defined(HAVE_XIO)
2122
extern "C" {
2223
#include "libxio.h"
2324
}
24-
#endif /* HAVE_XIO */
25-
26-
#if !defined(HAVE_XIO)
25+
#else
2726
struct xio_mempool_obj {};
28-
#endif
27+
#endif /* HAVE_XIO */
2928

3029
typedef void (*mdata_hook_func)(struct xio_mempool_obj *mp);
3130

src/messages/MPing.h

-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313
*/
1414

1515

16-
1716
#ifndef CEPH_MPING_H
1817
#define CEPH_MPING_H
1918

2019
#include "msg/Message.h"
21-
#include "include/encoding.h"
2220

2321
class MPing : public Message {
2422
public:

src/messages/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ noinst_HEADERS += \
109109
messages/MPGStats.h \
110110
messages/MPGStatsAck.h \
111111
messages/MPing.h \
112+
messages/MDataPing.h \
112113
messages/MPoolOp.h \
113114
messages/MPoolOpReply.h \
114115
messages/MRemoveSnaps.h \

src/msg/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ noinst_HEADERS += \
7979
msg/xio/XioMessenger.h \
8080
msg/xio/XioMsg.h \
8181
msg/xio/XioPool.h \
82-
msg/xio/XioPortal.h
82+
msg/xio/XioPortal.h \
83+
msg/xio/XioSubmit.h
8384
endif
8485

8586
noinst_LTLIBRARIES += libmsg.la

src/test/Makefile.am

+7-7
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ UNITTEST_LDADD = \
290290
$(PTHREAD_LIBS)
291291

292292
unittest_encoding_SOURCES = test/encoding.cc
293-
unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) -lm $(UNITTEST_LDADD)
293+
unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD)
294294
unittest_encoding_CXXFLAGS = $(UNITTEST_CXXFLAGS) -fno-strict-aliasing
295295
check_PROGRAMS += unittest_encoding
296296

@@ -385,7 +385,7 @@ unittest_crush_wrapper_CXXFLAGS = $(UNITTEST_CXXFLAGS) -O2
385385
check_PROGRAMS += unittest_crush_wrapper
386386

387387
unittest_base64_SOURCES = test/base64.cc
388-
unittest_base64_LDADD = $(LIBCEPHFS) -lm $(UNITTEST_LDADD)
388+
unittest_base64_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD)
389389
unittest_base64_CXXFLAGS = $(UNITTEST_CXXFLAGS)
390390
check_PROGRAMS += unittest_base64
391391

@@ -443,7 +443,7 @@ unittest_gather_CXXFLAGS = $(UNITTEST_CXXFLAGS)
443443
check_PROGRAMS += unittest_gather
444444

445445
unittest_run_cmd_SOURCES = test/run_cmd.cc
446-
unittest_run_cmd_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
446+
unittest_run_cmd_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
447447
unittest_run_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
448448
check_PROGRAMS += unittest_run_cmd
449449

@@ -453,12 +453,12 @@ unittest_signals_CXXFLAGS = $(UNITTEST_CXXFLAGS)
453453
check_PROGRAMS += unittest_signals
454454

455455
unittest_simple_spin_SOURCES = test/simple_spin.cc
456-
unittest_simple_spin_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
456+
unittest_simple_spin_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
457457
unittest_simple_spin_CXXFLAGS = $(UNITTEST_CXXFLAGS)
458458
check_PROGRAMS += unittest_simple_spin
459459

460460
unittest_librados_SOURCES = test/librados/librados.cc
461-
unittest_librados_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
461+
unittest_librados_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
462462
unittest_librados_CXXFLAGS = $(UNITTEST_CXXFLAGS)
463463
check_PROGRAMS += unittest_librados
464464

@@ -566,7 +566,7 @@ unittest_formatter_CXXFLAGS = $(UNITTEST_CXXFLAGS)
566566
check_PROGRAMS += unittest_formatter
567567

568568
unittest_libcephfs_config_SOURCES = test/libcephfs_config.cc
569-
unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(UNITTEST_LDADD)
569+
unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
570570
unittest_libcephfs_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
571571
check_PROGRAMS += unittest_libcephfs_config
572572

@@ -576,7 +576,7 @@ unittest_lfnindex_CXXFLAGS = $(UNITTEST_CXXFLAGS)
576576
check_PROGRAMS += unittest_lfnindex
577577

578578
unittest_librados_config_SOURCES = test/librados/librados_config.cc
579-
unittest_librados_config_LDADD = $(LIBRADOS) $(UNITTEST_LDADD)
579+
unittest_librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
580580
unittest_librados_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
581581
check_PROGRAMS += unittest_librados_config
582582

src/test/ceph-helpers.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ function test_get_config() {
574574

575575
setup $dir || return 1
576576
run_mon $dir a --osd_pool_default_size=1 || return 1
577-
test $(get_config mon a ms_nocrc) = false || return 1
577+
test $(get_config mon a ms_crc_header) = true || return 1
578578
teardown $dir || return 1
579579
}
580580

src/test/messenger/Makefile.am

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if ENABLE_XIO
2+
3+
noinst_HEADERS += \
4+
test/messenger/message_helper.h \
5+
test/messenger/simple_dispatcher.h
16

27
simple_server_SOURCES = \
38
test/messenger/simple_server.cc \
@@ -31,7 +36,9 @@ noinst_PROGRAMS += \
3136
simple_server \
3237
simple_client
3338

34-
if ENABLE_XIO
39+
noinst_HEADERS += \
40+
test/messenger/xio_dispatcher.h
41+
3542
xio_server_SOURCES = \
3643
test/messenger/xio_server.cc \
3744
test/messenger/xio_dispatcher.cc
@@ -63,4 +70,5 @@ endif
6370
noinst_PROGRAMS += \
6471
xio_server \
6572
xio_client
73+
6674
endif

0 commit comments

Comments
 (0)