Package: libavg
Version: 0.8.0-5
Severity: important
Tags: patch
Justification: fails to build from source


https://bugs.launchpad.net/ubuntu/+source/libavg/+bug/512861

-----

http://launchpadlibrarian.net/38108616/buildlog_ubuntu-lucid-i386.libavg_0.8.0-5ubuntu3_FAILEDTOBUILD.txt.gz

g++ -Wno-invalid-offsetof -g -O2 -Wl,-Bsymbolic-functions -o checktracker 
checktracker.o /usr/lib/libxml2.so -lboost_thread-mt -lGLU -lGL -lm -L/usr/lib 
/usr/lib/libSDL.so -lXxf86vm -lGraphicsMagick++ -lGraphicsMagick 
-L/usr/lib/python2.6/config ./.libs/libplayer.a -lboost_python-mt-py26 
-lpython2.6 -lssl -lcrypto -lz -lpthread -ldl -lutil ../video/.libs/libvideo.a 
../audio/.libs/libaudio.a ../imaging/.libs/libimaging.a 
../graphics/.libs/libgraphics.a ../base/.libs/libbase.a 
../lmfit/.libs/liblmfit.a
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status

-----

This package's m4/python_dev.m4 script improperly refers to Python's 
LOCALMODLIBS which contains a link reference to -lssl (and other libs):

  py_localmodlibs=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $py_makefile`

libavg does not build-depend on libssl-dev (nor should it as it does not 
actually need to link with -lssl) so that library is not installed and 
therefore causes libavg to FTB when $py_localmodlibs tries to link with it 
anyway.

-----

[Matthias Klose]
libavg must not link with LOCALMODLIBS (this is the list of libs which the 
python executable must be linked with, not arbitrary extensions).

-----

Attached debdiff adds quilt patch - debian/patches/no_py_localmodlibs.diff - 
which comments out the line referencing of python's LOCALMODLIBS from the 
configure script and its source m4 file.

With this patch in place, libavg's binaries no longer try to link with -lssl 
and the package builds successfully.
diff -u libavg-0.8.0/debian/changelog libavg-0.8.0/debian/changelog
--- libavg-0.8.0/debian/changelog
+++ libavg-0.8.0/debian/changelog
@@ -1,3 +1,10 @@
+libavg (0.8.0-5ubuntu4) lucid; urgency=low
+
+  * configure, m4/python_dev.m4: Do not reference $py_makefile's LOCALMODLIBS
+    to avoid undesired linking with -lssl (LP: #512861).
+
+ -- Kamal Mostafa <ka...@whence.com>  Tue, 26 Jan 2010 08:13:10 -0800
+
 libavg (0.8.0-5ubuntu3) lucid; urgency=low
 
   * rebuild for ffmpeg versioned symbols
diff -u libavg-0.8.0/debian/patches/series libavg-0.8.0/debian/patches/series
--- libavg-0.8.0/debian/patches/series
+++ libavg-0.8.0/debian/patches/series
@@ -3,0 +4 @@
+no_py_localmodlibs.diff
only in patch2:
unchanged:
--- libavg-0.8.0.orig/debian/patches/no_py_localmodlibs.diff
+++ libavg-0.8.0/debian/patches/no_py_localmodlibs.diff
@@ -0,0 +1,28 @@
+--- libavg-0.8.0.orig/configure
++++ libavg-0.8.0/configure
+@@ -22159,7 +22159,10 @@
+ py_config_dir=${py_exec_prefix}/lib/python${PYTHON_VERSION}/config
+ py_makefile="${py_config_dir}/Makefile"
+ if test -f "$py_makefile"; then
+-  py_localmodlibs=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $py_makefile`
++  # Do not reference LOCALMODLIBS, else it will add libraries to our
++  # link line (e.g -lssl) which are not necessarily installed.
++  # py_localmodlibs=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $py_makefile`
++  py_localmodlibs=""
+   py_basemodlibs=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $py_makefile`
+   py_other_libs=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $py_makefile`
+ 
+--- libavg-0.8.0.orig/m4/python_dev.m4
++++ libavg-0.8.0/m4/python_dev.m4
+@@ -33,7 +33,10 @@
+ py_makefile="${py_config_dir}/Makefile"
+ if test -f "$py_makefile"; then
+ dnl extra required libs
+-  py_localmodlibs=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $py_makefile`
++  # Do not reference LOCALMODLIBS, else it will add libraries to our
++  # link line (e.g -lssl) which are not necessarily installed.
++  # py_localmodlibs=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $py_makefile`
++  py_localmodlibs=""
+   py_basemodlibs=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $py_makefile`
+   py_other_libs=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $py_makefile`
+ 

Reply via email to