Posted: Thu Sep 10, 2009 12:13 pm
Joined: 17 Oct 2002
Posts: 149
Hi, Blender doesn't want to build on osx 10.6. I'd appreciate all clues about what's going on.
Failing right from the beginning:
| Code: |
Configuring program blender
scons: done reading SConscript files.
scons: Building targets ...
Compiling ==> 'SND_DummyDevice.cpp'
cc1plus: error: unrecognized command line option "-Wno-long-double"
scons: *** [/Users/mats/svn/trunk/build/darwin/intern/SoundSystem/dummy/SND_DummyDevice.o] Error 1
scons: building terminated because of errors. |
Thanks all!
-mats
Posted: Thu Sep 10, 2009 6:26 pm
Joined: 05 Aug 2003
Posts: 3491
Assuming you made a user-config.py file, edit this line:
CC_WARN = ['-Wall', '-Wno-long-double']
to:
CC_WARN = ['-Wall']
Posted: Mon Sep 14, 2009 12:51 pm
Joined: 17 Oct 2002
Posts: 149
Thanks for that stiv, it worked fine.. except that it lead me to the next problem.
| Code: |
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/mats/svn/trunk/build/darwin/intern/audaspace/intern/AUD_Buffer.o] Error 1
scons: building terminated because of errors. |
Again, I've tried all sorts of things but can't seem to find what's wrong...
-mats
Posted: Mon Sep 14, 2009 7:04 pm
Joined: 05 Aug 2003
Posts: 3491
| Quote: |
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 |
Those are standard C/C++ headers
The compiler looks in some standard places places for those. Either your include paths are wrong or the compiler is not installed properly.
Seeing the entire command might help. Running scons BF_QUIET=0 is your friend here.
Knowing the compiler version might be interesting, too.
gcc --version
Posted: Mon Sep 14, 2009 8:32 pm
Joined: 17 Oct 2002
Posts: 149
With BF_QUIET=0 this comes up:
| Code: |
scons: done reading SConscript files.
scons: Building targets ...
g++ -o /Users/mats/svn/trunk/build/darwin/intern/audaspace/intern/AUD_Buffer.o -c -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -pipe -fPIC -funsigned-char -fpascal-strings -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -pipe -fPIC -funsigned-char -fpascal-strings -O2 -ftree-vectorize -msse -msse2 -msse3 -Wall -fpascal-strings -DWITH_SDL -I/Users/mats/svn/trunk/build/darwin/intern/audaspace -Iintern/audaspace -I/Users/mats/svn/trunk/build/darwin/intern/audaspace/intern -Iintern/audaspace/intern -I/Users/mats/svn/trunk/build/darwin/intern/audaspace/FX -Iintern/audaspace/FX -I/Users/mats/svn/trunk/build/darwin/intern/audaspace/SRC -Iintern/audaspace/SRC -I/Users/mats/svn/trunk/lib/darwin-8.x.i386/samplerate/include -I/Users/mats/svn/trunk/build/darwin/intern/audaspace/SDL -Iintern/audaspace/SDL -I/Users/mats/svn/trunk/lib/darwin-8.x.i386/sdl/include intern/audaspace/intern/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/mats/svn/trunk/build/darwin/intern/audaspace/intern/AUD_Buffer.o] Error 1
scons: building terminated because of errors. |
And here's what gcc --version shows:
| Code: |
| i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) |
And thanks again for your help
-mats
Posted: Tue Sep 15, 2009 8:41 am
Joined: 26 Aug 2006
Posts: 51
mats
If you use 10.4u.SDK it is mandatory to use gcc-4.0 !!
set: CC and CXX to gcc-4.0/g++-4.0
or
use gcc-4.0/g++-4.0 along with 10.5.SDK ( toolchain automatic 32bit )
or
Set SDK to 10.5 and gcc(-4.2) , but then you´ll have to add:
-m32 and -march=i386 to the c,cc ad linkflags, cause the standart-toolchain
for gcc-4.2 ( which is default now, symlinked !!! if you simply set gcc )
is 64bit now, which isn´t supported to build on OSX yet.
With -m32 and -march=i386 you define you are compiling 32bit-arch
on/for 32bit-mashine.
Jens
Posted: Tue Sep 15, 2009 8:55 am
Joined: 17 Oct 2002
Posts: 149
Humm.. under /Developer/SDKs/ I only have MacOSX10.5.sdk and MacOSX10.6.sdk. This is a clean osx 10.6 installation, and I installed the xcode tools that came with it (on the dvd). Why is it trying to use something 10.4?
On osx 10.5 building worked fine, so this seems to be a problem that was caused by 10.6, right? In that case many others should have the same problem.
Cheers,
-mats
Posted: Tue Sep 15, 2009 2:55 pm
Joined: 26 Aug 2006
Posts: 51
Just do as advised.
You missed simply to install 10.4u-sdk when installing xcode.
It is not default, just additional install for crosscompiling.
Use option 2:
Change config :
else:
MAC_MIN_VERS = '10.5'
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
and add the flags, no problem, just a change.
10.6 is now a mainsream 64bit OS !
10.5 a 64bit capable 32bit OS !
Jens
Posted: Wed Sep 16, 2009 8:29 am
Joined: 17 Oct 2002
Posts: 149
Ok.. now I got it to compile, but linking fails. The output is so long, I put it here:
http://www.pasteall.org/7919
-mats
Posted: Wed Sep 16, 2009 10:39 pm
Joined: 26 Aug 2006
Posts: 51
Hey
Take simply my config -->
http://www.jensverwiebe.de/temp/user-config.py.zip
Put it in maindir of trunk.
Edit: removed broken trunk note, all fine again, just built B 2.5
Jens
Posted: Sun Sep 20, 2009 2:38 pm
Joined: 16 Oct 2002
Posts: 53
I wanted to make a note:
I couldn't get this building with the SVN tree as of the 19th of September-- things failed for me at the OpenEXR libs during the link phase. Other people have had the issue and turned EXR off in their user configs, but I wanted EXRs.
For anyone who wants to get this working, I recommend installing OpenEXR through MacPorts. It installs a metric boatload of unnecessary stuff with it, but if you change the directories in the user_setup.py above it'll work.
_________________
- Charles
http://www.sugarandcyanide.com/
Posted: Tue Oct 20, 2009 5:38 pm
Joined: 20 Oct 2009
Posts: 1
Jens,
Would you mind re-posting that user-config? I'm interesting in trying to tinker and maybe put together a fairly robust darwin user-config.py. I'm good with python and know the Mac platform pretty well, but the intricacies of gcc flags is a little beyond me.
Thanks for any help you can give!
Eric
Posted: Tue Oct 20, 2009 6:43 pm
Joined: 26 Aug 2006
Posts: 51
Wait a few days, i haven´t finished the new adaptions for scons yet.
I´ve put together now:
-64bit capable ( universal), libs ( in trunk )
-patch for building with cocoa
-user-config prepared for 10.5sdk
TODO:
-setup a choice for OSX_ARCHITECTURE in scons for unzipping
the right arch only ( saving diskspace not having all python-modules
multiarch in app-package )
If you wanna help us with that, visit us at IRC #blendercoders
Jens
| ibis wrote: |
Jens,
Would you mind re-posting that user-config? I'm interesting in trying to tinker and maybe put together a fairly robust darwin user-config.py. I'm good with python and know the Mac platform pretty well, but the intricacies of gcc flags is a little beyond me.
Thanks for any help you can give!
Eric
|
Posted: Wed Oct 21, 2009 4:43 pm
Joined: 26 Aug 2006
Posts: 51
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: Fri Oct 23, 2009 4:28 am
Joined: 02 Jul 2004
Posts: 5
Hi Jens,
Thanks for your recent patch. It Works For Me (TM) - OS X 10.6; default XCode install, etc. I was having a few problems prior to this, so thanks heaps for working on it!
Jonathan Merritt.