Package: estscan
Version: 3.0.3-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu disco ubuntu-patch
Dear Maintainer,
estscan fails to build from source with ld --as-needed, which is enabled
by default in Ubuntu. This linker options requires that libraries be
placed after the objects they require.
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/ld-as-needed.patch: Add -lm to LDLIBS 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 estscan-3.0.3/debian/patches/ld-as-needed.patch
estscan-3.0.3/debian/patches/ld-as-needed.patch
--- estscan-3.0.3/debian/patches/ld-as-needed.patch 1969-12-31
19:00:00.000000000 -0500
+++ estscan-3.0.3/debian/patches/ld-as-needed.patch 2018-12-17
23:08:47.000000000 -0500
@@ -0,0 +1,32 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,7 +5,7 @@
+ CFLAGS = -O2 -g
+ F77 = gfortran
+ FFLAGS = -O2 -g
+- LDFLAGS = -lm
++ LDLIBS = -lm
+
+ # Linux with Intel compilers:
+ # CC = icc
+@@ -21,16 +21,16 @@
+ \rm -f *~ $(PROGS) *.o
+
+ maskred: maskred.o
+- $(CC) $(LDFLAGS) -o $@ $<
++ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+ makesmat: makesmat.o
+- $(CC) $(LDFLAGS) -o $@ $<
++ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+ estscan: estscan.o
+- $(CC) $(LDFLAGS) -o $@ $<
++ $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+ winsegshuffle: winsegshuffle.o
+- $(F77) $(LDFLAGS) -o $@ $<
++ $(F77) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $<
diff -Nru estscan-3.0.3/debian/patches/series
estscan-3.0.3/debian/patches/series
--- estscan-3.0.3/debian/patches/series 2018-05-31 18:23:37.000000000 -0400
+++ estscan-3.0.3/debian/patches/series 2018-12-17 23:07:31.000000000 -0500
@@ -1 +1,2 @@
Makfile.patch
+ld-as-needed.patch