Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 452694 - media-gfx/blender-2.49b-r2 fails to build with gcc-4.6
Summary: media-gfx/blender-2.49b-r2 fails to build with gcc-4.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Luca Barbato
URL: https://code.google.com/p/bullet/issu...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-4.6
  Show dependency tree
 
Reported: 2013-01-17 16:43 UTC by Alexandre Borges Marcelo
Modified: 2013-01-17 16:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from Comment #0 (blender-2.49b-gcc46.patch,1.26 KB, patch)
2013-01-17 16:49 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Borges Marcelo 2013-01-17 16:43:27 UTC
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"
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 16:46:46 UTC
Don't post to bugs like that, use attachements
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 16:49:19 UTC
Created attachment 335926 [details, diff]
Patch from Comment #0
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 16:52:12 UTC
+  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