I'm trying to get pyogre working on a gentoo 64-bit linux distribution. I can get everything to build just fine however whenever I try to import pyogre.ogre it gives the error:
ImportError: /usr/lib64/python2.4/site-packages/pyogre/_ogre.so: undefined symbol: _ZN4Ogre10MouseEventC1EPNS_14PositionTargetEiififfffffi
Any one have an idea what library isn't getting linked in? Or what is going on? Any help with this would be appreciated.
Did you post the wrong link? That thread doesn't seem to have anything about linux in it.
About the middle of page 2 of that thread starts talking about Linux, right? Or am I confused?
At minimum, there is one thing in that thread you could try:
So I played around with the folder structure a bit, I changed the name of the demo folder from c:\Python24\pyogre\ogre_demos to C:\Python24\pyogre\demos and voila, it works.
...depending on which version of PyOgre you have. If it's 22.214.171.124 then the above should fix it. Otherwise I think the ogre_demos directory is correct for versions 126.96.36.199 and 188.8.131.52.
Hope I haven't confused you.
What version of ogre should I be using if I am using pyogre from trunk of svn? It won't build with CVS version of OGRE and 1.0.6 has a bunch of undefined links in the .so file, as stated above.
Both pyogre-184.108.40.206 and svn trunk are currently for Ogre 1.0.6. Pyogre-1.0.6.X's are meant to be stable release snapshots and svn trunk updates / bugfixes on the last stable release. AFAIK bi-monthly the updates are supposed to be propogated to a new releases 220.127.116.11, 18.104.22.168 etc. But as you know pyogre-22.214.171.124 has already been released.
Anyway, you should using ogre version 1.0.6 to build from pyogre's svn trunk. You need to apply the following updates:
Add EventSystem.cxx to setup.py, e.g.
ext_ogre = pyogre_Extension("pyogre._ogre",
//EventSystem *Singleton<EventSystem>::ms_Singleton = 0;
template <> EventSystem *Singleton<EventSystem>::ms_Singleton = 0;
a) Ensure that you remove any old versions of ogre's libs from /usr/local/lib/OGRE and /usr/local/lib/*Ogre* before compiling / installing another version. And running ldconfig as su after installation.
b) before running pyogre's "setup.py build" clear out any old wrappers/libs :
- run setup.py clean
- manually remove the wrapper files from pyogre-1.0.6-0/pyogre/ogre
- manually remove the wrapper files from pyogre-1.0.6-0/pyogre/cegui
- remove any old pyogre lib versions,if needed,from pyogre-1.0.6-0/build/
c) Make sure your using the same version of gcc/g++ to compile Ogre and pyogre.
For example my default version of gcc 3.x.x. When I compile for gcc 4.0.x, I have to:
Thanks for all of your help guys. It turns out the only problem I had was that I wasn't regenerating the ld.so.cache in /etc. Once I did that it all seems to work. Thanks again.