Package: blender Version: 2.69-3 Severity: serious Tags: upstream patch Justification: fails to build from source (but built successfully in the past)
Since the default gcc has been upgraded to gcc-4.8, blender fails to build on s390x, and on a few non-official architectures like ppc64 and sparc64. This is due to a hardcoded list of architectures with 64-bit pointers which has to be updated. The patch below fixes the issue: --- blender-2.69.orig/intern/atomic/atomic_ops.h +++ blender-2.69/intern/atomic/atomic_ops.h @@ -61,7 +61,7 @@ # endif #endif -#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__) +#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) # define LG_SIZEOF_PTR 3 # define LG_SIZEOF_INT 2 #else On the other hand, it might be a good idea to actually detect the size of a pointer instead of having an hardcoded list. The following code can be used for that: | #include <stdint.h> | #include <limits.h> | | #if (UINTPTR_MAX == UINT64_MAX) | # define LG_SIZEOF_PTR 3 | #elif (UINTPTR_MAX == UINT32_MAX) | # define LG_SIZEOF_PTR 2 | #else | # error Can not determine size of a pointer | #endif | | #if (UINT_MAX == UINT64_MAX) | # define LG_SIZEOF_INT 3 | #elif (UINT_MAX == UINT32_MAX) | # define LG_SIZEOF_INT 2 | #else | # error Can not determine size of a int | #endif Or it can probably also be done directly with cmake. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: s390x Kernel: Linux 3.2.0-4-s390x (SMP w/2 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org