Mac OS X 10.5 install error -- AliasTextureIterator?

JimG

04-02-2008 14:24:59

Hi,

I followed the instructions on this page:

http://wiki.python-ogre.org/index.php/OSXBuildV2

and all proceeds very nicely until the next-to-last Terminal command (part of Step 4):

python python-ogre/BuildModule.py -g -c ois ogre

That generates the following output in the Terminal:

PythonOgre.BuildModule: INFO Building Source code for ois
PythonOgre.BuildModule: INFO Compiling Source code for ois
PythonOgre.BuildModule: INFO Building Source code for ogre
PythonOgre.BuildModule: INFO Compiling Source code for ogre
PythonOgre.BuildModule: WARNING Task Failed

Log.out seems to indicate an error with AliasTextureIterator and redefinitions. I should say that the demos in ogrenew run perfectly and that I also have the ogre SDK installed in /Library/Frameworks/.

Any ideas?

Here's log.out:
02-04 08:53 PythonOgre.BuildModule INFO Building Source code for ois
02-04 08:53 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/Users/jim/development/python-ogre/code_generators/ois'
02-04 08:53 PythonOgre.BuildModule INFO Compiling Source code for ois
02-04 08:53 PythonOgre.BuildModule DEBUG Spawning 'scons PROJECTS=ois' in '/Users/jim/development/python-ogre'
02-04 08:56 PythonOgre.BuildModule INFO Building Source code for ogre
02-04 08:56 PythonOgre.BuildModule DEBUG Spawning 'python generate_code.py' in '/Users/jim/development/python-ogre/code_generators/ogre'
02-04 08:59 PythonOgre.BuildModule INFO Compiling Source code for ogre
02-04 08:59 PythonOgre.BuildModule DEBUG Spawning 'scons PROJECTS=ogre' in '/Users/jim/development/python-ogre'
02-04 08:59 PythonOgre.BuildModule WARNING Task Failed
02-04 08:59 PythonOgre.BuildModule DEBUG scons: Reading SConscript files ...
Building ogre
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build_dir_2.5/ogre_1.4/AliasTextureIterator.pypp.os -c -I -pipe -O3 -I./ -DBOOST_PYTHON_MAX_ARITY=19 -D_POSIX_C_SOURCE -DCF_OPEN_SOURCE -fPIC -I/Users/jim/development/root/usr/include/boost-1_34_1 -I/Users/jim/development/ogrenew/OgreMain/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/CFMCarbon -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -I/Users/jim/development/root/usr/include/boost-1_34_1 generated/ogre_1.4/AliasTextureIterator.pypp.cpp
scons: building terminated because of errors.

02-04 08:59 PythonOgre.BuildModule DEBUG In file included from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/detail/wrap_python.hpp:50,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/detail/prefix.hpp:13,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/args.hpp:8,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python.hpp:11,
from generated/ogre_1.4/python_ogre_precompiled.h:2,
from generated/ogre_1.4/AliasTextureIterator.pypp.cpp:3:
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:962:1: warning: "_POSIX_C_SOURCE" redefined
<command line>:1:1: warning: this is the location of the previous definition
In file included from /Users/jim/development/ogrenew/OgreMain/include/OgrePlatform.h:198,
from /Users/jim/development/ogrenew/OgreMain/include/OgrePrerequisites.h:32,
from /Users/jim/development/ogrenew/OgreMain/include/Ogre.h:32,
from generated/ogre_1.4/python_ogre_masterlist.h:7,
from generated/ogre_1.4/python_ogre_precompiled.h:4,
from generated/ogre_1.4/AliasTextureIterator.pypp.cpp:3:
/Users/jim/development/ogrenew/OgreMain/include/config.h:27:1: warning: "HAVE_SNPRINTF" redefined
In file included from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/detail/wrap_python.hpp:50,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/detail/prefix.hpp:13,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python/args.hpp:8,
from /Users/jim/development/root/usr/include/boost-1_34_1/boost/python.hpp:11,
from generated/ogre_1.4/python_ogre_precompiled.h:2,
from generated/ogre_1.4/AliasTextureIterator.pypp.cpp:3:
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:485:1: warning: this is the location of the previous definition
/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/CFMCarbon/mach/port.h:2: error: conflicting declaration ‘typedef int mach_port_t’
/usr/include/pthread.h:116: error: ‘mach_port_t’ has a previous declaration as ‘typedef __darwin_mach_port_t mach_port_t’
scons: *** [build_dir_2.5/ogre_1.4/AliasTextureIterator.pypp.os] Error 1

Thanks,
Jim

Game_Ender

05-02-2008 06:40:25

The build is just broken nothing to do with that specific file. You need to change the 10.4 in this:-I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/CFMCarbon
To the proper 10.5 version.

JimG

05-02-2008 16:06:02

Thanks for the help. It got me past Step 4, but now when I go to run one of the python-ogre demos, I get this error message:

ImportError: dlopen(/Users/jim/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/_ogre_.so, 2): Library not loaded: bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib Referenced from: /Users/jim/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/_ogre_.so Reason: image not found

I verified that libboost_python-1_34_1.dylib does indeed exist in:
/Users/jim/development/boost_1_34_1/bin.v2/libs/python/build/darwin/release/

So, I am not sure what the problem is. Any ideas?

Jim

ximian

07-02-2008 06:51:22

ImportError: dlopen(/Users/jim/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/_ogre_.so, 2): Library not loaded: bin.v2/libs/python/build/darwin/release/libboost_python-1_34_1.dylib Referenced from: /Users/jim/development/root/usr/lib/python2.5/site-packages/ogre/renderer/OGRE/_ogre_.so Reason: image not found

I verified that libboost_python-1_34_1.dylib does indeed exist in:
/Users/jim/development/boost_1_34_1/bin.v2/libs/python/build/darwin/release/

I had the same problem but making a symlink to a "bin.v2" in "demos" directory did the trick for me. In Your case it would be:
ln -s /Users/jim/development/boost_1_34_1/bin.v2/ /Users/jim/development/python-ogre/demos/ogre/bin.v2

Game_Ender

07-02-2008 13:49:39

That just looks like the boost library is not on your LD_LIBRARY_PATH. Have you made any changes to it?

IE:"/Users/jim/development/root/usr/lib" should be on your LD_LIBRARY_PATH.

JimG

07-02-2008 13:59:14


I had the same problem but making a symlink to a "bin.v2" in "demos" directory did the trick for me. In Your case it would be:
ln -s /Users/jim/development/boost_1_34_1/bin.v2/ /Users/jim/development/python-ogre/demos/ogre/bin.v2


Bingo! Thank you very much for your help.

I have looked at a number of Python-related game/graphics engines, and none work very easily, or at all, on Macs. The wiki's OSXBuildV2 page is very clear, but I would be great if it were updated to cover these (I presume) Leopard-related issues to smooth the way for others.

Jim

JimG

07-02-2008 14:07:07

That just looks like the boost library is not on your LD_LIBRARY_PATH. Have you made any changes to it?

IE:"/Users/jim/development/root/usr/lib" should be on your LD_LIBRARY_PATH.


Please excuse my ignorance, but the only path settings I know about exist in .bash_login. There is no mention of LD_LIBRARY_PATH there.

I assume I would add a line like:
export LD_LIBRARY_PATH='/Users/jim/development/root/usr/lib'
Right?

Would adding that path head off the need for symlinks as ximian suggested?

Jim

Game_Ender

07-02-2008 14:41:58

The LD_LIBRARY_PATH is an environment variable helps the OS find libraries at run time. Here is Apple's page on the process.

Symlinking and moving libraries to system wide locations seems to a common mistake people make. In this case the LD_LIBRARY_PATH is the way to go. You don't want to overwrite the variable, you want to prepend it:
export LD_LIBRARY_PATH=/Users/jim/development/root/usr/lib:$LD_LIBRARY_PATH

This keeps you from removing other important things from the path if they exist.

SoftwareMaven

29-02-2008 15:48:38

After trundling through the instructions and addenda here, I thought I had made it. I had one error in building that didn't show up:

02-28 23:39 PythonOgre.BuildModule DEBUG error: package directory 'packages_2.5/ogre/physics/NxOgre_09' does not exist

Which I resolved by linking to NxOgre. At that point, everything seemed fine until I tried to run Demo_Smoke.py and (after fixing the LD_LIBRARY_PATH problem), I got:

Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
FreeImage version: 3.9.1
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi
DDS codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
Loading library ../../pluginsRenderSystem_GL.dll
OGRE EXCEPTION(7:): Could not load dynamic library ../../pluginsRenderSystem_GL.dll. System Error: Unknown Error in DynLib::load at /Users/travis/ogredev/ogrenew/Mac/Ogre/../../OgreMain/src/OgreDynLib.cpp (line 80)


I'm guessing it can't find some library? My LD_LIBRARY_PATH is:

/Users/travis/ogredev/root/usr/lib

Any ideas?

Thanks.

tj

Game_Ender

29-02-2008 22:06:11

No the read the error completely:
OGRE EXCEPTION(Could not load dynamic library ../../pluginsRenderSystem_GL.dll. System Error: Unknown Error in DynLib::load at /Users/travis/ogredev/ogrenew/Mac/Ogre/../../OgreMain/src/OgreDynLib.cpp (line 80)

Its trying to load the windows version. I really don't know why Ogre doesn't handle that itself. You have to update plugins.cfg to remove the ".dll".

SoftwareMaven

01-03-2008 00:01:01

That was it. Thanks for pointing out what should have been obvious.

tj