[Bf-committers] iTaSC merge

Jasper Mine jaspermine at ptd.net
Fri Sep 25 04:58:32 CEST 2009


Hello,

I look forward to checking this out.   And as far as I know osx does  
not require malloc.h so below I copy and pasted some ways blender  
deals with osx malloc.h

g++ -c -DUSE_BULLET -pipe -fPIC  -funsigned-char -fno-strict-aliasing - 
DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align - 
Wredundant-decls  -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor - 
Woverloaded-virtual -Wsign-promo -Wsynth  -D_THREAD_SAFE -I/Users/ 
jsplifer/Documents/Development/Blender/blender/../lib/darwin-9.8.0- 
i386/moto/include -I/Users/jsplifer/Documents/Development/Blender/ 
blender/../lib/darwin-9.8.0-i386/memutil/include IK_QTask.cpp -o / 
Users/jsplifer/Documents/Development/Blender/blender/obj/darwin-9.8.0- 
i386/intern/iksolver/IK_QTask.o
cd /Users/jsplifer/Documents/Development/Blender/blender/obj/ 
darwin-9.8.0-i386/intern/iksolver/; ar ruv /Users/jsplifer/Documents/ 
Development/Blender/blender/obj/darwin-9.8.0-i386/intern/iksolver/ 
libiksolver.a   IK_QJacobianSolver.o IK_QSegment.o IK_Solver.o  
IK_QJacobian.o IK_QTask.o
ar: creating archive /Users/jsplifer/Documents/Development/Blender/ 
blender/obj/darwin-9.8.0-i386/intern/iksolver/libiksolver.a
a - IK_QJacobianSolver.o
a - IK_QSegment.o
a - IK_Solver.o
a - IK_QJacobian.o
a - IK_QTask.o
ranlib /Users/jsplifer/Documents/Development/Blender/blender/obj/ 
darwin-9.8.0-i386/intern/iksolver/libiksolver.a
     install /Users/jsplifer/Documents/Development/Blender/blender/obj/ 
darwin-9.8.0-i386/intern/iksolver/libiksolver.a
ranlib /Users/jsplifer/Documents/Development/Blender/blender/../lib/ 
darwin-9.8.0-i386/iksolver/lib/libiksolver.a
     IK_solver.h already installed
====> make all in intern/itasc
g++ -c -DUSE_BULLET -pipe -fPIC  -funsigned-char -fno-strict-aliasing - 
DNDEBUG  -D_THREAD_SAFE -I. -I../../extern/Eigen2 Armature.cpp -o / 
Users/jsplifer/Documents/Development/Blender/blender/obj/darwin-9.8.0- 
i386/intern//Armature.o
Armature.cpp:10:20: error: malloc.h: No such file or directory
make[2]: *** [/Users/jsplifer/Documents/Development/Blender/blender/ 
obj/darwin-9.8.0-i386/intern//Armature.o] Error 1
make[1]: *** [all] Error 1


Some of the code in blender deals with malloc.h in the way:

In storage.c
#if !defined(__FreeBSD__) && !defined(__APPLE__)
#include <malloc.h>
#endif

In mem.c
#if HAVE_MALLOC_H
#include <malloc.h>

In common.c
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif

In util.h
/*
#ifndef __STDC__
#include <malloc.h>
#endif
*/

In opj.malloc.h
#ifdef WIN32
	/* Someone should tell the mingw people that their malloc.h ought to  
provide _mm_malloc() */
	#ifdef __GNUC__
		#include <mm_malloc.h>
		#define HAVE_MM_MALLOC
	#else /* MSVC, Intel C++ */
		#include <malloc.h>
		#ifdef _mm_malloc
			#define HAVE_MM_MALLOC
		#endif
	#endif
#else /* Not WIN32 */
	#if defined(__sun)
			#define HAVE_MEMALIGN
		#elif defined(__GNUC__)
                         #ifndef __APPLE__
			    #define HAVE_MEMALIGN
			    #include <malloc.h>
                         #endif
		/* Linux x86_64 and OSX always align allocations to 16 bytes */
		#elif !defined(__amd64__) && !defined(__APPLE__)	
			/* FIXME: Yes, this is a big assumption */
			#define HAVE_POSIX_MEMALIGN
	#endif
#endif



On Sep 24, 2009, at 6:15 PM, Benoit Bolsee wrote:

> Hi,
>
> I've finally merged the iTaSC branch to trunk. I tested scons and  
> cmake
> under Windows and Linux. I didn't test OSX or mingw. Makefiles are
> updated but not tested. I'll be around on irc in the coming days to  
> help
> sorting any compilation problems that will surely come up. I'll work  
> on
> updating the wiki with usage information on itasc.



More information about the Bf-committers mailing list