Problems compiling Blender in Snow Leopard (scons)

Now i'm stucked in two problems since I installed MacOS X 10.6 Snow Leopard on my new MacBook Pro, I'm not an expert with OSX, so there's probably a very dumb solution for all of this...

Besides the problem with Blender which I'm going to talk about, I can't install the actual version of Plone CMS with the official OSX installer, it's a known issue and the Plone team is already working hard to fix it.

The problem I'm going to talk about is compiling Blender using scons (it's an actual requirement for Mechanical Blender) , this is what I got in my first try:

scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'creator.c'
cc1: error: unrecognized command line option "-Wno-long-double"
scons: *** [/Users/marc/Documents/Mechanic Blender/trunk/build/darwin/source/creator/creator.o] Error 1
scons: building terminated because of errors.

Then I realized that Snow Leopard uses gcc 4.2.1 by default, and there's no gcc_select anymore for switching to the old 4.0, so I changed the symbolic link with:

sudo ln -fs /usr/bin/gcc-4.0 /usr/bin/gcc

and then, the output was:

...
scons: done reading SConscript files.
scons: Building targets ...
scons: `release' is up to date.
compiling ==> 'creator.c'
source/creator/creator.c:29:20: error: stdlib.h: No such file or directory
source/creator/creator.c:30:20: error: string.h: No such file or directory
In file included from source/creator/creator.c:34:
intern/guardedalloc/MEM_guardedalloc.h:61:42: error: stdio.h: No such file or directory
In file included from intern/guardedalloc/MEM_guardedalloc.h:62,
from source/creator/creator.c:34:
... and so on

It seems that gcc can't find the standard libraries, here is where I'm completely lost because stdlib,h, string, stdio and the rest of the files are in /usr/include, I added this path into system's $PATH and didn't work either! my gcc 4.0 can't find the libraries and the problem is exactly the same.

Any idea?

scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'creator.c'
cc1: error: unrecognized command line option "-Wno-long-double"
scons: *** [/Users/marc/Documents/Mechanic Blender/trunk/build/darwin/source/creator/creator.o] Error 1
scons: building terminated because of errors.




One Response to “Problems compiling Blender in Snow Leopard (scons)”

  1. mauge Says:

    check this link: http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/2.5/Mac

Leave a Reply