问题
TL;RD Following http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Mac for Xcode what are the steps that let you add breakpoints/watches and correctly debug the executable on OS X?
My spec
Xcode Version 6.4 (6E35b)
OSX 10.10.4 (14E46)
CMake 3.3.0 GUI build with QT 4.8.6
The long description
I did follow the instructions so I set the scheme as suggested as for Xcode 5 (did let debug as default) but
- First time cmake fails because there is no
numpy
there is nonumpy
(release or debug) inside https://svn.blender.org/svnroot/bf-blender/trunk/lib/darwin-9.x.universal/python/lib/python3.4/ also from the console output munpy is searched on something like/Users/tyoc213/blender-build/blender/../lib/darwin-9.x.universal/python/lib/python3.4/python3.4/site-packages/numpy
also you can see that it search onpython3.4/python3.4
which is weird. - On the second run it says that it will skip
numpy
on install(ation). you can see the cmake output here https://gist.github.com/tyoc213/aea0fb541383dc06981a - So we now can generate Xcode project, we open the generated blender project with Xcode configure the scheme as on the dev-wiki and wait it fails at blinker step.
The only plausible fix for debug scheme is no fix at all, use release scheme
There is only one "fix" for compile&run for this and it is to change the scheme to Release, but even having checked Debug application
and that Xcode attach on start to the process, breakpoints don't work.
The debug scheme
So the problem in Debug scheme is this: How to build a blender build in Xcode 5? basically there are references from libbf_intern_cycles.a that are not found: _Controller_actuators_length
, _CurveMapping_curves_length
, _MeshColorLayer_data_length
, _MeshLoopColorLayer_data_length
, _MeshPaintMaskLayer_data_length
, _MeshPolygonFloatPropertyLayer_data_length
, _MeshPolygonIntPropertyLayer_data_length
, _MeshPolygonStringPropertyLayer_data_length
, _MeshSkinVertexLayer_data_length
, _MeshTextureFaceLayer_data_length
, _MeshTexturePolyLayer_data_length
, _MeshUVLoopLayer_data_length
, _MeshVertexFloatPropertyLayer_data_length
, _MeshVertexIntPropertyLayer_data_length
, _MeshVertexStringPropertyLayer_data_length
, _Sensor_controllers_length
, _Spline_points_length
this are ld: symbol(s) not found for architecture x86_64
Any suggestions in the correct setup for debug and put break points then do steps, threads with Xcode and watch variables and so on?.
回答1:
The only way for the moment that I have found to be able to put breakpoints in Xcode and do step by step, see locals and so on, is to disable cycles in CMake.
Maybe I should post this as an error in the build process at less for CMake, I don't know if I can build scons inside Xcode and debug it inside Xcode.
来源:https://stackoverflow.com/questions/31742978/building-blender-for-breakpoints-debug-in-xcode