package: gtk-gnutella
version: 0.98.2-1
severity: serious
tags: patch
gtk-gnutella fails to build on armel and armhf with the following error.
libshared.a(str.o): In function `str_fcat_safe':
/build/buildd-gtk-gnutella_0.98.2-1-armhf-NS4sjD/gtk-gnutella-0.98.2/src/lib/str.c:1229:
undefined reference to `__fpclassify'
collect2: ld returned 1 exit status
make[5]: *** [float-test] Error 1
make[5]: Leaving directory
`/build/buildd-gtk-gnutella_0.98.2-1-armhf-NS4sjD/gtk-gnutella-0.98.2/src/lib'
make[4]: *** [subdirs] Error 1
make[3]: *** [all] Error 2
make[2]: *** [subdirs] Error 1
make[1]: *** [all] Error 2
dh_auto_build: make -j1 returned exit code 2
make: *** [build-stamp] Error 2
The problem seems to be that the configure script doesn't look in
multiarch directories and therefore doesn't find libm. When
the configure script doesn't find libm it doesn't include it in the list
of libs to link against which causes link failures on arm
architectures (I suspect it works on other architectures because of gcc
using inline code instead of the calls to libm but I dunno
for sure).
The attatched patch does the following
1: fixes the build failure by specifying an explicit list of directories
to search for libraries including multiarch dirs
2: adds a versioned build-dependency on dpkg-dev for dpkg-architecture
-qDEB_HOST_MULTIARCH
3: fixes debian/rules clean.
diff -ur gtk-gnutella-0.98.1/debian/control gtk-gnutella-0.98.1.new/debian/control
--- gtk-gnutella-0.98.1/debian/control 2011-12-25 16:24:51.000000000 +0000
+++ gtk-gnutella-0.98.1.new/debian/control 2012-01-03 21:36:27.000000000 +0000
@@ -1,5 +1,5 @@
Source: gtk-gnutella
-Build-Depends: debhelper (>= 7.0.50~), libglib2.0-dev, libgtk2.0-dev, zlib1g-dev (>= 1:1.1.4), libxml2-dev (>= 2.6.0), gettext, libgnutls-dev, libdbus-1-dev, quilt
+Build-Depends: debhelper (>= 7.0.50~), libglib2.0-dev, libgtk2.0-dev, zlib1g-dev (>= 1:1.1.4), libxml2-dev (>= 2.6.0), gettext, libgnutls-dev, libdbus-1-dev, quilt, dpkg-dev (>= 1.16.0)
Section: net
Vcs-Git: https://git.unstable.it/packages.git/
Vcs-Browser: https://git.unstable.it/?p=packages.git;a=shortlog;h=fbgrab
diff -ur gtk-gnutella-0.98.1/debian/rules gtk-gnutella-0.98.1.new/debian/rules
--- gtk-gnutella-0.98.1/debian/rules 2011-12-25 16:24:51.000000000 +0000
+++ gtk-gnutella-0.98.1.new/debian/rules 2012-01-04 00:17:06.000000000 +0000
@@ -2,6 +2,8 @@
include /usr/share/quilt/quilt.make
+DEB_HOST_MULTIARCH ?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
override_dh_auto_configure:
./Configure \
-ders \
@@ -10,7 +12,8 @@
-Dyacc=bison \
-Dipv6=true \
-Dgtkversion=2 \
- -Dofficial=true
+ -Dofficial=true \
+ "-Dlibpth=/usr/lib/$(DEB_HOST_MULTIARCH) /lib /usr/lib/$(DEB_HOST_MULTIARCH) /usr/lib"
override_dh_auto_install:
$(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/gtk-gnutella/
@@ -20,7 +23,59 @@
dh build
touch build-stamp
-clean: unpatch
+clean-patched:
+ -$(MAKE) clean
+ rm -rf .config
+ rm -f Makefile
+ rm -f config.*
+ rm -f extra_files/Makefile
+ rm -f extra_files/el/Makefile
+ rm -f extra_files/en/Makefile
+ rm -f extra_files/ja/Makefile
+ rm -f gtk-gnutella.spec
+ rm -f install
+ rm -f mkdep
+ rm -f pixmaps/Makefile
+ rm -f po/Makefile
+ rm -f src/Makefile
+ rm -f src/core/Makefile
+ rm -f src/dht/Makefile
+ rm -f src/if/Makefile
+ rm -f src/if/bridge/Makefile
+ rm -f src/lib/Makefile
+ rm -f src/revision.h
+ rm -f src/sdbm/Makefile
+ rm -f src/shell/Makefile
+ rm -f src/ui/Makefile
+ rm -f src/ui/gtk/Makefile
+ rm -f src/ui/gtk/gtk1/Makefile
+ rm -f src/ui/gtk/gtk2/Makefile
+ rm -f src/upnp/Makefile
+ rm -f src/xml/Makefile
+ rm -f src/xml/*.a
+ rm -f src/lib/*.a
+ rm -f src/core/*.a
+ rm -f src/sdbm/*.a
+ rm -f src/dht/*.a
+ rm -f src/ui/gtk/*.a
+ rm -f src/ui/gtk/gtk2/*.a
+ rm -f src/shell/*.a
+ rm -f src/upnp/*.a
+ rm -f src/gtk-gnutella
+ rm -rf UU
+ rm -f src/gtk-gnutella.nm
+ rm -f src/lib/bit_array.h
+ rm -f src/lib/bit_field.h
+ rm -f src/ui/gtk/gtk1/callbacks.c
+ rm -f src/ui/gtk/gtk1/callbacks.h
+ rm -f src/ui/gtk/gtk2/callbacks.c
+ rm -f src/ui/gtk/gtk2/callbacks.h
+ rm -f src/core/Makefile.new
+ rm -f src/lib/float-test
+ rm -f src/sdbm/db?
+ rm -f build
+
+clean: clean-patched unpatch
dh clean
install: build
Only in gtk-gnutella-0.98.1: .pc