Package: avarice Version: 2.4-2 Severity: grave Tags: patch Justification: renders package unusable
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 avarice is linked with the shared version of libbfd, but the binutils-dev says : "Note that building Debian packages which depend on the shared libbfd is Not Allowed." This results in a broken package in current debian unstable : $ avarice avarice: error while loading shared libraries: libbfd-2.16.91.so: cannot open shared object file: No such file or directory A fix for the problem is attached. The check for libbfd is from the Lush project (http://lush.cvs.sourceforge.net/*checkout*/lush/lush/configure.ac) Remember to run autoreconf. I've not reported this bug to upstream. - -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable'), (550, 'testing'), (25, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17.7 Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8) Versions of packages avarice depends on: ii binutils 2.17-2 The GNU assembler, linker and bina ii libc6 2.3.6-18 GNU C Library: Shared libraries ii libgcc1 1:4.1.1-10 GCC support library ii libstdc++6 4.1.1-10 The GNU Standard C++ Library v3 ii libusb-0.1-4 2:0.1.12-2 userspace USB programming library Versions of packages avarice recommends: ii gdb-avr 6.4-1 The GNU Debugger for avr - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFE08OKZmUHKLzaTmIRAiz6AJ9YQtvo93TeXnLkBY8zDwJjobirvgCfdqF/ m6iSgK5Qfks9FT8U5bjr9jU= =qEUx -----END PGP SIGNATURE-----
--- avarice-2.4.orig/configure.ac 2006-01-11 19:16:03.000000000 +0100 +++ avarice-2.4/configure.ac 2006-08-04 22:11:54.000000000 +0200 @@ -64,13 +64,82 @@ fi AC_CHECK_LIB([intl], [dcgettext]) AC_CHECK_LIB([iberty], [xmalloc]) -AC_CHECK_LIB([bfd], [bfd_init], , [ac_found_bfd=no]) -AC_CHECK_LIB([usb], [usb_get_string_simple]) +# bfd + +BFD_YES='' +has_bfd=yes +AC_CHECK_LIB(iberty, xmalloc) +if test $ac_cv_lib_iberty_xmalloc = no; then + AC_CHECK_LIB(mmalloc, mmalloc) + AC_CHECK_LIB(iberty, xcalloc) +fi +AC_CHECK_HEADER(bfd.h,,has_bfd=no) +AC_CHECK_LIB(bfd, bfd_init,,[has_bfd=no]) +AC_SUBST(BFD_YES) + +# Check if it compiles +if test x$has_bfd = xyes ; then + n_LIBS=$LIBS + has_intl= + AC_CHECK_LIB(intl, dcgettext, [has_intl=yes],[has_intl=no]) + i_LIBS=`echo $n_LIBS | sed -e 's/-liberty/& -lintl/'` + sn_LIBS=`echo $n_LIBS | sed -e 's/-lbfd\( -liberty\)*/-Wl,-Bstatic & -Wl,-Bdynamic/'` + si_LIBS=`echo $i_LIBS | sed -e 's/-lbfd\( -liberty\)*/-Wl,-Bstatic & -Wl,-Bdynamic/'` + LIBS=$sn_LIBS + AC_MSG_CHECKING([whether bfd works with -Bstatic]) + AC_TRY_LINK([#include "bfd.h"], + [bfd_openr("junk1","default"); ], + [okay_bfd=yes],[okay_bfd=no]); + AC_MSG_RESULT($okay_bfd) + if test x$okay_bfd = xno ; then + if test x$has_intl = xyes ; then + LIBS=$si_LIBS + AC_MSG_CHECKING([whether bfd works with -Bstatic and -lintl]) + AC_TRY_LINK([#include "bfd.h"], + [bfd_openr("junk1","default"); ], + [okay_bfd=yes],[okay_bfd=no]); + AC_MSG_RESULT($okay_bfd) + fi + if test x$okay_bfd = xno ; then + LIBS=$n_LIBS + AC_MSG_CHECKING([whether bfd works alone]) + AC_TRY_LINK([#include "bfd.h"], + [bfd_openr("junk1","default"); ], + [okay_bfd=yes],[okay_bfd=no]); + AC_MSG_RESULT($okay_bfd) + if test x$okay_bfd = xno ; then + if test x$has_intl = xyes ; then + LIBS=$i_LIBS + AC_MSG_CHECKING([whether bfd works with -lintl]) + AC_TRY_LINK([#include "bfd.h"], + [bfd_openr("junk1","default"); ], + [okay_bfd=yes], + [okay_bfd=no]); + AC_MSG_RESULT($okay_bfd) + fi + if test x$okay_bfd = xno ; then + LIBS=$n_LIBS + fi + fi + fi + fi + if test x$okay_bfd = xno ; then + has_bfd=no + fi +fi -if test "x$ac_found_bfd" = "xno"; then - AC_MSG_ERROR([You need to install libbfd.a from binutils.]) +if test x$has_bfd = xno ; then + AC_MSG_ERROR([Unable to locate BFD development files. +------------------------------------------------------------- +We were unable to locate required GNU binutils files. +- Some Linux distributions do not install these by default. + You need to install the 'libbinutils-devel' package. +- On other platforms, get GNU binutils on www.fsf.org. +-----------------------------------------------------------------]) fi +AC_CHECK_LIB([usb], [usb_get_string_simple]) + # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h termios.h unistd.h bfd.h])