daishi
13-03-2006 01:35:19
I'm trying to get pyogre up and running for the first time on linux. I have checked out the latest sources, but when I run 'python setup.py build' I get the following:
running build
running build_ext
building 'pyogre._ogre' extension
['pyogre/ogre/ogre.i']
skipping pyogre/ogre/ogre.i
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/ogre_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o
gcc: cannot specify -o with -c or -S and multiple compilations
error: command 'gcc' failed with exit status 1
Here's my gcc version:
gcc (GCC) 3.3.5 (Debian 1:3.3.5-8ubuntu2)
I'm confused. Any help would be appreciated.
dermont
13-03-2006 08:37:11
What version of swig are you using? (swig 1.3.27 required)
swig -version
The "skipping pyogre/ogre/ogre.i" seems to suggest that the swig step has already been run.
Check if the wrapper files from (pyogre-1.0.6-0 or trunk)/pyogre/ogre exist. If so:
- run 'setup.py clean'
- manually remove the wrapper files from (pyogre-1.0.6-0 or trunk)/pyogre/ogre
ogre_wrap.cxx
ogre_wrap.h
- renun 'python setup.py build'.
You should see something like this:
running build
running build_ext
building 'pyogre._ogre' extension
swigging pyogre/ogre/ogre.i to pyogre/ogre/ogre_wrap.cxx
swigging pyogre/ogre/ogre.i to pyogre/ogre/ogre_wrap.cxx
swig -python -c++ -modern -Ipyogre/ogre -I/usr/local/include/OGRE -o pyogre/ogre/ogre_wrap.cxx -outdir pyogre pyogre/ogre/ogre.i
Report any errors from the swig step.
daishi
13-03-2006 13:26:25
Thanks for the reply.
I'm using the newest swig, version 1.3.28.
I removed those two files, ran 'setup.py clean' and then ran 'setup.py build' again. Same thing:
running build
running build_ext
building 'pyogre._ogre' extension
swigging pyogre/ogre/ogre.i to pyogre/ogre/ogre_wrap.cxx
swig -python -c++ -modern -Ipyogre/ogre -I/usr/local/include -I/usr/local/include/OGRE -o pyogre/ogre/ogre_wrap.cxx -outdir pyogre pyogre/ogre/ogre.i
/usr/local/include/OGRE/OgreCommon.h:268: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreVertexIndexData.h:189: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreTexture.h:341: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreGpuProgram.h:473: Warning(362): operator= ignored
/usr/local/include/OGRE/OgreFileSystem.h:106: Warning(402): Base class 'ArchiveFactory' is incomplete.
/usr/local/include/OGRE/OgrePrerequisites.h:193: Warning(402): Only forward declaration 'ArchiveFactory' was found.
/usr/local/include/OGRE/OgreMovableObject.h:51: Warning(401): Nothing known about base class 'AnimableObject'. Ignored.
/usr/local/include/OGRE/OgreSceneManagerEnumerator.h:38: Warning(401): Base class 'SceneManagerFactory' undefined.
/usr/local/include/OGRE/OgreSceneManager.h:2416: Warning(401): 'SceneManagerFactory' must be defined before it is used as a base class.
/usr/local/include/OGRE/OgreSceneManagerEnumerator.h:51: Warning(401): Base class 'SceneManager' undefined.
/usr/local/include/OGRE/OgreSceneManager.h:149: Warning(401): 'SceneManager' must be defined before it is used as a base class.
/usr/local/include/OGRE/OgreTextureUnitState.h:296: Warning(509): Overloaded setCubicTextureName(Ogre::String const *const) is shadowed by setCubicTextureName(Ogre::String const &) at /usr/local/include/OGRE/OgreTextureUnitState.h:248.
/usr/local/include/OGRE/OgreTextureUnitState.h:248: Warning(509): Overloaded setCubicTextureName(Ogre::String const &,bool) is shadowed by setCubicTextureName(Ogre::String const *const,bool) at /usr/local/include/OGRE/OgreTextureUnitState.h:296.
/usr/local/include/OGRE/OgreTextureUnitState.h:342: Warning(509): Overloaded setAnimatedTextureName(Ogre::String const *const,unsigned int) is shadowed by setAnimatedTextureName(Ogre::String const &,unsigned int) at /usr/local/include/OGRE/OgreTextureUnitState.h:319.
/usr/local/include/OGRE/OgreTextureUnitState.h:319: Warning(509): Overloaded setAnimatedTextureName(Ogre::String const &,unsigned int,Ogre::Real) is shadowed by setAnimatedTextureName(Ogre::String const *const,unsigned int,Ogre::Real) at /usr/local/include/OGRE/OgreTextureUnitState.h:342.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgrePositionTarget.h:57: Warning(473): Returning a pointer or reference in a director method is not recommended.
/usr/local/include/OGRE/OgreTargetManager.h:59: Warning(473): Returning a pointer or reference in a director method is not recommended.
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/pyogre
creating build/temp.linux-i686-2.4/pyogre/ogre
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include/OGRE -I/usr/include/python2.4 -c pyogre/ogre/ogre_wrap.cxx -o build/temp.linux-i686-2.4/pyogre/ogre/ogre_wrap.o
gcc: cannot specify -o with -c or -S and multiple compilations
error: command 'gcc' failed with exit status 1
I don't see any errors with swig.
dermont
13-03-2006 13:44:08
Sorry, both pyOgre 1.0.6 and trunk currently only work for Ogre 1.0.6 (1.0.7 should compile though hasn't been tested).
Looks like your using OGRE 1.2.0RC1 / Ogre Dagon.
daishi
14-03-2006 13:06:35
Thanks Dermont, that seemed to be the problem. Now I am getting PtrException errors whenever I try to run any of the pyogre examples. I think it is from the version of swig I am using (1.3.28), so I'm going to downgrade to 1.3.25 and wait another 2 hours building..
I'll let ya know how it goes, thanks for the help.
-Fredric
dermont
14-03-2006 13:26:42
Use swig 1.3.27, you may encounter problems with 1.3.25.