Stuck wrapping OgreNewt for Mac OSX


21-05-2008 05:32:18

So I'm trying to wrap up newt for a Mac build of my current project and I'm in a bit over my head.

What I've done:
Attempted building normally using for "newton ogrenewt". This fails due to a missing Ogre.pc file, my understanding is that Ogre doesn't support this type of building on a Mac, you have to use XCode.

So now I've build newton using an XCode project I found on the OgreNewt forums. I've built it and got my .a file but now I'm not sure what I need to do in order to wrap this up. When I attempt the wrapping step of BuildModule I get an error looking for a .../include/OgreNewt folder. What should be in this folder? I'm assuming I can manually fill it in using the XCode project and hopefully pick up where I left off. I've attempted to pull in all of the .h files from the OgreNewt project and rerun the wrapper building but I'm getting the below error now. I'm not sure where to go now, I should have CoreFoundation

Any help with this would be appreciated. I'm fairly new to building from source so I may be totally screwing this up. I've already tried dressing up like the guy on the Mac commercial, sadly that didn't help...

05-20 21:25 PythonOgre.BuildModule INFO Building Source code for ogrenewt
05-20 21:25 PythonOgre.BuildModule DEBUG Spawning 'python' in '/Users/teamtwentythree/development/python-ogre/code_generators/ogrenewt'
05-20 21:25 PythonOgre.BuildModule WARNING Task Failed
05-20 21:25 PythonOgre.BuildModule DEBUG
05-20 21:25 PythonOgre.BuildModule DEBUG INFO Creating xml file "/Users/teamtwentythree/development/python-ogre/code_generators/cache/ogrenewt_1.0_cache.xml" from source file "/Users/teamtwentythree/development/python-ogre/code_generators/ogrenewt/python_ogrenewt.h" ...
INFO gccxml cmd: /Users/teamtwentythree/development/root/usr/bin/gccxml -I"/Users/teamtwentythree/development/python-ogre" -I"/Users/teamtwentythree/development/root/usr/include/boost-1_34_1" -I"/Users/teamtwentythree/development/newtonSDK/sdk" -I"/Users/teamtwentythree/development/ogrenew/OgreMain/include" -I"/Users/teamtwentythree/development/root/usr/include/OgreNewt" -I"/Users/teamtwentythree/development/ogrenew/Dependencies/include" -I"/Developer/SDKs/MacOSX10.5.sdk/Developer/Headers/FlatCarbon" -D"ogrenewt_NONCLIENT_BUILD" -D"OGRE_NONCLIENT_BUILD" -D"OIS_NONCLIENT_BUILD" -D"OIS_STATIC_BUILD" "/Users/teamtwentythree/development/python-ogre/code_generators/ogrenewt/python_ogrenewt.h" -fxml="/Users/teamtwentythree/development/python-ogre/code_generators/cache/ogrenewt_1.0_cache.xml"
Traceback (most recent call last):
File "", line 286, in <module>
File "", line 218, in generate_ogrenewt
, indexing_suite_version=2 )
File "/Users/teamtwentythree/development/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/", line 90, in __init__
, indexing_suite_version)
File "/Users/teamtwentythree/development/root/usr/lib/python2.5/site-packages/pyplusplus/module_builder/", line 144, in __parse_declarations
decls = reader.read_files( files, compilation_mode )
File "/Users/teamtwentythree/development/root/usr/lib/python2.5/site-packages/pygccxml/parser/", line 225, in read_files
return self.__parse_file_by_file(files)
File "/Users/teamtwentythree/development/root/usr/lib/python2.5/site-packages/pygccxml/parser/", line 262, in __parse_file_by_file
reader.create_xml_file( header, prj_file.cached_source_file )
File "/Users/teamtwentythree/development/root/usr/lib/python2.5/site-packages/pygccxml/parser/", line 169, in create_xml_file
raise error
pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while running GCC-XML: In file included from /Users/teamtwentythree/development/ogrenew/OgreMain/include/OgreMemoryManager.h:46,
from /Users/teamtwentythree/development/ogrenew/OgreMain/include/OgrePrerequisites.h:87,
from /Users/teamtwentythree/development/ogrenew/OgreMain/include/Ogre.h:32,
from /Users/teamtwentythree/development/root/usr/include/OgreNewt/OgreNewt_World.h:14,
from /Users/teamtwentythree/development/root/usr/include/OgreNewt/OgreNewt.h:23,
from /Users/teamtwentythree/development/python-ogre/code_generators/ogrenewt/python_ogrenewt.h:5:
/Users/teamtwentythree/development/ogrenew/OgreMain/include/OgreStdHeaders.h:91:46: error: CoreFoundation/CoreFoundation.h: No such file or directory


22-05-2008 05:38:02

Ahh, I remember that. You have some GCC-XML flags wrong if I remember correctly. You should have an "sysroot" somewhere in there. That setting is in, but it appears its not taking effect.


23-05-2008 07:31:13

Hmm, still a no go for me. I'll have to play with this more over the weekend.


24-05-2008 06:15:25

Ok, so now that miraculously working for no apparent reason, but I'm hitting yet another issue. G++ mentions that its unable to find the Newton library. But I have the libnewton32.a (And two other libnewton files) file in the -L path below (Which is triplicated for some reason).

05-23 21:31 PythonOgre.BuildModule INFO Compiling Source code for ogrenewt
05-23 21:31 PythonOgre.BuildModule DEBUG Spawning 'scons PROJECTS=ogrenewt' in '/Users/teamtwentythree/development/python-ogre'
05-23 21:31 PythonOgre.BuildModule WARNING Task Failed
05-23 21:31 PythonOgre.BuildModule DEBUG scons: Reading SConscript files ...
Building ogrenewt
WARNING: Over-Writing /Users/teamtwentythree/development/python-ogre/generated/ogrenewt_1.0/SConscript as it already exists
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build_dir_2.5/ogrenewt_1.0/ogrenewt -Wl,-x -framework Python -framework Ogre -framework Carbon -F/Users/teamtwentythree/Library/Frameworks -bundle build_dir_2.5/ogrenewt_1.0/BallAndSocket.pypp.os build_dir_2.5/ogrenewt_1.0/BasicFrameListener.pypp.os build_dir_2.5/ogrenewt_1.0/BasicRaycast.pypp.os build_dir_2.5/ogrenewt_1.0/Body.pypp.os build_dir_2.5/ogrenewt_1.0/BodyIterator.pypp.os build_dir_2.5/ogrenewt_1.0/Box.pypp.os build_dir_2.5/ogrenewt_1.0/Capsule.pypp.os build_dir_2.5/ogrenewt_1.0/ChamferCylinder.pypp.os build_dir_2.5/ogrenewt_1.0/Collision.pypp.os build_dir_2.5/ogrenewt_1.0/CompoundCollision.pypp.os build_dir_2.5/ogrenewt_1.0/Cone.pypp.os build_dir_2.5/ogrenewt_1.0/ContactCallback.pypp.os build_dir_2.5/ogrenewt_1.0/ConvexCollision.pypp.os build_dir_2.5/ogrenewt_1.0/ConvexHull.pypp.os build_dir_2.5/ogrenewt_1.0/ConvexModifierCollision.pypp.os build_dir_2.5/ogrenewt_1.0/Custom2DJoint.pypp.os build_dir_2.5/ogrenewt_1.0/CustomGearJoint.pypp.os build_dir_2.5/ogrenewt_1.0/CustomJoint.pypp.os build_dir_2.5/ogrenewt_1.0/CustomPulleyJoint.pypp.os build_dir_2.5/ogrenewt_1.0/CustomRigidJoint.pypp.os build_dir_2.5/ogrenewt_1.0/Cylinder.pypp.os build_dir_2.5/ogrenewt_1.0/Debugger.pypp.os build_dir_2.5/ogrenewt_1.0/Ellipsoid.pypp.os build_dir_2.5/ogrenewt_1.0/Hinge.pypp.os build_dir_2.5/ogrenewt_1.0/Joint.pypp.os build_dir_2.5/ogrenewt_1.0/MaterialID.pypp.os build_dir_2.5/ogrenewt_1.0/MaterialPair.pypp.os build_dir_2.5/ogrenewt_1.0/Null.pypp.os build_dir_2.5/ogrenewt_1.0/Pyramid.pypp.os build_dir_2.5/ogrenewt_1.0/Raycast.pypp.os build_dir_2.5/ogrenewt_1.0/Slider.pypp.os build_dir_2.5/ogrenewt_1.0/TreeCollision.pypp.os build_dir_2.5/ogrenewt_1.0/TreeCollisionSceneParser.pypp.os build_dir_2.5/ogrenewt_1.0/TreeCollisionSerializer.pypp.os build_dir_2.5/ogrenewt_1.0/Universal.pypp.os build_dir_2.5/ogrenewt_1.0/UpVector.pypp.os build_dir_2.5/ogrenewt_1.0/VectorofCollision.pypp.os build_dir_2.5/ogrenewt_1.0/Vehicle.pypp.os build_dir_2.5/ogrenewt_1.0/World.pypp.os build_dir_2.5/ogrenewt_1.0/_ogrenewt_.main.os build_dir_2.5/ogrenewt_1.0/_ogrenewt__enumerations.pypp.os build_dir_2.5/ogrenewt_1.0/_ogrenewt__free_functions.pypp.os -L/Users/teamtwentythree/development/root/usr/lib -L/Users/teamtwentythree/development/root/usr/lib -L/Users/teamtwentythree/development/root/usr/lib -L/Users/teamtwentythree/development/ogrenew/OgreMain/lib/Release -lNewton -lboost_python-1_34_1 -lOgreNewt
scons: building terminated because of errors.

05-23 21:31 PythonOgre.BuildModule DEBUG ld: library not found for -lNewton
collect2: ld returned 1 exit status
scons: *** [build_dir_2.5/ogrenewt_1.0/ogrenewt] Error 1


26-05-2008 21:07:32

So the CoreFoundation error appeared to go away on reboot. I then had to add the ois lib to and now I've got newton wrapped and running in the Python-Ogre examples.

Now onto CEGUI, bleh...


28-05-2008 23:48:31

I don't think I'll be using Newton with Python-Ogre, but I do think it's invaluable to have information like this on the forum so that it can be easily referred to if me or anyone else were to need it. Even though we all may be lurking, it doesn't mean that nobody's watching. Write down your results while they're still on your mind.

Keep up the good work! :)


08-02-2009 00:52:38

I have gotten OgreNewt on Mac OS X partially working. It required a crap ton of fighting with things but know some of the demos run. The only issue is that nothing in the demos actually collides. Does anyone know why that would happen? (Same setup on Linux handles collisions just fine)


08-02-2009 02:50:11

I did some work on this with the latest PythonOgre build (mac support is MUCH better and builds fairly well)... I haven't put this in the SVN yet but will do so over the next day..

Basically I used generate_code to copy all the OgreNewt source into the generated directory and let scons compile it all... I'm thinking about doing this OgreODE as it just makes things simpler...

Will confirm it works and send an update..



08-02-2009 05:35:35

Sweet, thanks Andy.

The Newton people are basically telling me to Upgrade OgreNewt to fork/branch that supports Newton 2.0 beta. I am not exactly a fan of that.


08-02-2009 06:41:20

Just checked and it's already in the SVN (Trunk).. Run python python-ogre/ -g -c ogrenewt

And you should be fine.. All the current demos seem to work OK (and just updated the SVN to get CEGUI working on the MAC as well)...