Package: msgpack-python
Version: 0.1.9-2
Severity: important
Tags: patch upstream
Justification: fails to build from source

mspack-python fails to build from source on big-endian architectures.
>From my build log:

| gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -g -O2 -fPIC -I/usr/include/python2.7 -c msgpack/_msgpack.c 
-o build/temp.linux-mips-2.7/msgpack/_msgpack.o
| In file included from msgpack/pack.h:99:0,
|                  from msgpack/_msgpack.c:227:
| msgpack/pack_template.h:24:21: error: #elif with no expression
| msgpack/pack_template.h: In function 'msgpack_pack_uint8':
| msgpack/pack_template.h:337:2: warning: implicit declaration of function 
'TAKE8_8' [-Wimplicit-function-declaration]
| msgpack/pack_template.h:337:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_uint16':
| msgpack/pack_template.h:342:2: warning: implicit declaration of function 
'TAKE8_16' [-Wimplicit-function-declaration]
| msgpack/pack_template.h:342:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_uint32':
| msgpack/pack_template.h:347:2: warning: implicit declaration of function 
'TAKE8_32' [-Wimplicit-function-declaration]
| msgpack/pack_template.h:347:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_uint64':
| msgpack/pack_template.h:352:2: warning: implicit declaration of function 
'TAKE8_64' [-Wimplicit-function-declaration]
| msgpack/pack_template.h:352:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_int8':
| msgpack/pack_template.h:357:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_int16':
| msgpack/pack_template.h:362:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_int32':
| msgpack/pack_template.h:367:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_int64':
| msgpack/pack_template.h:372:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_short':
| msgpack/pack_template.h:382:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_int':
| msgpack/pack_template.h:405:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_long':
| msgpack/pack_template.h:426:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_long_long':
| msgpack/pack_template.h:449:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_unsigned_short':
| msgpack/pack_template.h:466:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_unsigned_int':
| msgpack/pack_template.h:489:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_unsigned_long':
| msgpack/pack_template.h:510:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_unsigned_long_long':
| msgpack/pack_template.h:533:2: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_map':
| msgpack/pack_template.h:631:3: error: lvalue required as unary '&' operand
| msgpack/pack_template.h: In function 'msgpack_pack_raw':
| msgpack/pack_template.h:652:3: error: lvalue required as unary '&' operand
| msgpack/_msgpack.c: In function 'msgpack_pack_unsigned_long_long':
| msgpack/pack_template.h:544:1: warning: control reaches end of non-void 
function [-Wreturn-type]
| msgpack/_msgpack.c: In function 'msgpack_pack_long_long':
| msgpack/pack_template.h:460:1: warning: control reaches end of non-void 
function [-Wreturn-type]
| msgpack/_msgpack.c: In function 'msgpack_pack_long':
| msgpack/pack_template.h:439:1: warning: control reaches end of non-void 
function [-Wreturn-type]
| msgpack/_msgpack.c: In function 'msgpack_pack_raw':
| msgpack/pack_template.h:662:1: warning: control reaches end of non-void 
function [-Wreturn-type]
| msgpack/_msgpack.c: In function 'msgpack_pack_map':
| msgpack/pack_template.h:641:1: warning: control reaches end of non-void 
function [-Wreturn-type]
| error: command 'gcc' failed with exit status 1
| dh_auto_build: python2.7 setup.py build --force returned exit code 1
| make: *** [build] Error 1
| dpkg-buildpackage: error: debian/rules build gave error exit status 2

Full build logs are available on:
https://buildd.debian.org/status/package.php?p=msgpack-python&suite=sid

The source code is supposed to support big endian platform, but it
doesn't due to a stupid mistake. The patch below fixes the issue.

--- msgpack-python-0.1.9.orig/msgpack/pack_template.h
+++ msgpack-python-0.1.9/msgpack/pack_template.h
@@ -21,7 +21,7 @@
 #define TAKE8_16(d) ((uint8_t*)&d)[0]
 #define TAKE8_32(d) ((uint8_t*)&d)[0]
 #define TAKE8_64(d) ((uint8_t*)&d)[0]
-#elif __BIG_ENDIAN__
+#elif defined(__BIG_ENDIAN__)
 #define TAKE8_8(d)  ((uint8_t*)&d)[0]
 #define TAKE8_16(d) ((uint8_t*)&d)[1]
 #define TAKE8_32(d) ((uint8_t*)&d)[3]

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: mips (mips64)

Kernel: Linux 2.6.32-5-5kc-malta 
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



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