Package: src:stimfit
Version: 0.10.13-1
Severity: serious
Tags: patch

The package FTBFS on powerpc [0]:
...
|checking for kernel... checking for cpu type... other
...
|config.status: executing libtool commands
|/usr/bin/make
|make[1]: Entering directory 
`/build/buildd-stimfit_0.10.13-1-powerpc-sQOf40/stimfit-0.10.13'
|make[2]: Entering directory 
`/build/buildd-stimfit_0.10.13-1-powerpc-sQOf40/stimfit-0.10.13'
|Making all in src
|make[3]: Entering directory 
`/build/buildd-stimfit_0.10.13-1-powerpc-sQOf40/stimfit-0.10.13/src'
|Making all in app
|make[4]: Entering directory 
`/build/buildd-stimfit_0.10.13-1-powerpc-sQOf40/stimfit-0.10.13/src/app'
|  CXX   channel.o
|In file included from /usr/include/endian.h:37,
|                 from /usr/include/wctype.h:61,
|                 from /usr/include/wx-2.8/wx/wxchar.h:521,
|                 from /usr/include/wx-2.8/wx/debug.h:22,
|                 from /usr/include/wx-2.8/wx/defs.h:521,
|                 from /usr/include/wx-2.8/wx/wx.h:15,
|                 from ./../core/channel.cpp:16:
|/usr/include/bits/endian.h:27:4: error: #error Both BIG_ENDIAN and 
LITTLE_ENDIAN defined!
|make[4]: *** [libstimfit_la-channel.lo] Error 1
|make[4]: Leaving directory 
`/build/buildd-stimfit_0.10.13-1-powerpc-sQOf40/stimfit-0.10.13/src/app'

After looking at configure.in I've found these:

| AC_MSG_CHECKING(for cpu type)
| case `uname -p` in
|     powerpc)
|         AC_MSG_RESULT(powerpc)
|         CPPFLAGS="${CPPFLAGS} -D__BIG_ENDIAN__"
|     ;;
|     *)
|         AC_MSG_RESULT(other)
|         CPPFLAGS="${CPPFLAGS} -D__LITTLE_ENDIAN__"
|     ;;
| esac

This is bogus for a few reason. "uname -p" returns usually unknown :) The
intention was probably to use the -m option but then it should match 
against ppc. Even that is wrong. The application should never try to define it
itself. Take a look on this:

|bigeasy@baako:~$ gcc -o endian endian.c 
|bigeasy@baako:~$ ./endian 
|BIG ENDIAN
|bigeasy@baako:~$ gcc -o endian endian.c -D__LITTLE_ENDIAN__
|In file included from /usr/include/endian.h:37,
|                 from endian.c:2:
|/usr/include/bits/endian.h:27:4: error: #error Both BIG_ENDIAN and 
LITTLE_ENDIAN defined!
|bigeasy@baako:~$ cat endian.c 
|#include <stdio.h>
|#include <endian.h>
|
|int main(void)
|{
|        printf("%s\n",
|#ifdef __BIG_ENDIAN__
|                        "BIG ENDIAN"
|#endif
|#ifdef __LITTLE_ENDIAN__
|                        "LITTLE ENDIAN"
|#endif
|              );
|        return 0;
|}

Please find attach a patch. It seems to build now but I have no clue if
it works. A testsuite could show that :)

[0]
https://buildd.debian.org/status/fetch.php?pkg=stimfit&arch=powerpc&ver=0.10.13-1&stamp=1301922826

Sebastian
>From a3a6e3ba059e5229e85aa3d6361bff2b0f886740 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <[email protected]>
Date: Fri, 8 Apr 2011 18:36:56 +0000
Subject: [PATCH] remove endian defines

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
 configure    |   16 ----------------
 configure.in |   12 ------------
 2 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/configure b/configure
index bb933d5..b842a59 100755
--- a/configure
+++ b/configure
@@ -15158,22 +15158,6 @@ if test "$with_biosig" = "yes" ; then
     LIBBIOSIG_LDFLAGS="-lbiosig"
 fi
 
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpu type" >&5
-$as_echo_n "checking for cpu type... " >&6; }
-case `uname -p` in
-    powerpc)
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: powerpc" >&5
-$as_echo "powerpc" >&6; }
-        CPPFLAGS="${CPPFLAGS} -D__BIG_ENDIAN__"
-    ;;
-    *)
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: other" >&5
-$as_echo "other" >&6; }
-        CPPFLAGS="${CPPFLAGS} -D__LITTLE_ENDIAN__"
-    ;;
-esac
-
 # GUI stuff not required for standalone module
 if test "$enable_module" != "yes"; then
     # Checks for libraries.
diff --git a/configure.in b/configure.in
index 6eca9a3..c62bd06 100644
--- a/configure.in
+++ b/configure.in
@@ -145,18 +145,6 @@ if test "$with_biosig" = "yes" ; then
 fi
 AC_SUBST(LIBBIOSIG_LDFLAGS)
 
-AC_MSG_CHECKING(for cpu type)
-case `uname -p` in 
-    powerpc)
-        AC_MSG_RESULT(powerpc)
-        CPPFLAGS="${CPPFLAGS} -D__BIG_ENDIAN__"
-    ;;
-    *) 
-        AC_MSG_RESULT(other)
-        CPPFLAGS="${CPPFLAGS} -D__LITTLE_ENDIAN__"
-    ;;
-esac
-
 # GUI stuff not required for standalone module
 if test "$enable_module" != "yes"; then
     # Checks for libraries.
-- 
1.7.4.1

Reply via email to