Package: mscompress
Version: 0.4-2
Severity: serious
Tags: patch
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

mscompress FTBFS on big endian arches:

...
make[5]: Leaving directory `/«PKGBUILDDIR»/test'
make[4]: *** [test-suite.log] Error 1
============================================================================
Testsuite summary for mscompress 0.4
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to michael+mscompr...@stapelberg.de
============================================================================
make[4]: Leaving directory `/«PKGBUILDDIR»/test'
make[3]: *** [check-TESTS] Error 2
make[2]: *** [check-am] Error 2
make[3]: Leaving directory `/«PKGBUILDDIR»/test'
make[2]: Leaving directory `/«PKGBUILDDIR»/test'
make[1]: *** [check-recursive] Error 1
dh_auto_test: make -j1 check returned exit code 2
make[1]: Leaving directory `/«PKGBUILDDIR»'
make: *** [build-arch] Error 29
...

This issue surfaced when the testsuite was implicitely activated by using new
debhelper rules in debian/rules. I'm attaching a patch that fixes the issue by
defining WORDS_BIGENDIAN which is expected by the source code in the respective
case but nevertheless never defined.

Roland

-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Description: Fix big endian build
 mscompress assumes WORDS_BIGENDIAN to be defined in the big endian case. Tests
 revealed that we need to specify it on big endian arches.
Author: Roland Stigge <sti...@antcom.de>

Index: mscompress-0.4/src/msexpand.c
===================================================================
--- mscompress-0.4.orig/src/msexpand.c	2013-06-19 09:54:57.000000000 +0200
+++ mscompress-0.4/src/msexpand.c	2013-06-19 10:02:17.298322577 +0200
@@ -27,6 +27,10 @@
 #include <stdint.h>
 #include <getopt.h>
 
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WORDS_BIGENDIAN
+#endif
+
 extern char *version_string;
 
 #define N 4096
Index: mscompress-0.4/src/mscompress.c
===================================================================
--- mscompress-0.4.orig/src/mscompress.c	2013-06-19 09:54:57.000000000 +0200
+++ mscompress-0.4/src/mscompress.c	2013-06-19 10:02:05.978319764 +0200
@@ -28,6 +28,10 @@
 #include <stdint.h>
 #include <getopt.h>
 
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WORDS_BIGENDIAN
+#endif
+
 extern char *version_string;
 
 #define BSWAP32(x)             ((((x)&0xFF)<<24)+(((x)<<8)&0xFF0000)+\

Reply via email to