On Fri, 8 Apr 2011, Sebastian Siewior wrote:
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.

Thanks for the patch. I've applied it in r540 
(http://code.google.com/p/stimfit/source/detail?r=60f1355bb926442c4e0c4add8b1bc26c5c4ba954).

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

$ make check
...
[  PASSED  ] 7 tests.
PASS: stimfittest
=============
1 test passed
=============

Will test tomorrow on OS X/powerpc for which the endianness checks were 
originally written.

Best,
Christoph



--
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