Building out of XCode possible? OSX / solved: scons instead
Moderators: jesterKing, stiv
Building out of XCode possible? OSX / solved: scons instead
Hi
To be able to checkout the newest development i would
like to have blender as an xcode-projekt.
But when trying to compile, i hit some strange problems.
Is it generally possible to use xcode and gcc 4 ?
Does someone have some tips ?
Would be nice to use this easy to handle apple-dev-tools.
Greetz...Jens
To be able to checkout the newest development i would
like to have blender as an xcode-projekt.
But when trying to compile, i hit some strange problems.
Is it generally possible to use xcode and gcc 4 ?
Does someone have some tips ?
Would be nice to use this easy to handle apple-dev-tools.
Greetz...Jens
Last edited by Jens on Fri Jul 13, 2007 12:19 am, edited 1 time in total.
Hi Stiv
First of all, after reading a lot about compiling blender, i was not sure
if i can use xcode in generally.
This is my first attempt, so i downloaded the bf 2.44 and the libs to
checkout if it works. Just to compile a working source with nothing
experimental in it.
I started the xcode-project and tried to build out of the box, got some
warnings and errors:
Seems i have to get much more expriences with xcode and handling
of the source, iám a newbee in that.
I don´t want to bore the experienced coders here, just a hint would do.
My aim is to have actual builds for OSX-Intel/PPC too, because the most
people seem to work on Linux- or Windows-Builds.
Thanks...Jens
First of all, after reading a lot about compiling blender, i was not sure
if i can use xcode in generally.
This is my first attempt, so i downloaded the bf 2.44 and the libs to
checkout if it works. Just to compile a working source with nothing
experimental in it.
I started the xcode-project and tried to build out of the box, got some
warnings and errors:
I checked the files but they are there.makesdna.c:1: warning: -mdynamic-no-pic overrides -fpic or -fPIC
makesdna.c:846: warning: no previous prototype for 'make_structDNA'
makesdna.c:1145: error: DNA_brush_types.h: No such file or directory
makesdna.c:1145: error: DNA_brush_types.h: No such file or directory
Seems i have to get much more expriences with xcode and handling
of the source, iám a newbee in that.
I don´t want to bore the experienced coders here, just a hint would do.
My aim is to have actual builds for OSX-Intel/PPC too, because the most
people seem to work on Linux- or Windows-Builds.
Thanks...Jens
Hi all
Yes, it is unsatisfying.
I did an "cmake -G "xcode" ../blender "first to have the xcode projektfiles.
Found out xcode must have "" around.
But the result is not working.
There must be a better way.
My hope was to have os-specific optimisation more easy with xcode,
´cause it is very tricky to set the right flags.
The different build-how-to´s are not clear to me, so it need´s more
investigation.
If someone did the trick for OSX-i386. please share the results to us.
In the meantime, i will try to contact devroo, who did working builds
at GRAFICALL.
I won´t give up yet, will post my results later.
Edit:
With the most appreciated help of devroo, who guided me through the
whole build-process, i managed to get a working build with new particles.
More info to come, if someone is interested.
Greetz...Jens
Yes, it is unsatisfying.
I did an "cmake -G "xcode" ../blender "first to have the xcode projektfiles.
Found out xcode must have "" around.
But the result is not working.
There must be a better way.
My hope was to have os-specific optimisation more easy with xcode,
´cause it is very tricky to set the right flags.
The different build-how-to´s are not clear to me, so it need´s more
investigation.
If someone did the trick for OSX-i386. please share the results to us.
In the meantime, i will try to contact devroo, who did working builds
at GRAFICALL.
I won´t give up yet, will post my results later.
Edit:
With the most appreciated help of devroo, who guided me through the
whole build-process, i managed to get a working build with new particles.
More info to come, if someone is interested.
Greetz...Jens
Hi william
I will do a hole description in time, now just the short version.
1. Install Appel-Dev-Tools from DVD or download.
2. Get SVN: http://downloads.open.collab.net/binaries.html
it is a binary, so no prob.Installs at: /usr/local/bin/svn
2a. Get scons, has to be compiled on Mac too.
http://www.scons.org/download.php
Compile and install with: setup.py install
3. Get the blender source libs, put it into a Blender-dev folder you created.
4. In terminal, go to this newly crated folder with lib-filder in and type:
/usr/local/bin/svn checkout https://svn.blender.org/svnroot/bf-blen ... nches/xxx/
where xxx is the wanted branch like "particles" for example.( will go on with it)
5. In finder, go to folder particles/config and open darwin-config.py
with an editor ( textedit will do). Change th first line so that it points to
the needed lib : LCGDIR = '#../lib/darwin-8.9.1-i386' (example)
Find the lines with: openAL, ffmpg, player an set variables to "false",
change iconv line from false to true.
5a.. Change Python lines to what you have ( 2.3 is preinstalled )
BF_PYTHON_VERSION = '2.3'
if BF_PYTHON_VERSION=='2.3':
6. in terminal go into particles directory and type: /Library/Frameworks/Python.framework/Versions/2.3/bin/scons.
7. maybe you have to get openEXR too: openexr-1.4.0a.tar.gz
just extract then ./configure and then sudo make install.
compile again.
This should work, try and report back.
Dunno how experienced you are, but we can work problems out.
If needed, we can do AIM-Chat.
Greetz..Jens
I will do a hole description in time, now just the short version.
1. Install Appel-Dev-Tools from DVD or download.
2. Get SVN: http://downloads.open.collab.net/binaries.html
it is a binary, so no prob.Installs at: /usr/local/bin/svn
2a. Get scons, has to be compiled on Mac too.
http://www.scons.org/download.php
Compile and install with: setup.py install
3. Get the blender source libs, put it into a Blender-dev folder you created.
4. In terminal, go to this newly crated folder with lib-filder in and type:
/usr/local/bin/svn checkout https://svn.blender.org/svnroot/bf-blen ... nches/xxx/
where xxx is the wanted branch like "particles" for example.( will go on with it)
5. In finder, go to folder particles/config and open darwin-config.py
with an editor ( textedit will do). Change th first line so that it points to
the needed lib : LCGDIR = '#../lib/darwin-8.9.1-i386' (example)
Find the lines with: openAL, ffmpg, player an set variables to "false",
change iconv line from false to true.
5a.. Change Python lines to what you have ( 2.3 is preinstalled )
BF_PYTHON_VERSION = '2.3'
if BF_PYTHON_VERSION=='2.3':
6. in terminal go into particles directory and type: /Library/Frameworks/Python.framework/Versions/2.3/bin/scons.
7. maybe you have to get openEXR too: openexr-1.4.0a.tar.gz
just extract then ./configure and then sudo make install.
compile again.
This should work, try and report back.
Dunno how experienced you are, but we can work problems out.
If needed, we can do AIM-Chat.
Greetz..Jens
Thanks a million Jens. Very nice of you.
I did run into some problems though:
I installed Python 2.5 and so I found it logical that I should type
/Library/Frameworks/Python.framework/Versions/2.5/bin/scons
to build. However there seems to be no such directory.
So I went back to the config file and changed the Python variable back to 2.3. (Is this possible? to build with an older version number than is installed?)
Anyway, when I type /System/Library/Frameworks/Python.framework/Versions/Current/bin/scons
to build I get the following errors:
Sorry for the long text. Any ideas?
Cheers
I did run into some problems though:
I installed Python 2.5 and so I found it logical that I should type
/Library/Frameworks/Python.framework/Versions/2.5/bin/scons
to build. However there seems to be no such directory.
So I went back to the config file and changed the Python variable back to 2.3. (Is this possible? to build with an older version number than is installed?)
Anyway, when I type /System/Library/Frameworks/Python.framework/Versions/Current/bin/scons
to build I get the following errors:
Code: Select all
Compiling ==> 'utilities.cpp'
intern/elbeem/intern/utilities.cpp:28:17: error: png.h: No such file or directory
intern/elbeem/intern/utilities.cpp: In function 'int writePng(const char*, unsigned char**, int, int)':
intern/elbeem/intern/utilities.cpp:134: error: 'PNG_COLOR_TYPE_RGBA' was not declared in this scope
intern/elbeem/intern/utilities.cpp:136: error: 'png_structp' was not declared in this scope
intern/elbeem/intern/utilities.cpp:136: error: expected `;' before 'png_ptr'
intern/elbeem/intern/utilities.cpp:137: error: 'png_infop' was not declared in this scope
intern/elbeem/intern/utilities.cpp:137: error: expected `;' before 'info_ptr'
intern/elbeem/intern/utilities.cpp:138: error: 'png_bytep' was not declared in this scope
intern/elbeem/intern/utilities.cpp:138: error: 'rows' was not declared in this scope
intern/elbeem/intern/utilities.cpp:145: error: 'png_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:147: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
intern/elbeem/intern/utilities.cpp:147: error: 'png_create_write_struct' was not declared in this scope
intern/elbeem/intern/utilities.cpp:149: error: 'info_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:151: error: 'png_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:151: error: 'png_create_info_struct' was not declared in this scope
intern/elbeem/intern/utilities.cpp:154: error: 'png_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:154: error: 'png_jmpbuf' was not declared in this scope
intern/elbeem/intern/utilities.cpp:154: error: 'setjmp' was not declared in this scope
intern/elbeem/intern/utilities.cpp:156: error: 'png_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:156: error: 'png_init_io' was not declared in this scope
intern/elbeem/intern/utilities.cpp:158: error: 'info_ptr' was not declared in this scope
intern/elbeem/intern/utilities.cpp:158: error: 'PNG_INTERLACE_NONE' was not declared in this scope
intern/elbeem/intern/utilities.cpp:159: error: 'PNG_COMPRESSION_TYPE_BASE' was not declared in this scope
intern/elbeem/intern/utilities.cpp:159: error: 'PNG_FILTER_TYPE_BASE' was not declared in this scope
intern/elbeem/intern/utilities.cpp:159: error: 'png_set_IHDR' was not declared in this scope
intern/elbeem/intern/utilities.cpp:161: error: 'png_write_info' was not declared in this scope
intern/elbeem/intern/utilities.cpp:163: error: 'png_write_image' was not declared in this scope
intern/elbeem/intern/utilities.cpp:165: error: 'png_write_end' was not declared in this scope
intern/elbeem/intern/utilities.cpp:167: error: 'png_destroy_write_struct' was not declared in this scope
scons: *** [/Users/William/Blender-dev/build/darwin/intern/elbeem/intern/utilities.o] Error 1
scons: building terminated because of errors.
Cheers
Hm, unsure what happend there, seems missing lib´s.
You have all the libs? They are not a part of the branch !!!!
/usr/local/bin/svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/
That contains: freetype, gettext, jpeg, openal, openexr, png, sdl, tiff,
and is nearly 300MB.
Did you exaccly matched the foldername in line 1 of darwinconfig.py.?
Could be different, mine is : darwin-8.x.i386
so the line reads: LCGDIR = '#../lib/darwin-8.x.i386'
I have python 2.5 too, so scons is located after intsall in:
/Library/Frameworks/Python.framework/Versions/2.5/bin.
Thats the default anyway:
I will check the next hours, if you are there...
Greetz...Jens
You have all the libs? They are not a part of the branch !!!!
/usr/local/bin/svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/
That contains: freetype, gettext, jpeg, openal, openexr, png, sdl, tiff,
and is nearly 300MB.
Did you exaccly matched the foldername in line 1 of darwinconfig.py.?
Could be different, mine is : darwin-8.x.i386
so the line reads: LCGDIR = '#../lib/darwin-8.x.i386'
I have python 2.5 too, so scons is located after intsall in:
/Library/Frameworks/Python.framework/Versions/2.5/bin.
Thats the default anyway:
maybe we should contact directly: AIM : rikijensi# python.org libs install in /library
BF_PYTHON_VERSION = '2.5'
if BF_PYTHON_VERSION=='2.5':
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
else:
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
I will check the next hours, if you are there...
Greetz...Jens
Last edited by Jens on Sun Jul 15, 2007 9:58 pm, edited 2 times in total.
Jens: Oh, thanks again, sorry I was not online yesterday.
One thing is strange on my system. There is no '2.5' directiry in /System/Library/Frameworks/Python.framework/Versions/
I installed the precompiled os x distribution of Python, and I do have the MacPython 2.5 directory in /Applications/. Hmm..
Is this maybe because I installed scons before Python 2.5?
Oh, and I do have the darwin-8.x.i386 lib folder in my Blender-dev directory together with my source folder.
Stiv: Thanks for the tip. However, I am unsure how to get the header files?
Thanks alot.
One thing is strange on my system. There is no '2.5' directiry in /System/Library/Frameworks/Python.framework/Versions/
I installed the precompiled os x distribution of Python, and I do have the MacPython 2.5 directory in /Applications/. Hmm..
Is this maybe because I installed scons before Python 2.5?
Oh, and I do have the darwin-8.x.i386 lib folder in my Blender-dev directory together with my source folder.
Stiv: Thanks for the tip. However, I am unsure how to get the header files?
Thanks alot.
Hm
I installed other Python versions first, they reside :
/Library/Frameworks/Python.framework/Versions/
There is 2.4 + 2.5 and current, which points to 2.5
in my case. There is my scons also.
In:/System/Library/Frameworks/Python.framework/Versions/
there is 2.3 and current, that points to 2.3.
Maybe it´s muddled ore osx-alike.
Type "python" in terminal
it should say 2.5 is the active version.
Important note :
When having python 2.5 intalled parallel to old 2.3, i found out
it´s the best way to us this in script to avoid mismatch errors later:
So only library ( not system/library ) directory is searched !!!
The Programs are o.k. in App-locacation. The are frontends.
Header-files are in lib, so should be o.k.
Do a spotlight-search to find scons.
Jens
I installed other Python versions first, they reside :
/Library/Frameworks/Python.framework/Versions/
There is 2.4 + 2.5 and current, which points to 2.5
in my case. There is my scons also.
In:/System/Library/Frameworks/Python.framework/Versions/
there is 2.3 and current, that points to 2.3.
Maybe it´s muddled ore osx-alike.
Type "python" in terminal
it should say 2.5 is the active version.
Important note :
When having python 2.5 intalled parallel to old 2.3, i found out
it´s the best way to us this in script to avoid mismatch errors later:
# python.org libs install in /library
BF_PYTHON_VERSION = '2.5'
if BF_PYTHON_VERSION=='2.5':
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
else:
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
So only library ( not system/library ) directory is searched !!!
The Programs are o.k. in App-locacation. The are frontends.
Header-files are in lib, so should be o.k.
Do a spotlight-search to find scons.
Jens
Hah, finally!
Got the beast to compile!
I was a bit confused by the different libraries in os x.
I didn't have a scons file in /Library/Frameworks/Python.framework/Versions/2.5/bin but solved it by installing scons again, after Python 2.5.
Typing Python in terminal correctly says it's 2.5.1
Thanks for all the help, and I truly support your idea about writing a good guide for other OS X'ers to refer to.
Cheers
Got the beast to compile!
I was a bit confused by the different libraries in os x.
I didn't have a scons file in /Library/Frameworks/Python.framework/Versions/2.5/bin but solved it by installing scons again, after Python 2.5.
Typing Python in terminal correctly says it's 2.5.1
Thanks for all the help, and I truly support your idea about writing a good guide for other OS X'ers to refer to.
Cheers
I compile with XCode.
Steps to success:
read
https://svn.blender.org/svnroot/bf-blen ... -cmake.txt
* install dependencies
* run cmake -G "Xcode" ........sourcepath.......
* use ccmake "GUI" to configure your paths:
ccmake ....sourcepath....
* open Blender.xcodeproj
* select a target, e.g. "Release"
* build
I have a problem with alut so I set the path manually, in my
case /Users/stephan/blender/lib/darwin-8.x.i386/openal/include/AL/alut.h
(Either in the project or brute-force in the source-file intern/SoundSystem/openal/SND_OpenALDevice.cpp ) .
Steps to success:
read
https://svn.blender.org/svnroot/bf-blen ... -cmake.txt
* install dependencies
* run cmake -G "Xcode" ........sourcepath.......
* use ccmake "GUI" to configure your paths:
ccmake ....sourcepath....
* open Blender.xcodeproj
* select a target, e.g. "Release"
* build
I have a problem with alut so I set the path manually, in my
case /Users/stephan/blender/lib/darwin-8.x.i386/openal/include/AL/alut.h
(Either in the project or brute-force in the source-file intern/SoundSystem/openal/SND_OpenALDevice.cpp ) .