Package: scid
Version: 1:4.5.1.cvs20140429-2
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 you package
fails to build from source with that option enabled 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.
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/01_Makefile.conf.diff: Move -lpthread to after files that
need it to fix FTBFS with 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-25-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
diff -Nru scid-4.5.1.cvs20140429/debian/patches/01_Makefile.conf.diff scid-4.5.1.cvs20140429/debian/patches/01_Makefile.conf.diff
--- scid-4.5.1.cvs20140429/debian/patches/01_Makefile.conf.diff 2014-09-05 10:33:59.000000000 -0400
+++ scid-4.5.1.cvs20140429/debian/patches/01_Makefile.conf.diff 2014-12-06 02:18:44.000000000 -0500
@@ -22,7 +22,7 @@
### OPTIMIZE: Optimization options for C++ compiler.
# -O3 is the most optimization for g++. I have found -O2 to do
-@@ -66,30 +66,38 @@
+@@ -66,30 +66,35 @@
# On some systems, adding "-fno-rtti" and "-fno-exceptions" produces
# smaller, faster programs since Scid does not use those C++ features.
#
@@ -56,9 +56,6 @@
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+
+CPP_FLAGS += -MMD $(CXXFLAGS) $(CPPFLAGS) $(PROFILE) $(OPTIMIZE) $(WARNINGS) $(DEBUG) $(SCIDFLAGS) $(EXTRACXXFLAGS)
-+
-+### Linking with pthread
-+LDFLAGS:=$(LDFLAGS) -lpthread
### CFLAGS: Flags for C compilation (only used for compiling zlib).
#
@@ -67,7 +64,7 @@
### LANGUAGES: List of additional Tcl files to include in Scid for
# multi-language menu support.
-@@ -116,7 +124,7 @@
+@@ -116,7 +121,7 @@
# Note: scidt and eco2epd are obsolete and not compiled by default.
# PG : put back scidt has it appears to be useful in certain cases
#
@@ -76,7 +73,7 @@
### SCIDOBJS:
SCIDOBJS= src/misc.o src/index.o src/date.o src/namebase.o src/position.o \
-@@ -221,7 +229,8 @@
+@@ -221,7 +226,8 @@
install -m 755 -d $(SHAREDIR)
install -m 755 -d $(BINDIR)
install -m 755 scid $(SCRIPTS) $(EXECS) $(BINDIR)
@@ -86,7 +83,7 @@
install -m 755 -d $(SHAREDIR)/books
install -m 666 ./books/*.* $(SHAREDIR)/books/
install -m 755 -d $(SHAREDIR)/bases
-@@ -313,8 +322,8 @@
+@@ -313,8 +319,8 @@
clean:
rm -f game.* learn* tkscid.so tkscid.dll position.* src/*.o src/zlib/*.o src/zlib/*.a src/polyglot/*.o $(EXECS) scid $(SCRIPTS)
rm -f src/*.d src/zlib/*.d src/polyglot/*.d
@@ -97,16 +94,16 @@
rm -Rf dist
### To make the executable files smaller: type "make strip".
-@@ -398,25 +407,25 @@
+@@ -398,25 +404,25 @@
chmod +x spf2spi
scmerge: src/scmerge.o $(OBJ)
- $(LINK) -o scmerge src/scmerge.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
-+ $(LINK) $(LDFLAGS) -o scmerge src/scmerge.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
++ $(LINK) $(LDFLAGS) -o scmerge src/scmerge.o $(OBJS) $(ZLIB) $(TCL_LIBRARY) -lpthread
pgnscid: src/pgnscid.o $(OBJS)
- $(LINK) $(PROFILE) -o pgnscid src/pgnscid.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
-+ $(LINK) $(LDFLAGS) $(PROFILE) -o pgnscid src/pgnscid.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
++ $(LINK) $(LDFLAGS) $(PROFILE) -o pgnscid src/pgnscid.o $(OBJS) $(ZLIB) $(TCL_LIBRARY) -lpthread
scidlet: src/scidlet.o src/engine.o src/recog.o src/misc.o src/position.o \
src/dstring.o src/movelist.o
@@ -115,11 +112,11 @@
scidt: src/scidt.o $(OBJS)
- $(LINK) -o scidt src/scidt.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
-+ $(LINK) $(LDFLAGS) -o scidt src/scidt.o $(OBJS) $(ZLIB) $(TCL_LIBRARY)
++ $(LINK) $(LDFLAGS) -o scidt src/scidt.o $(OBJS) $(ZLIB) $(TCL_LIBRARY) -lpthread
tkscid: src/tkscid.o $(XOBJS) $(OBJS)
- $(LINK) $(PROFILE) -o tkscid src/tkscid.o $(XOBJS) $(OBJS) $(ZLIB) $(TCL_LIBRARY)
-+ $(LINK) $(LDFLAGS) $(PROFILE) -o tkscid src/tkscid.o $(XOBJS) $(OBJS) $(ZLIB) $(TCL_LIBRARY)
++ $(LINK) $(LDFLAGS) $(PROFILE) -o tkscid src/tkscid.o $(XOBJS) $(OBJS) $(ZLIB) $(TCL_LIBRARY) -lpthread
# eco2epd is now optional extra program NOT compiled by default, since
# scid now reads the .eco file format directly.