Linux python-ogrenewt2 problems


11-01-2012 22:21:09

Okay, retrying sans hyperlinks

So I've spent the last day and a half banging on the python-ogre and ogrenewt2 code trying to get it to compile (64 bit linux mint debian). I got ogre to run its demos, and python-ogre will run and the other basic demos. When I tried getting ogrenewt2 to compile, I found a bunch of minor bugs (issuing cp <file> /usr/lib without using sudo and the like), which I fixed. But it still wouldn't work, so I grabbed newton-dynamics myself ( and built and its supporting libraries. Then I grabbed ogrenewt2 myself from svn ( and compiled it. It finished without errors, allowing me to run -g -c ogrenewt2 and then -b install. Again, exited without error. When I tried to import ogrenewt2 I got the following. Python 2.6.7 (r267:88850, Jul 10 2011, 08:11:54)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ogre.physics
>>> import ogre.physics.ogrenewt2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/ogre/physics/ogrenewt2/", line 4, in <module>
from _ogrenewt2_ import *
ImportError: /usr/local/lib/ undefined symbol: _ZN25CustomKinematicControllerC1EPK10NewtonBodyRK7dVector

I also tried using the pre-built newtonSDK for linux64, which is version 2.33, with similar results. Has anyone gotten this working? And if so, what version of the various libraries should I use? I don't mind running slightly out of date code, so long as it is reasonably stable.


28-01-2012 06:54:06

I don't use OgreNewt but it looks like you need to link against one of the auxiliary static Newton libs.

I'm not sure what additional boost libraries OgreNewt uses (if any) and it's not obvious from the CMake build so you may run into other problems, but you could try updating the linkflags for the ogrenewt2 class in, e.g:

LINKFLAGS ='''-L/media/sda8/Libraries/Physics/Newton/newtonSDK/sdk
-Wl,-Bstatic -Wl,--whole-archive -ldJointLibrary -ldMath -ldContainers -ldAnimation -Wl,--no-whole-archive -Wl,-Bdynamic '''


28-01-2012 17:10:10

So it seems the Newton Game Dynamics on linux is not currently in a stable state. I grabbed newton 2.34 and pounded on it a bit and it all seems to be working. There were some missing files from it, so I ended up building different parts from a few different SVN revisions of newton 2.34. Once I had that, things started working. I don't know for certain what all was needed, but I ended up making and adding,, libdMath.a libdContainers.a libdJointLibrary.a. Also, only the 200 branch of NGD currently builds on linux. I hope this gives a starting point to anyone else running into the issue. And thanks dermont for the tips.