Package: eboard
Version: 1.1.3-0.2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch

Dear Maintainer,

eboard currently fails to build from source with ld --as-needed, which
is enabled by default in Ubuntu. This linker option requires that
libraries be placed after the files/objects that need them.

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

  * d/p/ld-as-needed.patch: Add libraries to LIBS instead of LDFLAGS to fix
    FTBFS with ld --as-needed.

Thanks for considering the patch.

Logan Rosen

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

Kernel: Linux 4.18.0-12-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru eboard-1.1.3/debian/patches/ld-as-needed.patch 
eboard-1.1.3/debian/patches/ld-as-needed.patch
--- eboard-1.1.3/debian/patches/ld-as-needed.patch      1969-12-31 
19:00:00.000000000 -0500
+++ eboard-1.1.3/debian/patches/ld-as-needed.patch      2018-12-15 
00:16:45.000000000 -0500
@@ -0,0 +1,47 @@
+--- a/configure
++++ b/configure
+@@ -9,8 +9,8 @@
+ my $cxx         = "g++";
+ my @cxxflagsdbg = ("-ggdb");
+ my @cxxflags    = map { split } join(" ",$ENV{CXXFLAGS}," ",$ENV{CPPFLAGS});
+-my @ldflags     = map { split } join(" -lpthread "," -ldl ",$ENV{LDFLAGS});
+-my @libs        = ();
++my @ldflags     = map { split } join($ENV{LDFLAGS});
++my @libs        = ("-lpthread -ldl");
+ my $configh     = "config.h";
+ my $configmake  = "config.make";
+ my $nls         = 1;
+@@ -643,9 +643,8 @@
+ chomp($x);
+ @x = split(/ /,$x);
+ for(@x) {
+-    push @ldflags, $_;
++    push @libs, $_;
+ }
+-push @ldflags, @libs;
+ 
+ if (!header_check("gtk/gtk.h","gdk/gdkkeysyms.h"))
+ {
+@@ -701,6 +700,7 @@
+ print CONFIGMAKE "CXXFLAGS      = @cxxflags\n";
+ print CONFIGMAKE "CXXFLAGS_DBG  = @cxxflagsdbg\n";
+ print CONFIGMAKE "LDFLAGS       = @ldflags\n";
++print CONFIGMAKE "LIBS          = @libs\n";
+ 
+ print CONFIGMAKE "prefix    = \${DESTDIR}$prefix\n";
+ print CONFIGMAKE "bindir    = \${DESTDIR}$prefix/bin\n";
+--- a/elifekam
++++ b/elifekam
+@@ -31,10 +31,10 @@
+ debug: eboard.dbg
+ 
+ eboard: $(OBJS)
+-      $(CXX) $(LDFLAGS) -o eboard $(OBJS)
++      $(CXX) $(LDFLAGS) -o eboard $(OBJS) $(LIBS)
+ 
+ eboard.dbg: $(DBG_OBJS)
+-      $(CXX) $(LDFLAGS) -o eboard.dbg $(DBG_OBJS)
++      $(CXX) $(LDFLAGS) -o eboard.dbg $(DBG_OBJS) $(LIBS)
+ 
+ dbg_%.o: %.cc $(HEADERS) $(XPMS)
+       $(CXX) $(CXXFLAGS_DBG) -c $< -o $@
diff -Nru eboard-1.1.3/debian/patches/series eboard-1.1.3/debian/patches/series
--- eboard-1.1.3/debian/patches/series  2018-11-06 07:05:34.000000000 -0500
+++ eboard-1.1.3/debian/patches/series  2018-12-15 00:16:09.000000000 -0500
@@ -1,3 +1,4 @@
 french-translation.patch
 hungarian-translation.patch
 90_respect_deb_build_options.patch
+ld-as-needed.patch

Reply via email to