Merge ~ahasenack/ubuntu/+source/snapper:cosmic-ftbfs-1789953 into ubuntu/+source/snapper:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: a0e4e65631d63fe4fcf6b5938b2dc649f5f2a00f
Proposed branch: ~ahasenack/ubuntu/+source/snapper:cosmic-ftbfs-1789953
Merge into: ubuntu/+source/snapper:ubuntu/devel
Diff against target: 167 lines (+48/-21)
5 files modified
debian/changelog (+17/-0)
debian/control (+1/-1)
debian/patches/0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch (+6/-20)
debian/patches/add-boost-libs-to-dbus.patch (+23/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
Review via email: mp+354142@code.launchpad.net

Description of the change

snapper is a sync from debian. The last sync, 0.5.6-1, failed to build in all architectures (https://launchpad.net/ubuntu/+source/snapper/0.5.6-1). Root cause for that was the dropping of -lpthread in https://salsa.debian.org/debian/snapper/commit/7b582167d840a7673b33d186891d2e07a4f3ee4d, by mistake I believe.

When that was put back in, all builds worked, with the exception of armhf. That one failed with this error:
/usr/bin/ld: ../snapper/.libs/libsnapper.so: undefined reference to symbol '_ZN5boost6system16generic_categoryEv'
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:639: recipe for target 'snapper' failed

I traced that down to a missing link to the boost libraries. That I fixed with add-boost-libs-to-dbus.patch and submitted it upstream as well (https://github.com/openSUSE/snapper/issues/424). If you grep for "boost" in the dbus/ directory you'll see it's being used, but not linked with explicitly. A similar fix was done by upstream in the past (https://github.com/openSUSE/snapper/commit/33fbde9412d5eafb9f94aaff6b1be10bcda14951), coincidentally to fix a build in Ubuntu (16.04 back then).

Turns out the DSO patch from Debian seems unnecessary. The package built just fine in an amd64 lxd debian sid container without that patch. So I also pushed a change to debian to drop it, and use my libboost patch for the armhf build: https://salsa.debian.org/debian/snapper/merge_requests/1

Now, none of this seems to be affecting Debian builds, just Ubuntu. We should probably wait from Debian's and upstream's response on these changes, but a review ahead of time doesn't hurt.

Alternatively, to fix our build problem, we could keep Debian's patch but with the -lpthread addition that's needed, and my libboost patch.

Bileto ticket: https://bileto.ubuntu.com/#/ticket/3397 (there are no dep8 tests I'm afraid)

To post a comment you must log in.
1d736af... by Hideki Yamane

Import patches-unapplied version 0.5.6-2 to debian/sid

Imported using git-ubuntu import.

Changelog parent: c08ce8d36ed2209f6c1d1e1b558daad2458213af

New changelog entries:
  * debian/patches
    - Add missing -lpthread option to fix FTBFS in Ubuntu.
      Thanks to Andreas Hasenack for the report
  * debian/control
    - set Standards-Version: 4.2.1 (no change)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

You already got an ack on the -lpthread mistake, but the other discussions are still open atm.
I agree that waiting for the result of the "DSO fix drop" for a few days could keep this a sync.

If not IMHO your current contrib looks good.
Changelog, Patch, references as well as the example builds are all fine, except that ist was surpassed by the new upload in Debian.

There actually is a 0.5.6-2 in unstable now, let me check the full content of that ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The Debian upload contains only the -lpthread accident.

The libboost change isn't in so I assume there is no hope to sync 0.5.6-2, but I'd ask you to make a 0.5.6-2ubuntu1 for re-review (or wait a few days if a 0.5.6-3 will sort it out and can be synced).

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

For the new Debian version to rebase to -> needs fixing

review: Needs Fixing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Debian's 0.5.6-2 failed to build again in armhf, as expected:
libtool: link: g++ -g -O2 -fdebug-prefix-map=/home/andreas/snapper/deb/snapper-0.5.6=. -fstack-protector-strong -Wformat -Werror=format-security -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/snapper snapper.o types.o commands.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o errors.o ../snapper/.libs/libsnapper.so -lm utils/.libs/libutils.a /home/andreas/snapper/deb/snapper-0.5.6/snapper/.libs/libsnapper.so -lmount -lboost_thread -lboost_system -lxml2 -lacl -lz ../dbus/.libs/libdbus.a -ldbus-1 -lbtrfs
/usr/bin/ld: ../snapper/.libs/libsnapper.so: undefined reference to symbol '_ZN5boost6system16generic_categoryEv'
/usr/bin/ld: /usr/lib/gcc/arm-linux-gnueabihf/8/../../../arm-linux-gnueabihf/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:646: snapper] Error 1

I might change this MP to have just the armhf fix, since debian's -2 added back the missing pthread library. We can leave the dropping of the patch to another time.

Waiting for the importer to grab 0.5.6-2.

a0e4e65... by Andreas Hasenack

changelog

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Build worked, just testing the binary armhf packages now.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

All looks fine with just the added patch to fix the armhf build (and rebase on top of debian's 0.5.6-2 which has the -lpthread fix):

https://bileto.ubuntu.com/#/ticket/3397

I updated the upstream bugreport (https://github.com/openSUSE/snapper/issues/424) with a PR: https://github.com/openSUSE/snapper/pull/425

Please take a new look, thanks.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

LP view is still against 0.5.6-1.

No need to resubmit this, the git view is nice and clean.
The new minimized change on top of 0.5.6-2 is looking good.

Just what is needed and doing the job.
+1

Not being in the importer tagging makes no sense.
This is a MOTU package, can you upload yourself?

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Sadly, I cannot upload this one either.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

a0e4e65631d63fe4fcf6b5938b2dc649f5f2a00f is correct, please sponsor

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

uploaded

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 40552e6..7fe8376 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,20 @@
6+snapper (0.5.6-2ubuntu1) cosmic; urgency=medium
7+
8+ * d/p/add-boost-libs-to-dbus.patch: add boost libs to dbus to fix
9+ the armhf build.
10+
11+ -- Andreas Hasenack <andreas@canonical.com> Mon, 03 Sep 2018 13:46:56 -0300
12+
13+snapper (0.5.6-2) unstable; urgency=medium
14+
15+ * debian/patches
16+ - Add missing -lpthread option to fix FTBFS in Ubuntu.
17+ Thanks to Andreas Hasenack for the report
18+ * debian/control
19+ - set Standards-Version: 4.2.1 (no change)
20+
21+ -- Hideki Yamane <henrich@debian.org> Sun, 02 Sep 2018 11:47:13 +0900
22+
23 snapper (0.5.6-1) unstable; urgency=medium
24
25 * New upstream release 0.5.6
26diff --git a/debian/control b/debian/control
27index 7df6832..a95766e 100644
28--- a/debian/control
29+++ b/debian/control
30@@ -18,7 +18,7 @@ Build-Depends:
31 zlib1g-dev,
32 e2fslibs-dev,
33 locales-all,
34-Standards-Version: 4.2.0
35+Standards-Version: 4.2.1
36 Homepage: http://snapper.io/
37 Vcs-Git: https://salsa.debian.org/debian/snapper.git
38 Vcs-Browser: https://salsa.debian.org/debian/snapper
39diff --git a/debian/patches/0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch b/debian/patches/0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch
40index a4fb08a..adc158a 100644
41--- a/debian/patches/0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch
42+++ b/debian/patches/0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch
43@@ -12,11 +12,9 @@ Subject: Add DSO linker options for libsnapper.la
44 testsuite/Makefile.am | 2 +-
45 7 files changed, 10 insertions(+), 8 deletions(-)
46
47-diff --git a/client/Makefile.am b/client/Makefile.am
48-index e8f9a5e..198c507 100644
49 --- a/client/Makefile.am
50 +++ b/client/Makefile.am
51-@@ -19,7 +19,7 @@ snapper_SOURCES = \
52+@@ -19,7 +19,7 @@
53 misc.cc misc.h \
54 errors.cc errors.h
55
56@@ -25,7 +23,7 @@ index e8f9a5e..198c507 100644
57
58 libexecdir = /usr/lib/snapper
59
60-@@ -36,7 +36,7 @@ systemd_helper_SOURCES = \
61+@@ -36,7 +36,7 @@
62 misc.cc misc.h \
63 errors.cc errors.h
64
65@@ -34,19 +32,15 @@ index e8f9a5e..198c507 100644
66
67 if ENABLE_BTRFS
68
69-diff --git a/client/utils/Makefile.am b/client/utils/Makefile.am
70-index 910beda..b6016fc 100644
71 --- a/client/utils/Makefile.am
72 +++ b/client/utils/Makefile.am
73-@@ -14,5 +14,5 @@ libutils_la_SOURCES = \
74+@@ -14,5 +14,5 @@
75 GetOpts.cc GetOpts.h \
76 Range.cc Range.h
77
78 -libutils_la_LIBADD = ../../snapper/libsnapper.la
79 +libutils_la_LIBADD = ../../snapper/libsnapper.la -lboost_thread -lboost_system -lxml2 -lacl -lz -lm
80
81-diff --git a/examples/c++-lib/Makefile.am b/examples/c++-lib/Makefile.am
82-index 52c81e5..2807f81 100644
83 --- a/examples/c++-lib/Makefile.am
84 +++ b/examples/c++-lib/Makefile.am
85 @@ -5,7 +5,8 @@
86@@ -59,19 +53,15 @@ index 52c81e5..2807f81 100644
87
88 noinst_PROGRAMS = List ListAll Create CmpDirs CreateNumber CreateTimeline
89
90-diff --git a/server/Makefile.am b/server/Makefile.am
91-index 2a6a4c2..fe05e06 100644
92 --- a/server/Makefile.am
93 +++ b/server/Makefile.am
94-@@ -14,4 +14,5 @@ snapperd_SOURCES = \
95+@@ -14,4 +14,5 @@
96 Types.cc Types.h
97
98 snapperd_LDADD = ../snapper/libsnapper.la ../dbus/libdbus.la -lrt
99 -snapperd_LDFLAGS = -lboost_system -lboost_thread -lpthread
100-+snapperd_LDFLAGS = -lboost_system -lboost_thread \
101++snapperd_LDFLAGS = -lboost_system -lboost_thread -lpthread \
102 + -lxml2 -lacl -lz -lm
103-diff --git a/testsuite-cmp/Makefile.am b/testsuite-cmp/Makefile.am
104-index 81104bf..aca7a79 100644
105 --- a/testsuite-cmp/Makefile.am
106 +++ b/testsuite-cmp/Makefile.am
107 @@ -5,7 +5,7 @@
108@@ -83,11 +73,9 @@ index 81104bf..aca7a79 100644
109
110 noinst_SCRIPTS = run-all
111
112-diff --git a/testsuite-real/Makefile.am b/testsuite-real/Makefile.am
113-index 8148b54..0e51ae2 100644
114 --- a/testsuite-real/Makefile.am
115 +++ b/testsuite-real/Makefile.am
116-@@ -6,7 +6,7 @@ CXXFLAGS += -std=gnu++0x
117+@@ -6,7 +6,7 @@
118
119 AM_CPPFLAGS = -I$(top_srcdir)
120
121@@ -96,8 +84,6 @@ index 8148b54..0e51ae2 100644
122
123 if HAVE_XATTRS
124 TMP_XATST = xattrs1 xattrs2 xattrs3 xattrs4
125-diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
126-index 8b3fbd6..7fffb29 100644
127 --- a/testsuite/Makefile.am
128 +++ b/testsuite/Makefile.am
129 @@ -4,7 +4,7 @@
130diff --git a/debian/patches/add-boost-libs-to-dbus.patch b/debian/patches/add-boost-libs-to-dbus.patch
131new file mode 100644
132index 0000000..a4d11a2
133--- /dev/null
134+++ b/debian/patches/add-boost-libs-to-dbus.patch
135@@ -0,0 +1,23 @@
136+Description: add boost libs to dbus to fix the armhf build
137+ The libdbus.a static library produced in the dbus/ directory needs some
138+ boost symbols, and for some reason this dependency isn't automatically
139+ detected when building for armhf. A similar fix I believe was done in
140+ server/Makefile.am in this commit:
141+ https://github.com/openSUSE/snapper/commit/33fbde9412d5eafb9f94aaff6b1be10bcda14951
142+Author: Andreas Hasenack <andreas@canonical.com>
143+Bug: https://github.com/openSUSE/snapper/issues/424
144+Forwarded: https://salsa.debian.org/debian/snapper/merge_requests/1
145+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/snapper/+bug/1789953
146+Last-Update: 2018-08-31
147+---
148+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
149+diff --git a/dbus/Makefile.am b/dbus/Makefile.am
150+index eb8769d..f9521a8 100644
151+--- a/dbus/Makefile.am
152++++ b/dbus/Makefile.am
153+@@ -12,4 +12,4 @@ libdbus_la_SOURCES = \
154+ DBusMainLoop.cc DBusMainLoop.h
155+
156+ libdbus_la_LIBADD = $(DBUS_LIBS)
157+-
158++libdbus_la_LDFLAGS = -lboost_system -lboost_thread
159diff --git a/debian/patches/series b/debian/patches/series
160index fee6f58..8ca907b 100644
161--- a/debian/patches/series
162+++ b/debian/patches/series
163@@ -1,3 +1,4 @@
164 0001-refresh-Add-DSO-linker-options-for-libsnapper.la.pat.patch
165 0002-Bug-852574-Update-udevadm-path-to-bin-udevadm.patch
166 0003-Add-debian-specific-option-DISABLE_APT_SNAPSHOT.patch
167+add-boost-libs-to-dbus.patch

Subscribers

People subscribed via source and target branches