Package: daligner
Version: 1.0+20160927-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch

Dear Maintainer,

daligner 1.0+20160927-1 fails to build in Ubuntu because the lddflags.patch 
adds libraries
to the linker options (LDFLAGS) instead of where library flags should be 
placed, at the end
(in LDLIBS).

See 
https://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries 
for more
information.

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

  * debian/patches/lddflags.patch: Update to put libs in LDLIBS instead of
    LDFLAGS, fixing FTBFS with ld --as-needed.

Thanks for considering the patch.

Logan Rosen

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

Kernel: Linux 4.4.0-21-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru daligner-1.0+20160927/debian/patches/lddflags.patch daligner-1.0+20160927/debian/patches/lddflags.patch
--- daligner-1.0+20160927/debian/patches/lddflags.patch	2016-10-12 03:05:03.000000000 -0400
+++ daligner-1.0+20160927/debian/patches/lddflags.patch	2016-12-26 23:33:21.000000000 -0500
@@ -4,19 +4,19 @@
 Author: Afif Elghraoui <a...@ghraoui.name>
 Forwarded: not-needed
 Last-Update: 2016-01-08
---- daligner.orig/Makefile
-+++ daligner/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -1,43 +1,34 @@
  DEST_DIR = ~/bin
  
  CFLAGS += -O3 -Wall -Wextra -Wno-unused-result -fno-strict-aliasing
-+LDFLAGS += -lm
++LDLIBS += -lm
  
  ALL = daligner HPC.daligner LAsort LAmerge LAsplit LAcat LAshow LAdump LAcheck LAindex
  
  all: $(ALL)
  
-+daligner: LDFLAGS += -lpthread
++daligner: LDLIBS += -lpthread
  daligner: daligner.c filter.c filter.h align.c align.h DB.c DB.h QV.c QV.h
 -	gcc $(CFLAGS) -o daligner daligner.c filter.c align.c DB.c QV.c -lpthread -lm
  

Reply via email to