Package: ltrace
Version: 0.5.3-2ubuntu3
Severity: important
Justification: fails to build from source


The configure script for ltrace has a hardcoded 'gcc' for tests which
prevents it from getting the correct answers in a cross-compilation
environment.  It also always tries to use -liberty and -lsupc++ in
the link lines even though it nominally has flags for
detecting this.

Here's a simple patch for addressing these deficiencies.


--- ltrace-0.5.3/configure      2009-07-25 08:13:02.000000000 -0700
+++ ltrace-0.5.3.patched/configure      2010-08-19 11:37:51.453988171 -0700
@@ -6,6 +6,8 @@
   exit 1
 fi

+CC=${CC:-gcc}
+
 echo -n "checking package name... "
 PACKAGE_NAME='ltrace'
 echo $PACKAGE_NAME
@@ -30,7 +32,7 @@
   return cplus_demangle();
 }
 EOF
-if gcc conftest.c -liberty 2>/dev/null
+if ${CC} conftest.c -liberty 2>/dev/null
 then
   HAVE_LIBIBERTY=1
   echo "yes"
@@ -48,7 +50,7 @@
   return __cxa_demangle();
 }
 EOF
-if gcc conftest.c -lsupc++ 2>/dev/null
+if ${CC} conftest.c -lsupc++ 2>/dev/null
 then
   HAVE_LIBSUPC__=1
   echo "yes"
@@ -67,7 +69,7 @@
   return 0;
 }
 EOF
-if gcc conftest.c 2>/dev/null
+if ${CC} conftest.c 2>/dev/null
 then
   HAVE_ELF_C_READ_MMAP=1
   echo "yes"
@@ -77,10 +79,9 @@
 fi
 rm -f conftest.c a.out

-CC=gcc
 CPPFLAGS=' -I /usr/include/libelf'
 CFLAGS='-g -O2'
-LIBS='-lelf -lsupc++ -liberty '
+LIBS='-lelf'
 INSTALL='/usr/bin/install -c'
 iquote='-iquote '
 iquoteend=''
@@ -109,6 +110,16 @@
   esac
 done

+
+if [ "$HAVE_LIBSUPC__" ] ; then
+    LIBS="$LIBS -lsupc++"
+fi
+
+if [ "$HAVE_LIBIBERTY" ] ; then
+    LIBS="$LIBS -liberty "
+fi
+
+
 echo "configure: creating Makefile"
 #
 # Makefile.in -> Makefile

-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 'lucid')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-23-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ltrace depends on:
ii  libc6                  2.11.1-0ubuntu7.2 Embedded GNU C Library: Shared lib
ii  libelf1                0.143-1           library to read and write ELF file

ltrace recommends no packages.

ltrace suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to