[Bf-committers] Mac OS X debug symbols with scons

Richard Berry bf-committers@blender.org
Tue, 25 May 2004 18:31:46 +0100

I'm trying to get a Mac build with debug symbols turned on. From the =
SConstruct file it looks as though this is done by changing BUILD_BINARY =
from "release" to "debug".

I had to do this manually by changing BUILD_BINARY in config.opts. It =
looks as though it isn't possible to set this from the command line =
because SConstruct always overwrites this with:
	config.write ("BUILD_BINARY =3D 'release'\n")

Something for the scons people to look at?

In the end, I wasn't able to get a version with symbols in it, although =
the application was larger (8 MB compared to 5.5 MB). It looks as though =
debug symbols are turned on for most of the calls to gcc (using -g) but =
the final invocation of gcc doesn't have -g turned on. Does this matter?

Does gcc require extra flags for debug symbols when using Shark / OpenGL =

Also, does changing BUILD_BINARY to "debug" cause extra debug statements, =
assertions tests etc.? The binary that I was using seemed much slower =
(also crashed a few times but this may be due to poking it with OpenGL =
Profiler). For profiling purposes I think it would be good to have a =
"debugsymbols" option for BUILD_BINARY which would be the same as =
"release" but with debug symbols turned on. Looks as though this wouldn't =
be too hard to do in scons...

Oh, the final call to gcc is:

gcc -u __dummy -u _PyMac_Error -framework System -framework Python =
-framework CoreServices -framework Foundation -framework Carbon -framework =
AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio =
-framework QuickTime -o blender /Users/Rick/Desktop/projects/blender/build/=
darwin/source/creator/d_buildinfo.o -L/Users/Rick/Desktop/projects/blender/=
build/darwin/lib -Llib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.=
1-powerpc/freetype/lib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.=
1-powerpc/ftgl/lib -L/System/Library/Frameworks/Python.framework/Versions/2=
.3/lib/python2.3/config -L/Users/Rick/Desktop/projects/blender/lib/darwin-6=
.1-powerpc/sdl/lib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.1-po=
werpc/png/lib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.1-powerpc=
/jpeg/lib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.1-powerpc/get=
text/lib -L/Users/Rick/Desktop/projects/blender/lib/darwin-6.1-powerpc/open=
al/lib -L/System/Library/Frameworks/OpenGL.framework/Libraries -lblender_cr=
eator -lblender_render -lblender_yafray -lblender_blendersrc -lblender_rend=
erconverter -lblender_blenloader -lblender_readblenfile -lblender_img =
-lblender_radiosity -lblender_blenkernel -lblender_blenpluginapi -lblender_=
imbuf -lblender_avi -lblender_blenlib -lblender_makesdna -lblender_kernel =
-lblender_BSP -lblender_LOD -lblender_GHOST -lblender_STR -lblender_guarded=
alloc -lblender_BMF -lblender_CTR -lblender_MEM -lblender_IK -lblender_MT =
-lsoundsystem -lfreetype -lblender_FTF -lftgl -lfreetype -lblender_quicktim=
e -lKX_blenderhook -lKX_converter -lPHY_Dummy -lPHY_Physics -lKX_ketsji =
-lSCA_GameLogic -lRAS_rasterizer -lRAS_OpenGLRasterizer -lblender_expressio=
ns -lSG_SceneGraph -lblender_MT -lKX_blenderhook -lKX_network -lblender_ker=
nel -lNG_network -lNG_loopbacknetwork -lPHY_Sumo -lPHY_Physics -lblender_MT=
 -lextern_solid -lextern_qhull -lblender_python -lSDL -lpng -ljpeg -lintl =
-lz -lopenal -lstdc++ -lGL -lGLU

r i c k