On Sat, Jul 09, 2016 at 10:43:52AM +, Kevan Rehm wrote:
> Greetings,
>
> I cloned the master branch of ceph at https://github.com/ceph/ceph.git
> onto a Centos 7 machine, then did
>
> ./autogen.sh
> ./configure --enable-xio
> make
>
> but the build fails when it references the src/gmock subdirectory, see
> below. Typing "make" a second time stops in the same place. To get past
> this problem I had to cd into src/gmock, type "make", wait for it to
> finish compiling, then cd back to the top and restart the make again.
>
> Anyone else seeing this? Seems like a Makefile ordering problem, the
> src/gmock directory needs to be compiled before it is referenced. I'm not
> a Makefile expert, can someone suggest a patch to Makefile.in to get
> builds to work cleanly again?
>
> Thanks, Kevan
>
> ...
> CXX ceph_osd.o
> CXX ceph_mds.o
> CXX test/erasure-code/ceph_erasure_code_non_regression.o
> CXX test/messenger/simple_server-simple_server.o
> CXX test/messenger/simple_server-simple_dispatcher.o
> CXX test/messenger/simple_client-simple_client.o
> CXX test/messenger/simple_client-simple_dispatcher.o
> CXX test/messenger/xio_server-xio_server.o
> CXX test/messenger/xio_server-xio_dispatcher.o
> CXX test/messenger/xio_client-xio_client.o
> CXX test/messenger/xio_client-xio_dispatcher.o
> CXX test/librgw_file_cd-librgw_file_cd.o
> make[3]: *** No rule to make target `../src/gmock/lib/libgmock_main.la',
> needed by `librgw_file_cd'. Stop.
> make[3]: *** Waiting for unfinished jobs
> make[3]: Leaving directory `/root/krehm/ceph/ceph-11.0.0/ceph-11.0.0/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/krehm/ceph/ceph-11.0.0/ceph-11.0.0/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/krehm/ceph/ceph-11.0.0/ceph-11.0.0/src'
> make: *** [all-recursive] Error 1
This has happened before and, as before, running configure with "--with-debug"
allows the build to complete successfully.
Looking at Greg's old email on the subject we can make the following change.
# git diff
diff --git a/src/test/Makefile-client.am b/src/test/Makefile-client.am
index f9534e5..2ba393c 100644
--- a/src/test/Makefile-client.am
+++ b/src/test/Makefile-client.am
@@ -772,7 +772,7 @@ librgw_file_cd_SOURCES = test/librgw_file_cd.cc
librgw_file_cd_CXXFLAGS = -I$(srcdir)/xxHash $(UNITTEST_CXXFLAGS)
librgw_file_cd_LDADD = $(UNITTEST_LDADD) \
$(LIBRGW) $(LIBRGW_DEPS) librados.la $(PTHREAD_LIBS) $(CEPH_GLOBAL)
$(EXTRALIBS)
-noinst_PROGRAMS += librgw_file_cd
+check_PROGRAMS += librgw_file_cd
librgw_file_gp_SOURCES = test/librgw_file_gp.cc
librgw_file_gp_CXXFLAGS = -I$(srcdir)/xxHash $(UNITTEST_CXXFLAGS)
If we do that the error moves to...
make[3]: *** No rule to make target `../src/gmock/lib/libgmock_main.la', needed
by `librgw_file_gp'. Stop.
In the end I had to make the following four changes.
# git diff|gawk '/noinst_PROGRAMS/||/check_PROGRAMS/'
-noinst_PROGRAMS += librgw_file_cd
+check_PROGRAMS += librgw_file_cd
-noinst_PROGRAMS += librgw_file_gp
+check_PROGRAMS += librgw_file_gp
-noinst_PROGRAMS += librgw_file_aw
+check_PROGRAMS += librgw_file_aw
-noinst_PROGRAMS += librgw_file_nfsns
+check_PROGRAMS += librgw_file_nfsns
I'm not convinced this is the way to go but I'll open a tracker and submit a
PR to at least get the conversation started.
Thanks for the report!
--
Cheers,
Brad
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com