[Pkg-ceph-commits] [ceph] 03/04: Attempt to build with system libgtest-dev (new commented "use_system_gtest.patch")
Dmitry Smirnov
onlyjob at moszumanska.debian.org
Sat Nov 1 03:24:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
onlyjob pushed a commit to branch experimental
in repository ceph.
commit 1914c61
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date: Fri Oct 31 13:19:29 2014
Attempt to build with system libgtest-dev (new commented "use_system_gtest.patch")
---
debian/control | 1 +
debian/patches/series | 1 +
debian/patches/use_system_gtest.patch | 79 +++++++++++++++++++++++++++++++++++
debian/rules | 3 ++
4 files changed, 84 insertions(+)
diff --git a/debian/control b/debian/control
index 19ffbb9..9c83b5d 100644
--- a/debian/control
+++ b/debian/control
@@ -30,6 +30,7 @@ Build-Depends: debhelper (>= 9~),
libfcgi-dev,
libfuse-dev,
libgoogle-perftools-dev [i386 amd64 powerpc armhf ppc64el],
+# libgtest-dev (>= 1.6.0), cmake,
libkeyutils-dev,
libleveldb-dev,
libnss3-dev,
diff --git a/debian/patches/series b/debian/patches/series
index a15da71..9ec71ee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,4 +10,5 @@ modules.patch
sample.ceph.conf.patch
tests-disable.patch
tests-disable-ceph-disk.patch
+#use_system_gtest.patch
virtualenv-never-download.patch
diff --git a/debian/patches/use_system_gtest.patch b/debian/patches/use_system_gtest.patch
new file mode 100644
index 0000000..19551b7
--- /dev/null
+++ b/debian/patches/use_system_gtest.patch
@@ -0,0 +1,79 @@
+Last-Update: 2014-10-30
+Forwarded: not-needed
+Author: Dmitry Smirnov <onlyjob at member.fsf.org>
+Description: use system "libgtest" instead of bundled one.
+ This patch may be incomplete as it causes FTBFS in tests:
+ ~~~~
+ g++ -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -DCEPH_LIBDIR=\"/usr/lib/x86_64-linux-gnu\" -DCEPH_PKGLIBDIR=\"/usr/lib/x86_64-linux-gnu/ceph\" -DGTEST_HAS_TR1_TUPLE=0 -D_FORTIFY_SOURCE=2 -I/usr/include/nss -I/usr/include/nspr -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -rdynamic -ftemplate-depth-1024 -Wnon-virtual-dtor -Wno-in [...]
+ In file included from test/osd/TestOSDMap.cc:2:0:
+ /usr/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = char [41]]’:
+ /usr/include/gtest/gtest.h:1525:30: required from ‘static testing::AssertionResult testing::internal::EqHelper<true>::Compare(const char*, const char*, const T1&, const T2&, typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type*) [with T1 = int; T2 = char [41]; typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type = void]’
+ test/osd/TestOSDMap.cc:309:280: required from here
+ /usr/include/gtest/gtest.h:1448:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
+ if (expected == actual) {
+ ^
+ Makefile:16560: recipe for target 'test/osd/unittest_osdmap-TestOSDMap.o' failed
+ make[6] *** [test/osd/unittest_osdmap-TestOSDMap.o] Error 1
+ ~~~~
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,8 +1,8 @@
+ include Makefile-env.am
+
+ SUBDIRS += ocf java tracing
+-DIST_SUBDIRS += gtest ocf libs3 java tracing
++DIST_SUBDIRS += ocf libs3 java tracing
+
+
+
+ # subdirs
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,9 +22,9 @@
+ AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE'])
+
+ AC_CONFIG_MACRO_DIR([m4])
+
+-AC_CONFIG_SUBDIRS([src/gtest])
++#AC_CONFIG_SUBDIRS([src/gtest])
+
+ # Environment
+ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -27,15 +27,17 @@
+ all-local:
+ if WITH_DEBUG
+ # We need gtest to build the rados-api tests. We only build those in
+ # a debug build, though.
+- @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
++# @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
++ cd src/gtest && cmake . && $(MAKE) $(AM_MAKEFLAGS)
+ endif
+
+ check-local:
+ # We build gtest this way, instead of using SUBDIRS, because with that,
+ # gtest's own tests would be run and that would slow us down.
+- @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
++# @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
++ cd src/gtest && cmake . && $(MAKE) $(AM_MAKEFLAGS)
+ # exercise cli tools
+ $(srcdir)/src/test/run-cli-tests '$(top_builddir)/src/test'
+
+ # "make distclean" both runs this and recurses into src/gtest, if
+--- a/src/test/Makefile.am
++++ b/src/test/Makefile.am
+@@ -259,10 +259,10 @@
+ $(AM_CXXFLAGS) \
+ -I$(top_srcdir)/src/gtest/include \
+ -I$(top_builddir)/src/gtest/include
+ UNITTEST_LDADD = \
+- $(top_builddir)/src/gtest/lib/libgtest.a \
+- $(top_builddir)/src/gtest/lib/libgtest_main.a \
++ $(top_builddir)/src/gtest/libgtest.a \
++ $(top_builddir)/src/gtest/libgtest_main.a \
+ $(PTHREAD_LIBS)
+
+ unittest_encoding_SOURCES = test/encoding.cc
+ unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) -lm $(UNITTEST_LDADD)
diff --git a/debian/rules b/debian/rules
index 36e3dd7..9d21fcb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -53,6 +53,8 @@ override_dh_autoreconf:
dh_autoreconf $(DH_AS_NEEDED)
override_dh_auto_configure:
+ ## copy gtest sources
+ #cp -Rv /usr/src/gtest src/
dh_auto_configure -- $(extraopts)
override_dh_auto_build:
@@ -60,6 +62,7 @@ override_dh_auto_build:
cp -v src/upstart/rbdmap.conf debian/ceph.rbdmap.upstart
override_dh_auto_clean:
+ #$(RM) -rv src/gtest
$(RM) -rv src/test/fake_home src/mkfs src/test-ceph-disk/osd
dh_auto_clean --sourcedirectory=src/rocksdb
dh_auto_clean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git
More information about the Pkg-ceph-commits
mailing list