Posted: Mon Oct 26, 2009 8:08 am
Joined: 25 Oct 2009
Posts: 2
Hi,
I have problems building blender.. I've tried go after tutor in
wiki but it doesn't work. I don't know blender from the source compilation side. What steps should I do to compile it properly?
I'm on Snow Leopard, with XCode installed with checked all options.
| Code: |
Oskar:blender oskar$ gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646)
|
This is my error output. http://pastebin.com/m403ef487
| Jens wrote: |
Hi
..almost done now.
I finished the patch for compiling all OSX-architectures including
new cocoa-stuff now. We should think about reorganizing the darwin-config.py, maybe setup the -arches more automatic, but due OSX is always multi-arch, this is a tricky task.
Here´s the patch and a user-config setup for 64bit-intel:
http://www.jensverwiebe.de/Blender/Blender25_64bit_stuff.zip
Be aware you have still to set -arch-flags depending on what platform and compiler you build ( default toolchain 64bit on SnowLeo but 32bit on other OSX ).
Don´t forget to checkout the new libs for darwin-9.x.universal in trunk.
Jens |
Posted: Mon Oct 26, 2009 8:19 pm
Joined: 26 Aug 2006
Posts: 51
dunno what you set up yourself, but log shows you try to compile carbon 64bit, which is not possibe.
Use my patch, btw latest:
http://www.jensverwiebe.de/Blender/Blender25_scons_cocoa_patch4.zip
patch with:
patch -p0 < OSX_cocoa_scons4.txt
and use the user-config as it is for 64bit_cocoa.
The new one has more automatism, up to you is to set :
WITH_GHOST_COCOA=True
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
other stuff up to you: omp, perhaps 10.6.sdk, whatever
Again: for 64bit , GHOST_COCOA=True is needed.
Jens
Posted: Mon Oct 26, 2009 9:10 pm
Joined: 25 Oct 2009
Posts: 2
I hadn't set anything myself. I've just followed wiki. Now I see the patching part and will try it when I will be on my mac tommorow.
Thanks for your quick reply.
And just a random thought - maybe you can update wiki page that low experience users (like me) won't run into trouble... It would be very helpfull.
Posted: Tue Oct 27, 2009 3:17 pm
Joined: 25 Oct 2009
Posts: 1
Thnx Jens,
nice one ...
... this solved my issues with building bf-2.5 osx ...
Posted: Wed Oct 28, 2009 6:45 am
Joined: 28 Oct 2009
Posts: 4
Hey,
I'm on a macbook pro 1st Gen- Intel Core Duo. I'm using that user-config.py and getting this error:
| Code: |
sh: /Users/ryan/bf-blender/B2.5-py3.1_cocoa_64_leo-build/darwin/makesdna: Bad CPU type in executable
scons: *** [/Users/ryan/bf-blender/B2.5-py3.1_cocoa_64_leo-build/darwin/source/blender/makesdna/intern/dna.c] Error 126
scons: building terminated because of errors. |
I'm guessing its trying to build 64 bit and my computer is 32. I've tried changing the arch type etc... but thats not helping. I'm using 10.6 Snow Leopard... Any advice?
Thanks
Posted: Wed Oct 28, 2009 2:46 pm
Joined: 26 Aug 2006
Posts: 51
Hi
You may have noticed i removed the patches and such.
It is all in trunk now !!!!!
Instructions:
WITH_GHOST_COCOA = True/False
MACOSX_ARCHITECTURE = 'arch' # valid archs: ppc, i386, ppc64, x86_64
..is the only decision to be done for out-of the box-compiling now.
All flags are set automatic by this, even right compiler.
Attention: PPC64 lib´s not ready yet
Jens
Posted: Wed Oct 28, 2009 4:23 pm
Joined: 28 Oct 2009
Posts: 4
Sorry if this is a dumb question but does this mean that there is a user-config.py in trunk that I can't find or that we don't need one? and if we don't need one which file do we edit to change those flags?
Posted: Wed Oct 28, 2009 6:10 pm
Joined: 26 Aug 2006
Posts: 51
| mp3man4 wrote: |
| Sorry if this is a dumb question but does this mean that there is a user-config.py in trunk that I can't find or that we don't need one? and if we don't need one which file do we edit to change those flags? |
If you read the darwin-config.py there is mentioned how to handle that.
| Quote: |
#
# Note : if you want to alter this file
# copy it as a whole in the upper folder
# as user-config.py
# dont create a new file with only some
# vars changed. |
Got it?
Jens
Posted: Wed Oct 28, 2009 7:53 pm
Joined: 28 Oct 2009
Posts: 4
In a way:) I understand where the trunk config file comes from and where I should be changing stuff now but it doesn't make it nearly as far along in the compile for me with that config file as it did with yours. Yours made it to a CPU error pretty far in, this one errors out right away with this message:
| Code: |
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'AUD_Buffer.cpp'
intern/audaspace/intern/AUD_Buffer.cpp:29:19: error: cstring: No such file or directory
intern/audaspace/intern/AUD_Buffer.cpp:30:20: error: stdlib.h: No such file or directory
intern/audaspace/intern/AUD_Buffer.cpp: In constructor ‘AUD_Buffer::AUD_Buffer(int)’:
intern/audaspace/intern/AUD_Buffer.cpp:37: error: ‘malloc’ was not declared in this scope
intern/audaspace/intern/AUD_Buffer.cpp: In destructor ‘AUD_Buffer::~AUD_Buffer()’:
intern/audaspace/intern/AUD_Buffer.cpp:42: error: ‘free’ was not declared in this scope
intern/audaspace/intern/AUD_Buffer.cpp: In member function ‘void AUD_Buffer::resize(int, bool)’:
intern/audaspace/intern/AUD_Buffer.cpp:57: error: ‘malloc’ was not declared in this scope
intern/audaspace/intern/AUD_Buffer.cpp:61: error: ‘memcpy’ was not declared in this scope
intern/audaspace/intern/AUD_Buffer.cpp:63: error: ‘free’ was not declared in this scope
scons: *** [/Users/ryan/bf-blender/build/darwin/intern/audaspace/intern/AUD_Buffer.o] Error 1
scons: building terminated because of errors. |
Posted: Wed Oct 28, 2009 9:26 pm
Joined: 26 Aug 2006
Posts: 51
Hi
From your errors it looks like you miss something essentially.
The needs:
- checkout blender trunk
- checkout libs, have the in the same dir as blender-source
( so the Blender-folder and Lib-folder are in the same level !!!)
-have xcode installed
- have scons installed
So starting without any user-config, it should give you an build:
i386 with cocoa using 10.5.sdk on you mashine ( default )
Here´s the clou now:
| Quote: |
| I'm on a macbook pro 1st Gen- Intel Core Duo. |
this limits you to 32bit ( i386 ) !
and:
| Quote: |
| sh: /Users/ryan/bf-blender/B2.5-py3.1_cocoa_64_leo-build/darwin/makesdna: Bad CPU type in executable |
this shows you used my older user-config, thats a nono !
Again:
Copy the darwin-config and rename to user-config and put it on top-dir
( blender, where also sconstruct resides )
Do you personal settings in this user-config, it overrides the other.
You should not mix my former one with actual trunk, cause we
moved switches.
Check if you got svn-conflicts if you had attached my patch formerly.
If so, delete the affected files and redo an svn update or do a new checkout.
If you still get errors try without -msse3 flags, iám not 100% sure
CoreDuo firstgen supports it.
Jens
Posted: Thu Oct 29, 2009 6:01 am
Joined: 28 Oct 2009
Posts: 4
Hey thanks for the comments they helped me figure it out. Because of my architecture, it was forcing me to build with 10.4 sdk (I only have 10.5 and 10.6 on my machine). By comparing it with your user-config which let me get past that part, I was able to narrow down and fix the problem. Many thanks:)
Posted: Sat Oct 31, 2009 5:23 pm
Joined: 31 Oct 2009
Posts: 1
| Jens wrote: |
The new one has more automatism, up to you is to set :
WITH_GHOST_COCOA=True
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
other stuff up to you: omp, perhaps 10.6.sdk, whatever
Again: for 64bit , GHOST_COCOA=True is needed.
Jens |
Thanks Jens for this tip - worked great for me. Finally I could render well known
images with Blender on OS X at all. Since it needed 3GB++ the 32-Bit Blender crashed.
http://www.flickr.com/photos/30073773@N03/sets/72157622576543279/
Greetings from southern Germany
Martin