Package: libzeep
Version: 3.0.2-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu vivid ubuntu-patch

Dear Maintainer,

In Ubuntu, we use ld --as-needed by default in the toolchain, and your package 
causes dependent packages to fail to build from source because of the way 
libraries are linked.

Even though Debian doesn't use ld --as-needed by default, it is a good idea to 
make this change so that (1) we don't have to maintain a delta and (2) you 
don't need to change anything in case Debian makes this default in the future.

You can read more about this option here: 
https://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/linking-order.diff: Fix linking order to make sure
    libraries come after objects (to satisfy ld --as-needed).

Thanks for considering the patch.

Logan Rosen

-- System Information:
Debian Release: jessie/sid
  APT prefers vivid-updates
  APT policy: (500, 'vivid-updates'), (500, 'vivid-security'), (500, 'vivid'), 
(100, 'vivid-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-28-generic (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: upstart (via init_is_upstart())
diff -Nru libzeep-3.0.2/debian/patches/linking-order.diff libzeep-3.0.2/debian/patches/linking-order.diff
--- libzeep-3.0.2/debian/patches/linking-order.diff	1969-12-31 19:00:00.000000000 -0500
+++ libzeep-3.0.2/debian/patches/linking-order.diff	2014-12-14 22:28:16.000000000 -0500
@@ -0,0 +1,11 @@
+--- a/makefile
++++ b/makefile
+@@ -62,7 +62,7 @@
+ 	ld -r -o $@ $(OBJECTS)
+ 
+ $(LIB_NAME): $(OBJECTS)
+-	$(CXX) -shared -o $@ -Wl,-soname=$(SO_NAME) $(LDFLAGS) $(OBJECTS)
++	$(CXX) -shared -o $@ -Wl,-soname=$(SO_NAME) $(OBJECTS) $(LDFLAGS)
+ 
+ $(SO_NAME): $(LIB_NAME)
+ 	ln -fs $(LIB_NAME) $@
diff -Nru libzeep-3.0.2/debian/patches/series libzeep-3.0.2/debian/patches/series
--- libzeep-3.0.2/debian/patches/series	2013-05-30 04:55:01.000000000 -0400
+++ libzeep-3.0.2/debian/patches/series	2014-12-14 22:27:05.000000000 -0500
@@ -1,2 +1,3 @@
 hurd-patch
 makefile.diff
+linking-order.diff

Reply via email to