On Sun, 09 Nov 2014 at 09:08:40 +0100, Petter Reinholdtsen wrote:
> My best guess is that some -lm entry is missing, as rint() is in libm

Yes. Patch attached (build-tested only). I was able to reproduce the
reported FTBFS in my sid sbuild chroot, and the same chroot can build
my patched version successfully.

> but I find it strange as this code built in unstable a few days ago.
> Anyone got a clue what changed in the mean time?  Is this rebuild
> using a different linker than the one used by the autobuilders?

It looks like you uploaded libvorbis 1.3.4 the same day, and that new
upstream version correctly moves -lm from Libs to Libs.private in
vorbis.pc:

https://anonscm.debian.org/cgit/pkg-xiph/libvorbis.git/tree/vorbis.pc.in?h=upstream&id=37c68547f31da4590a31baa0e17c00f20523a9b9

libtheora was built against the older libvorbis, so it had the
implicit -lm borrowed from libvorbis. A rebuild no longer gets that.

Regards,
    S
>From a061692623a7c10ad7b8e2602e59fe3628d79ef0 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Mon, 10 Nov 2014 10:31:00 +0000
Subject: [PATCH] Add missing -lm to player-example (Closes: #768685)

---
 debian/changelog                                   |  7 +++++++
 .../0004-player-example-needs-lm-for-rint.patch    | 22 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 30 insertions(+)
 create mode 100644 debian/patches/0004-player-example-needs-lm-for-rint.patch

diff --git a/debian/changelog b/debian/changelog
index 85b94d5..4761c9b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libtheora (1.1.1+dfsg.1-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add missing -lm to player-example (Closes: #768685)
+
+ -- Simon McVittie <s...@debian.org>  Mon, 10 Nov 2014 10:30:34 +0000
+
 libtheora (1.1.1+dfsg.1-5) unstable; urgency=low
 
   * Switch to source format 3.0 (quilt).
diff --git a/debian/patches/0004-player-example-needs-lm-for-rint.patch b/debian/patches/0004-player-example-needs-lm-for-rint.patch
new file mode 100644
index 0000000..0ade731
--- /dev/null
+++ b/debian/patches/0004-player-example-needs-lm-for-rint.patch
@@ -0,0 +1,22 @@
+From: Simon McVittie <s...@debian.org>
+Date: Mon, 10 Nov 2014 10:29:42 +0000
+Subject: player-example needs -lm for rint()
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768685
+---
+ examples/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index fe66a21..289e219 100644
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -22,7 +22,7 @@ dump_psnr_LDADD = $(GETOPT_OBJS) $(LDADDDEC) -lm
+ 
+ player_example_SOURCES = player_example.c
+ player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
+-player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS)
++player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS) -lm
+ 
+ encoder_example_SOURCES = encoder_example.c
+ EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h
diff --git a/debian/patches/series b/debian/patches/series
index 801688e..49c0989 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 autotools
 dfsg
 build_on_gnu
+0004-player-example-needs-lm-for-rint.patch
-- 
2.1.3

Reply via email to