package src:phlipple
tags 768741 + confirmed patch
thanks

On Sun, Nov 09, 2014 at 08:13:56AM +0100, Lucas Nussbaum wrote:
[snip]
> Usertags: qa-ftbfs-20141108 qa-ftbfs
> Justification: FTBFS in jessie on amd64
[snip]
> > gcc -std=gnu99 -Wall -g -g -O2 -fstack-protector-strong -Wformat 
> > -Werror=format-security -D_FORTIFY_SOURCE=2  -Wl,-z,relro -Wl,-z,defs  
> > -Wl,-as-needed -Wl,--no-undefined -o phlipple camera.o engine.o game.o 
> > gfxconstants.o gradientrenderer.o interpolator.o levels.o main.o 
> > mainscreen.o osinterface_sdl.o phlipplerootscene.o quad.o quadrenderer.o 
> > scenes.o settings.o textrenderer.o texture.o vertex.o -lSDL -lvorbisfile 
> > -lGLEW -lGLU -lGL    -lGLU -lGL -lSDL_mixer -lSDL_image 
> > /usr/bin/ld: engine.o: undefined reference to symbol 'cos@@GLIBC_2.2.5'
> > //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from 
> > command line
> > collect2: error: ld returned 1 exit status

Hi Miriam,

Attached is a little patch that adds a, well, a little patch :) to the
phlipple source package to make it link with libm.  I think that the
reason this shows up now is that the libraries that phlipple depends on,
e.g. libvorbis, libvorbisfile, etc, have changed since May to not
explicitly list their own dependencies in the pkg-config output.  In the
May rebuild, phlipple picked up -lm from its dependent libraries'
dependencies, and it compiled just fine; now it doesn't, and it must
figure out that -lm should be added all by itself.

As noted in the patch, I know that this is not a proper fix, but I
believe that it should be a simple minimal targeted fix for the Jessie
freeze.

So what do you think about the attached patch?  I have taken the liberty
of adding a changelog entry and adding myself to the Uploaders, so that
the build is happy, but of course it's perfectly fine if you take just
the patch and commit it yourself.  Still, if you agree, I could commit
it to the pkg-games Subversion repo myself, then prepare a package and
put it up in the sponsoring queue.

Thanks for all your work in pkg-games and Debian in general, and also
thanks to Lucas for his tireless, endless rebuilds! :)

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p.penc...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
From 4e2e82fccd3967cad11ca2626f4be5760f46dcc2 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <openstack-...@storpool.com>
Date: Mon, 10 Nov 2014 11:38:20 +0200
Subject: [PATCH] Add a minimal patch to link with libm.

A much better fix would be a configure script check for cos(3) in libm,
but I think that this should be suitable for the Jessie freeze.

Closes:		#768741
---
 debian/changelog          |  7 +++++++
 debian/control            |  2 +-
 debian/patches/libm.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series     |  1 +
 4 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/libm.patch

diff --git a/debian/changelog b/debian/changelog
index 5eecebc..591449b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+phlipple (0.8.5-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add the libm patch to link with -lm for cos(3).  Closes: #768741
+
+ -- Peter Pentchev <r...@ringlet.net>  Mon, 10 Nov 2014 11:23:55 +0200
+
 phlipple (0.8.5-1) unstable; urgency=low
 
   [ Miriam Ruiz ]
diff --git a/debian/control b/debian/control
index 0be7dc4..c13dda5 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: phlipple
 Section: games
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-de...@lists.alioth.debian.org>
-Uploaders: Miriam Ruiz <mir...@debian.org>
+Uploaders: Miriam Ruiz <mir...@debian.org>, Peter Pentchev <r...@ringlet.net>
 Build-Depends: debhelper (>= 9), dh-buildinfo, quilt, autotools-dev,
  libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev,
  libglew1.6-dev | libglew1.5-dev
diff --git a/debian/patches/libm.patch b/debian/patches/libm.patch
new file mode 100644
index 0000000..94d4d23
--- /dev/null
+++ b/debian/patches/libm.patch
@@ -0,0 +1,26 @@
+Description: Link with libm for cos().
+ This is fallout from the fact that other libraries in Debian, such as
+ libvorbisfile, no longer include their own dependencies in the pkg-config
+ output.  Until now, phlipple built just fine because -lm was added by
+ other libraries; now it has to add it on its own.
+ .
+ This bug should really be fixed upstream by adding an explicit check for
+ cos(3) in configure.ac, something like AC_CHECK_LIB([m], [cos])
+ I do intend to do that in a future upload, but IMHO this minimal patch
+ ought to be suitable for the Jessie freeze.
+Debian-Bug: https://bugs.debian.org/768741
+Author: Peter Pentchev <r...@ringlet.net>
+Forwarded: not-yet
+Last-Update: 2014-11-10
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -211,7 +211,7 @@
+ 	vertex.h
+ 
+ phlipple_LDFLAGS = 
+-phlipple_LDADD = $(PHLIPPLE_LIBS) $(GL_LIBS) 
++phlipple_LDADD = $(PHLIPPLE_LIBS) $(GL_LIBS) -lm
+ all: all-am
+ 
+ .SUFFIXES:
diff --git a/debian/patches/series b/debian/patches/series
index 3976736..ddd9831 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 support_us.patch
+libm.patch
-- 
2.1.1

Attachment: signature.asc
Description: Digital signature

Reply via email to