~james-page/ubuntu/vivid/ceph/0.93

« back to all changes in this revision

Viewing changes to debian/patches/use_system_gtest.patch

  • Committer: james.page at ubuntu
  • Date: 2015-03-02 08:41:36 UTC
  • Revision ID: james.page@ubuntu.com-20150302084136-pt6i3vanjmamkrkq
* New upstream release candidate for Hammer stable release (LP: #1423601).
  - d/control,python-*: Split out rbd, rados and cephfs bindings into
    separate python packages, move some bits into ceph/ceph-common.
  - d/control: Move python-flask dependency to ceph package, only required
    for REST API.
  - d/control: Add BD on yasm for amd64 only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Last-Update: 2014-10-30
2
 
Forwarded: not-needed
3
 
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
4
 
Description: use system "libgtest" instead of bundled one.
5
 
 This patch may be incomplete as it causes FTBFS in tests:
6
 
 ~~~~
7
 
 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-invalid-offsetof   -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wstrict-null-sentinel -I../src/gtest/include -I../src/gtest/include -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -c -o test/unittest_str_list-test_str_list.o `test -f 'test/test_str_list.cc' || echo './'`test/test_str_list.cc
8
 
 In file included from test/osd/TestOSDMap.cc:2:0:
9
 
 /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]]’:
10
 
 /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]’
11
 
 test/osd/TestOSDMap.cc:309:280:   required from here
12
 
 /usr/include/gtest/gtest.h:1448:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13
 
    if (expected == actual) {
14
 
                 ^
15
 
 Makefile:16560: recipe for target 'test/osd/unittest_osdmap-TestOSDMap.o' failed
16
 
 make[6] *** [test/osd/unittest_osdmap-TestOSDMap.o] Error 1
17
 
 ~~~~
18
 
--- a/src/Makefile.am
19
 
+++ b/src/Makefile.am
20
 
@@ -1,8 +1,8 @@
21
 
 include Makefile-env.am
22
 
 
23
 
 SUBDIRS += ocf java tracing
24
 
-DIST_SUBDIRS += gtest ocf libs3 java tracing
25
 
+DIST_SUBDIRS += ocf libs3 java tracing
26
 
 
27
 
 
28
 
 
29
 
 # subdirs
30
 
--- a/configure.ac
31
 
+++ b/configure.ac
32
 
@@ -22,9 +22,9 @@
33
 
 AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE'])
34
 
 
35
 
 AC_CONFIG_MACRO_DIR([m4])
36
 
 
37
 
-AC_CONFIG_SUBDIRS([src/gtest])
38
 
+#AC_CONFIG_SUBDIRS([src/gtest])
39
 
 
40
 
 # Environment
41
 
 AC_CANONICAL_HOST
42
 
 AC_CANONICAL_TARGET
43
 
--- a/Makefile.am
44
 
+++ b/Makefile.am
45
 
@@ -27,15 +27,17 @@
46
 
 all-local:
47
 
 if WITH_DEBUG
48
 
 #      We need gtest to build the rados-api tests. We only build those in
49
 
 #      a debug build, though.
50
 
-       @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
51
 
+#      @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
52
 
+       cd src/gtest && cmake . && $(MAKE) $(AM_MAKEFLAGS)
53
 
 endif
54
 
 
55
 
 check-local:
56
 
 #      We build gtest this way, instead of using SUBDIRS, because with that,
57
 
 #      gtest's own tests would be run and that would slow us down.
58
 
-       @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
59
 
+#      @cd src/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.a lib/libgtest_main.a
60
 
+       cd src/gtest && cmake . && $(MAKE) $(AM_MAKEFLAGS)
61
 
 #      exercise cli tools
62
 
        $(srcdir)/src/test/run-cli-tests '$(top_builddir)/src/test'
63
 
 
64
 
 # "make distclean" both runs this and recurses into src/gtest, if
65
 
--- a/src/test/Makefile.am
66
 
+++ b/src/test/Makefile.am
67
 
@@ -259,10 +259,10 @@
68
 
        $(AM_CXXFLAGS) \
69
 
        -I$(top_srcdir)/src/gtest/include \
70
 
        -I$(top_builddir)/src/gtest/include
71
 
 UNITTEST_LDADD = \
72
 
-       $(top_builddir)/src/gtest/lib/libgtest.a \
73
 
-       $(top_builddir)/src/gtest/lib/libgtest_main.a \
74
 
+       $(top_builddir)/src/gtest/libgtest.a \
75
 
+       $(top_builddir)/src/gtest/libgtest_main.a \
76
 
        $(PTHREAD_LIBS)
77
 
 
78
 
 unittest_encoding_SOURCES = test/encoding.cc
79
 
 unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) -lm $(UNITTEST_LDADD)