After upgrading to gcc-4.6.3 I tried to rebuild blender-2.49b-r2, which gave the error: 'ptrdiff_t' does not name a type. According to http://gcc.gnu.org/gcc-4.6/porting_to.html, all I needed was to add <cstddef>. Following that, tring to rebuild gave the error described in https://code.google.com/p/bullet/issues/detail?id=481 and, after aplying the mentioned patch, blender built with no issues. Reproducible: Always diff -urN blender-2.49b.orig/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h blender-2.49b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h --- blender-2.49b.orig/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h 2009-09-01 12:23:19.000000000 -0300 +++ blender-2.49b/extern/bullet2/src/BulletSoftBody/btSoftBodyInternals.h 2013-01-17 14:31:13.370789951 -0200 @@ -18,6 +18,7 @@ #define _BT_SOFT_BODY_INTERNALS_H #include "btSoftBody.h" +#include <string.h> #include "LinearMath/btQuickprof.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" @@ -171,8 +172,7 @@ template <typename T> static inline void ZeroInitialize(T& value) { - static const T zerodummy; - value=zerodummy; + memset(&value,0,sizeof(T)); } // template <typename T> diff -urN blender-2.49b.orig/intern/memutil/MEM_Allocator.h blender-2.49b/intern/memutil/MEM_Allocator.h --- blender-2.49b.orig/intern/memutil/MEM_Allocator.h 2009-09-01 12:20:41.000000000 -0300 +++ blender-2.49b/intern/memutil/MEM_Allocator.h 2013-01-17 13:52:22.577275420 -0200 @@ -24,6 +24,7 @@ #ifndef __MEM_Allocator_h_included__ #define __MEM_Allocator_h_included__ 1 +#include <cstddef> #include "guardedalloc/MEM_guardedalloc.h" #include "guardedalloc/BLO_sys_types.h"
Don't post to bugs like that, use attachements
Created attachment 335926 [details, diff] Patch from Comment #0
+ 17 Jan 2013; Samuli Suominen <ssuominen@gentoo.org> blender-2.49b-r2.ebuild, + +files/blender-2.49b-gcc46.patch: + Fix building with sys-devel/gcc >= 4.6.0 wrt #452694 by Alexandre Borges + Marcelo