[python-ogre] Building python-ogre on linux .....

24 views
Skip to first unread message

Evan Metheny

unread,
Apr 16, 2007, 6:43:02 PM4/16/07
to python-ogre-developers
Ok this is the start of my trials and tribulations, regarding the installation of python_ogre on my linux box. I have written a log that contains the exact steps i wen through to get to this point. In the file i made some comments on some of the configurations. It is located here http://evamet1.coconia.net/setup-log.txt

My problem occurred when running "python generate_code" for the main ogre package. here is the error:

Excluding (operator): Ogre::Real * Ogre::Matrix3::operator[](size_t iRow) const [member operator]
Traceback (most recent call last):
  File "generate_code.py", line 1005, in ?
    generate_code()
  File "generate_code.py", line 939, in generate_code
    register_exceptions.register( mb )
  File "/home/evan/files/programing/python-ogre-build/python-ogre/code_generators/ogre/register_exceptions.py", line 127, in register
    f = file( ogre_exceptions, 'w+' )
IOError: [Errno 2] No such file or directory: '/home/evan/files/programing/python-ogre-build/python-ogre/generated/ogre_1.4/_ogre_exceptions_.py'

the full log is located at : http://evamet1.coconia.net/error_ogre_generator.txt

the file that is missing is located /home/evan/files/programing/python-ogre-build/python-ogre/packages_2.5/ogre/renderer/OGRE/_ogre_exceptions_.py





kresim...@gmail.com

unread,
Apr 16, 2007, 7:05:13 PM4/16/07
to Python Ogre Developers
yeah, I ran into the same problem, solved by creating a "ogre_1.4" dir
in generated/ and reruning the script

kresim...@gmail.com

unread,
Apr 16, 2007, 7:30:49 PM4/16/07
to Python Ogre Developers
I just compiled cegui, didn't try it yet though. however, cegui.so has
33 MB!!? is this intentional? didn't scons use -s -O2 or smtg?

Evan Metheny

unread,
Apr 16, 2007, 9:22:26 PM4/16/07
to python-ogre...@googlegroups.com
how did you get cegui to compile with out the dependencies folder:

WARNING: Unable to find CEGUI.h include file (cegui class) in include_dirs

Traceback (most recent call last):
  File "generate_code.py", line 221, in ?
    generate_code()
  File "generate_code.py", line 188, in generate_code
    , indexing_suite_version=2 )
  File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 87, in __init__
    , indexing_suite_version)
  File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 118, in __parse_declarations
    decls = reader.read_files( files, compilation_mode )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 225, in read_files
    return self.__parse_file_by_file(files)
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 246, in __parse_file_by_file
    , self.__decl_factory )
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py", line 83, in __init__
    self.__raise_on_wrong_settings()
  File "/usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py", line 119, in __raise_on_wrong_settings
    raise RuntimeError( msg )
RuntimeError: include path "/home/evan/files/programing/python-ogre-build/ogrenew/Dependencies/include" should exists or to be a valid directory name.

Lakin Wecker

unread,
Apr 16, 2007, 9:53:19 PM4/16/07
to python-ogre...@googlegroups.com
Under download libvorbis you have the same link to openal as you have for the openal heading. :) 

Lakin

Evan Metheny

unread,
Apr 16, 2007, 11:32:54 PM4/16/07
to python-ogre...@googlegroups.com
ooops thanks, I updated it.
This log will constantly be updated as i go through.
I just recently added all the results from the all the generate_code.py trials.
I could only get ogre, ois, and ogrerefapp to generate. I need help with the others.
http://evamet1.coconia.net/setup-log.txt The results are at the bottum.

kresim...@gmail.com

unread,
Apr 17, 2007, 5:39:23 AM4/17/07
to Python Ogre Developers
once again, I dummy-created an empty folder :) I had to do a lot of
such operations. for instance, some source has #include "gtk/gtk.h"
and gtk/ isn't in /usrlinclude, but in "/usr/include/gtk-2.0" and
similar.

Andy Miller

unread,
Apr 17, 2007, 5:55:47 AM4/17/07
to python-ogre...@googlegroups.com
Sounds like your linux system is a little strange -- typically you create a symbolic link that manages this (so you can change versions without changing header files)..
 
ie create a symbolic link of /usr/include/gtk that links to /usr/include/gtk-2.0
 
This is typically done by the package when it installed itself...
 
Cheers

Andy

 

kresim...@gmail.com

unread,
Apr 17, 2007, 5:57:07 AM4/17/07
to Python Ogre Developers
@Evan, if you manage to get python-ogre running, it would be great if
you provided a tarball full of binaries :) So finally, linux users
would have a decent python-ogre distribution.

kresim...@gmail.com

unread,
Apr 17, 2007, 5:59:35 AM4/17/07
to Python Ogre Developers
I'm running Debian/Lenny. I had to create those links myself. I don't
know why the distribution didn't do that. however. I compiled Ogre
from source with no problems, whilst scons has problems..

Lakin Wecker

unread,
Apr 17, 2007, 3:40:30 PM4/17/07
to python-ogre...@googlegroups.com
On 4/17/07, Andy Miller <nzmi...@gmail.com> wrote:
Sounds like your linux system is a little strange -- typically you create a symbolic link that manages this (so you can change versions without changing header files)..

Actually, that's only done on some linux systems.  That's because upgrading versions can cause version incompatibilities.  On linux, the typical way to discover the needed compilation paths is to use pkgconfig and ask for the include path of a particular library which matches a version request.

For instance for gtk+-2.0 on debian-based systems you would use the following command:
pkg-config --cflags gtk+-2.0
to discover these flags that are needed for compilation:
-DPNG_NO_MMX_CODE -I/usr/include/gtk- 2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12

Linux provides more than enough facilities to autodetect _much_ of what's needed.
However,  there are some libraries that don't provide pkg-config files, and these are the ones that may need by-hand configuration from the user.   But, these libraries that don't provide pkg-config options can still be autodetected when they live on a normal system path.

Which is why I, (and other linux users) have been pushing for support for autodetecting the environment on linux.  I do understand that Linux isn't the primary operating system of the core-devs and that the core-devs are busy.  This means that we linux users need to start building the autodetection support piece by piece.   There were a couple of linux users that started this and then dissappeared off the list, I wonder what happened to them?

Lakin

dermont

unread,
Apr 17, 2007, 3:54:46 PM4/17/07
to Python Ogre Developers
You could of course configure with the Xt gui:
./configure --with-gui=Xt

On Apr 18, 3:40 am, "Lakin Wecker" <lakin.wec...@gmail.com> wrote:


> On 4/17/07, Andy Miller <nzmill...@gmail.com> wrote:
>
>
>
> > Sounds like your linux system is a little strange -- typically you create
> > a symbolic link that manages this (so you can change versions without
> > changing header files)..
>
> Actually, that's only done on some linux systems. That's because upgrading
> versions can cause version incompatibilities. On linux, the typical way to
> discover the needed compilation paths is to use pkgconfig and ask for the
> include path of a particular library which matches a version request.
>
> For instance for gtk+-2.0 on debian-based systems you would use the
> following command:
> pkg-config --cflags gtk+-2.0
> to discover these flags that are needed for compilation:

> -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include

kresim...@gmail.com

unread,
Apr 17, 2007, 4:48:02 PM4/17/07
to Python Ogre Developers
yeah, whatever, let's just stick to the matter at hand and that is
succesfully compiling python-ogre on linux and getting those
'precious' binaries :)

dermont

unread,
Apr 17, 2007, 5:17:18 PM4/17/07
to Python Ogre Developers
>>> yeah, whatever.

Ok sorry for butting in. The above post wasn't meant as a any slight
to Lakin (apologies in advance). Just the configure problems I
encountered with GTK.

>>> let's just stick to the matter at hand and that is succesfully compiling python-ogre on linux and getting those
'precious' binaries :)

Don't really know what you mean by the 'precious' binaries. The ogre/
cegui/ois should, with minor changes, compile quite easily. I'll be
sure to avoid repeating the above mistake,


On Apr 18, 4:48 am, "kresimir.s...@gmail.com"

Game_Ender

unread,
Apr 17, 2007, 5:21:20 PM4/17/07
to Python Ogre Developers
You should not depend on Python-Ogre linux binaries for the following
reasons:
* Python-Ogre still needs some non-release libraries, like boost,
so these would also have to included in the downloads
* The binaries are embassingly large > 100 MB and just the binaries
will come out to be around 25-30MB 7-zipped (ie no media).
* This is Linux and the build system should "just work"

Latin Wrecker, I was one of the other Linux users pushing for
autodetection, and I will get it when I build Python-Ogre again.
Believe it or not I have not had time to build Python-Ogre again since
I was the first to get it working a few months ago. Class and the
desperate need to finish my Python-Ogre based project has lead to me
to using windows version.

My Plan:
* Remove what ever remnants of reference to project CVS checkouts
there are (like needed to map into the ogre samples directory)
* Add pkg-config based autodetection with and scons configuration
module to check whether packages have been accurately detected.
* Make a simple example Posix config, that demonstrates overriding
the auto detected values.

I also need/want to support Mac users for the application I am
developing so you might see some Mac releated changes as well.

On Apr 17, 4:48 pm, "kresimir.s...@gmail.com"

kresim...@gmail.com

unread,
Apr 17, 2007, 5:23:07 PM4/17/07
to Python Ogre Developers
> 'precious' binaries :)
>
> Don't really know what you mean by the 'precious' binaries. The ogre/
> cegui/ois should, with minor changes, compile quite easily.

lol :)

I mean, I' like to avoid if anyhow possibile to go through the pain of
succesfully compiling and running python-ogre :)
I'm currently compiling gcc-4.0.4 (debian has 4.1.2) and will
recompile the whole thing all over again, but if someone beat's me to
it, I wouldn't mind using his/hers binaries :D

dermont

unread,
Apr 17, 2007, 6:14:13 PM4/17/07
to Python Ogre Developers
> lol :)
Yep out of order, sorry.

The way I did it was to compile one library at a time, i.e:

#possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt',
'cegui', 'ode', #'ogreode', 'ogreal']
possible_projects = ['ois']
I think you can do this directly via the scons script (scons ois - it
didn't work for me).

Also to reduce compile times with ogre and python-ogre:

CXXFLAGS="-O3" ./configure (the following is optional --with-gui=Xt)
- reduces .so file to 5.5MB

SConstruct file:
----------------
CCFLAGS += ' -O3 -I./'

There may be issues with different versions of gcc, if you post your
problems I'm sure someone will help.

On Apr 18, 5:23 am, "kresimir.s...@gmail.com"

Evan Metheny

unread,
Apr 17, 2007, 6:48:19 PM4/17/07
to python-ogre...@googlegroups.com
With andy's comment about my system maybe being wierd i decided that i would do a fresh install of dapper (compiled with gcc-4.0 unlike edgy gcc 4.1). Will post with details.


#possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt',
'cegui', 'ode',  #'ogreode', 'ogreal']
possible_projects = ['ois']
 I think you can do this directly via the scons script (scons ois - it
didn't work for me).

in order to do this with scons directly without editing the script the command would be 

scons PROJECTS=ogre

this overrides the hard coded variable possible_projects/default_projects  as stated below

# This lets you call scons like: 'scons PROJECTS=ogre,cegui'
opts = Options(' custom.py')
opts.Add(ListOption('PROJECTS', 'Project to build wrappers for',
                    possible_projects, default_projects))
temp_env = Environment(options = opts)
tobuild = temp_env['PROJECTS']


I mean, I' like to avoid if anyhow possibile to go through the pain of
succesfully compiling and running python-ogre :)


I would like to see python-ogre in a 'source' .rpm or .deb, fro clean deployment and distribution?

kresim...@gmail.com

unread,
Apr 17, 2007, 7:01:03 PM4/17/07
to Python Ogre Developers
I've compiled gcc4.0.4 and for the life of me I don't know how to
force scons to use it? I've installed it in /usr/local/gcc4 :?

Lakin Wecker

unread,
Apr 17, 2007, 8:05:51 PM4/17/07
to python-ogre...@googlegroups.com
Heh,  no offense taken.  I learned long ago, that one can never take offense from emails.  So no worries.  I too did not mean any offense to those who started helping out a few months ago.  I was just mentioning that there were others.  Of course, we all get busy.  Which is why Andy is so awesome, and he always seems to be around doing great work.

I too would like to succeed at compiling python-ogre on Linux.  I'd also like to make it much less painful for future users. 

In response to the others that mentioned binaries being impossible,  I disagree.  It will take a concerted effort on the parts of all of us, but I think it is possible for us to provide our own debian/ubuntu repository that will provide upgraded boost-python and (py)gccxml etc ...


Lakin

On 4/17/07, dermont <dermo...@gmail.com> wrote:

Evan Metheny

unread,
Apr 17, 2007, 9:51:49 PM4/17/07
to python-ogre...@googlegroups.com
I've compiled gcc4.0.4 and for the life of me I don't know how to
force scons to use it? I've installed it in /usr/local/gcc4 :?

To do this you would have to add a small function to "SConstruct" just as in the PROJECT above:

def gcc_env(env):
    env['GCC_VER'] = 'gcc' # gcc default

env = Environment(tools = [gcc_env])

Then to set it use this in the comand line

scons GCC_VER=gcc-4.0 

Correct me if im wrong anyone.

rafael...@gmail.com

unread,
Apr 17, 2007, 11:33:55 PM4/17/07
to Python Ogre Developers
Hummm maybe we should write an clear detailed documentation explaining
how to compile python-ogre on Linux. I'm writing down all steps I'm
doing to compile it. In the end I'll share it.

Irish

unread,
Apr 18, 2007, 12:15:31 AM4/18/07
to Python Ogre Developers
That's actually a great idea. If possible, please put down all the
"must-haves" for everything needed to compile it. Maybe "phases"
because that's what it seems like we need. A good install script may
be a good idea too, or even an apt repository with all the
dependencies. If we can get hosting, I'll do what I can to help with
organizing a set of Ubuntu apt packages.

Right now I have a fresh install of Ubuntu Feisty (set for release in
2 days, still Beta currently) and am waiting for the official release
to install python-ogre because a lot of our apt packages will be
updated then. If we can get a tenative list of steps together here,
I'll be a guinea pig.

On Apr 17, 11:33 pm, "rafaelrie...@gmail.com" <rafaelrie...@gmail.com>
wrote:

Game_Ender

unread,
Apr 18, 2007, 12:17:56 AM4/18/07
to Python Ogre Developers
Hmm, I don't think you need to jump through any hoops to compile with
GCC 4.0. I added the functionality several months ago, there is just
not enough documentation. Define "cxx_compiler" and "cc_compiler" to
be the path to your desired compilier inside you config file. When I
got through my rounds of updates during my Linux buid I will try and
do this in a more standard manner (ie CXX=foo on the command line).

About packages: It will take a large effort, because Ogre itself
doesn't have update packages, and we use an unreleased and self
patched version of Boost. Does anyone have any ideas about reducing
package size?

On Apr 17, 11:33 pm, "rafaelrie...@gmail.com" <rafaelrie...@gmail.com>
wrote:

Evan Metheny

unread,
Apr 18, 2007, 12:44:03 AM4/18/07
to python-ogre...@googlegroups.com
Thank you game ender, that is my bad i just looked right past it.
        ## Use custom compilier if wanted (things like ccache)
        if hasattr(environment, 'cxx_compiler'):
            _env['CXX'] = 'g++-4.0'
        if hasattr(environment, 'cc_compiler'):
            _env['CC'] = 'gcc-4.0 '

it is the same thing i designated above, just integrated correctly.

dermont

unread,
Apr 18, 2007, 5:34:00 AM4/18/07
to Python Ogre Developers
Ok thanks for the "heads up" on scons, never really use it. I'm just
about to continue building the other modules (ogre,cegui,ois already
work). I'll post here if I find anything releveant to your setup log.

OgreOde
-----------
1.1) Path issue with Path issue with python_ogreode.h

Edited ogreode/python_ogreode_aliases.h

//#include "..\ogre\python_ogre_aliases.h"
#include "../ogre/python_ogre_aliases.h"

1.2) Python Version String Error Compiling

Replaced the python version string in ogreode/generate_code.py
with the one from
ogre/generate_code.py

##environment.ogreode.version
## , 'python_version' : '"%s"' %
sys.version } )
environment.ogre.version.replace("\n", "\\\n")
, 'python_version' : '"%s"' %
sys.version.replace("\n", "\\\n" ) } )


On Apr 18, 6:48 am, "Evan Metheny" <evanpm...@gmail.com> wrote:
> With andy's comment about my system maybe being wierd i decided that i would
> do a fresh install of dapper (compiled with gcc-4.0 unlike edgy gcc 4.1).
> Will post with details.
>
> #possible_projects = ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt',
>
> > 'cegui', 'ode', #'ogreode', 'ogreal']
> > possible_projects = ['ois']
> > I think you can do this directly via the scons script (scons ois - it
> > didn't work for me).
>
> in order to do this with scons directly without editing the script the
> command would be
>
> scons PROJECTS=ogre
>
> this overrides the hard coded variable possible_projects/default_projects
> as stated below
>
> # This lets you call scons like: 'scons PROJECTS=ogre,cegui'
>
> > opts = Options('custom.py')
> > opts.Add(ListOption('PROJECTS', 'Project to build wrappers for',
> > possible_projects, default_projects))
> > temp_env = Environment(options = opts)
> > tobuild = temp_env['PROJECTS']
>
> I mean, I' like to avoid if anyhow possibile to go through the pain of
>
> > succesfully compiling and running python-ogre :)
>
> I would like to see python-ogre in a 'source' .rpm or .deb, fro clean
> deployment and distribution?
>

kresim...@gmail.com

unread,
Apr 18, 2007, 4:57:13 PM4/18/07
to Python Ogre Developers
I've switched to gcc 4.0.4 and have succesfully compiled & installed
python ogre. only one little thing remains:

kreso@thor:/data/python-ogre/python-ogre/demos/ogre$ python
Demo_SkyBox.py


Traceback (most recent call last):

File "Demo_SkyBox.py", line 12, in ?
import ogre.renderer.OGRE as ogre
File "/usr/lib/python2.4/site-packages/ogre/renderer/OGRE/
__init__.py", line 6, in ?
from _ogre_ import *
ImportError: /usr/lib/python2.4/site-packages/ogre/renderer/OGRE/
_ogre_.so: undefined symbol:
_ZN4Ogre9SingletonINS_14ArchiveManagerEE12ms_SingletonE

what's wrong ???

I compiled cegui, ogre and ois with scons (no ode or similar)

Rafael Riedel

unread,
Apr 18, 2007, 5:19:37 PM4/18/07
to python-ogre...@googlegroups.com
My friend suggested one thing: install debian bootstrap, with ONLY base system, and compile python-ogre (and maybe trying with autoapt (if possible, I don't know), to download and install the packages as the compile is on process). When it finished, you'll have an detailed dependency structure needed ONLY to compile it. I think this is an good idea, I'll try it later... later! hhehe
 
Interesting, I'm waiting the Ubuntu Feisty to become available. It will have newer packages versions, maybe can help us. (I hope).
 
Well, when I get home, I'll share what I've done to compile.
 

 
2007/4/18, Irish <drummin...@gmail.com>:



--
Rafael Riedel
Belo Horizonte, Minas Gerais
Debian GNU/Linux - Testing
Linux Registered user: #102363 <counter.li.org >

Game_Ender

unread,
Apr 18, 2007, 10:50:16 PM4/18/07
to Python Ogre Developers
That is not needed I know exactly what is need to build python Ogre, I
have almost all the dependencies (including GCC_XML and boost) checked
into my project SVN repository. Like I have mentioned several times
before on the list you need to maintain a separate environment for
python-ogre by using --prefix command when compiling the packages that
have to be compiled by hand. You also need to edit your LD_LIBRARY,
and PKG_CONFIG paths accordingly. Use something like "--prefix=/home/
me/python-ogre/dev". Then when you make install everything will be
installed there.

Now on to the issue with the missing symbol, that is an odd one, using
c++filt it turns out that symbol is:
Ogre::Singleton<Ogre::ArchiveManager>::ms_Singleton. Has anyone seen
this before?

On Apr 18, 5:19 pm, "Rafael Riedel" <rafaelrie...@gmail.com> wrote:
> My friend suggested one thing: install debian bootstrap, with ONLY base
> system, and compile python-ogre (and maybe trying with autoapt (if possible,
> I don't know), to download and install the packages as the compile is on
> process). When it finished, you'll have an detailed dependency structure
> needed ONLY to compile it. I think this is an good idea, I'll try it
> later... later! hhehe
>
> Interesting, I'm waiting the Ubuntu Feisty to become available. It will have
> newer packages versions, maybe can help us. (I hope).
>
> Well, when I get home, I'll share what I've done to compile.
>

> 2007/4/18, Irish <drummingpar...@gmail.com>:

Lakin Wecker

unread,
Apr 18, 2007, 11:34:02 PM4/18/07
to python-ogre...@googlegroups.com
Might be a bug in Ogre, has anyone checked the OgreArchiveManager.cpp file for appropriate definition of ms_Singleton?

Lakin

dermont

unread,
Apr 19, 2007, 12:44:19 AM4/19/07
to Python Ogre Developers
Yes I have the same problem here, Ubuntu boost and python-ogre
compiled with gcc4.0.3.

I belive this may be (?) related to the newly implemented visibility
settings in ogre. From a search on the web I cam across this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470

As a rough and ready test I recompiled ogre with gcc3.4.6 (no
visibility). I didn't do a full rebuild of the ogre module and the
modules imported fine.

I've tried updating the scons build (to no avail) to include:
"fvisibility=hidden -fvisibility-inlines-hidden -
DOGRE_GCC_VISIBILITY "

I've haven't attempted a full build of boost with gcc3.4.6 or gcc4.1.x
due to the problems compiling python-ogre with these compilers.

kresim...@gmail.com

unread,
Apr 19, 2007, 4:45:48 PM4/19/07
to Python Ogre Developers
wait, isn't python ogre having prebrems with gcc3 as well as gcc4.1?

shouli I try to compile ogre svn instead?

dermont

unread,
Apr 20, 2007, 12:14:16 AM4/20/07
to Python Ogre Developers
>> shouli I try to compile ogre svn instead?
No, you should stick with current version of ogre.

>> wait, isn't python ogre having prebrems with gcc3 as well as gcc4.1?

Yes I think I said that above. The problem with singletons, for me,
initally cropped up on pyogre when I moved from ogre1.4.0RC1 to
ogre1.4. For me, compiling pyogre with gcc3.4.6 resolved it. The
"gcc3.4.6 ogre only compile" was only a hack to see if it resolved the
singleton problem ( I know I should go through the whole build cycle
gccxml, python-ogre gcc with gcc3 but it doesn't work)

Three people (all Ubuntu) have posted this problem. Here gcc4.0.3
'nm' reports the singleton symbols as undefined. I've tried tracking
this down with various combinations of gcc - compiling ogre, gccxml ,
running pygccxml (with visiblity flags on/off), compiling pygccxml
(with visiblity flags on/off) to no avail. I'm probably missing some
basic step here but I don't know what.

As always you should wait for the offical developers to guide you. I
know I am.

On Apr 20, 4:45 am, "kresimir.s...@gmail.com"

dermont

unread,
Apr 20, 2007, 12:20:29 AM4/20/07
to Python Ogre Developers
typo:
>> compiling pygccxml(with visiblity flags on/off) to no avail
compiling python-ogre(with visiblity flags on/off) to no avail

Andy Miller

unread,
Apr 20, 2007, 1:23:15 AM4/20/07
to python-ogre...@googlegroups.com
Can you confirm it is only this one singleton that fails...
Thanks
Andy

dermont

unread,
Apr 20, 2007, 4:05:57 AM4/20/07
to Python Ogre Developers
>> Can you confirm it is only this one singleton that fails...

No from what I've seen it applies to all singletons, creating a simple
module
for say pyogre:

with singletons results in undefined symbols
without imports OK.

Here's a sample output from nm on the ogre .so for the
LogManagerSingleton.

# nm gcc 3.46 compiled release mode
========================
0019b5f4 t
_GLOBAL__I__ZN4Ogre9SingletonINS_10LogManagerEE12ms_SingletonE
0019ad50 T _ZN4Ogre10LogManager12getSingletonEv
0019ad38 T _ZN4Ogre10LogManager15getSingletonPtrEv
-> 0046fc64 B _ZN4Ogre9SingletonINS_10LogManagerEE12ms_SingletonE
003a9600 r _ZZN4Ogre10LogManager12getSingletonEvE19__PRETTY_FUNCTION__
003a9680 r
_ZZN4Ogre9SingletonINS_10LogManagerEEC1EvE19__PRETTY_FUNCTION__
003a9640 r
_ZZN4Ogre9SingletonINS_10LogManagerEED1EvE19__PRETTY_FUNCTION__

# nm gcc 4.0.3 compiled (-g -O2)
=====================
00154c06 t global constructors keyed to
_ZN4Ogre9SingletonINS_10LogManagerEE12ms_SingletonE
00154aa6 T Ogre::LogManager::getSingleton()
00154a90 T Ogre::LogManager::getSingletonPtr()
-> 003cac24 b Ogre::Singleton<Ogre::LogManager>::ms_Singleton
00307ae0 r Ogre::LogManager::getSingleton()::__PRETTY_FUNCTION__
00307b60 r
Ogre::Singleton<Ogre::LogManager>::Singleton()::__PRETTY_FUNCTION__
00307b20 r
Ogre::Singleton<Ogre::LogManager>::~Singleton()::__PRETTY_FUNCTION__


>From nm manual:
--------------

If lowercase, the symbol is local; if uppercase, the symbol is
global (external).
"B" The symbol is in the uninitialized data section (known as
BSS).


# PythonOgre nm _ogre_.so
==================
01f1115c t global constructors keyed to
_Z38register_SingletonArchiveManager_classv
01f10c92 T register_SingletonArchiveManager_class()
029b37e0 V guard variable for
boost::python::converter::detail::registered_base<Ogre::Singleton<Ogre::ArchiveManager>
const
U Ogre::ArchiveManager::getSingleton()
U Ogre::ArchiveManager::getSingletonPtr()
01f11182 W Ogre::Singleton<Ogre::ArchiveManager>::getSingleton()
U Ogre::Singleton<Ogre::ArchiveManager>::ms_Singleton
01f111d0 W Ogre::Singleton<Ogre::ArchiveManager>::getSingletonPtr()
01f11256 W
boost::detail::sp_counted_impl_pd<Ogre::Singleton<Ogre::ArchiveManager>*,
boost::python::converter::shared_ptr_deleter>::get_deleter(std::type_info
const&)


Importing
======
ImportError: ./_ogre.so: undefined symbol:
_ZN4Ogre9SingletonINS_14ArchiveManagerEE12ms_SingletonE

>From Ogre (nm)
==========
003c8c18 b
_ZN4Ogre9SingletonINS_14ArchiveManagerEE12ms_SingletonE
(formatted) 003c8c18 b
Ogre::Singleton<Ogre::ArchiveManager>::ms_Singleton


Since it also occuring with pyogre it's probaly a build problem on my
end. I'm going to try a fresh install of
everything on another computer unless anyone has any ideas.

On Apr 20, 1:23 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> Can you confirm it is only this one singleton that fails...
> Thanks
> Andy
>

kresim...@gmail.com

unread,
Apr 20, 2007, 7:06:37 PM4/20/07
to Python Ogre Developers
can someone who has built python-ogre please upload their binaries? so
I can at leest fool arround with python-ogre until this gets resolved

Game_Ender

unread,
Apr 21, 2007, 3:55:32 PM4/21/07
to Python Ogre Developers
I just got to this point as well, and that symbol is missing. Its
quite odd, I am checking a very old binary I have and it has the same
list of missing symbols. So the old _ogre_.so and new one both show
this (for all singletons):
U Ogre::Singleton<Ogre::LogManager>::ms_Singleton
U Ogre::Singleton<Ogre::FontManager>::ms_Singleton

Still I did find on difference though, and this is probably the reason
for the issue, here is some of the output of:

"nm libOgreMain.so | c++filt | grep -i ms_singleton" on the old Ogre
binary that I got Python-Ogre working with:
003d9684 B Ogre::Singleton<Ogre::LogManager>::ms_Singleton
003d8e40 B Ogre::Singleton<Ogre::FontManager>::ms_Singleton

and here is the new one:
003c8a64 b Ogre::Singleton<Ogre::LogManager>::ms_Singleton
003c80e0 b Ogre::Singleton<Ogre::FontManager>::ms_Singleton

So the symbols have switched from global to local, which is probably
why the link if failing. Now to find what changed in the Ogre build
files to cause this.

On Apr 20, 7:06 pm, "kresimir.s...@gmail.com"

Game_Ender

unread,
Apr 21, 2007, 5:08:03 PM4/21/07
to Python Ogre Developers
Hah, got it. After removing all the symbol visibility stuff and
rebuilding Ogre I was able to import Ogre just fine. I think it might
be fixable another way, by applying the fix show in the bug report
dermont linked to. I will investigate if I have the time.

Game_Ender

unread,
Apr 21, 2007, 5:08:37 PM4/21/07
to Python Ogre Developers
Oh, by stuff I mean I commented out the entire section in configre.in
that dealt with symbol visibility.

On Apr 21, 3:55 pm, Game_Ender <jli...@gmail.com> wrote:

dermont

unread,
Apr 22, 2007, 1:07:05 AM4/22/07
to Python Ogre Developers
>>I commented out the entire section in configre.in that dealt with symbol visibility
That was the first thing that I tried as well. The module imported ok
and the demos ran fine. However for all demos I encountred a seg fault
on program unloading (looked like on unloading the GL plugin). Can you
confirm that this isn't the case with you. Ideally the visibility
settings should be configurable in ogre.

dermont

unread,
Apr 22, 2007, 2:11:47 AM4/22/07
to Python Ogre Developers
Ok I just recompiled with the above change you suggested, no seg
faults and everything works OK. Thanks.

Game_Ender

unread,
Apr 22, 2007, 2:37:44 AM4/22/07
to Python Ogre Developers
No problem, now if only my app would work right..., currently chasing
down a problem in OgreNewt.

Game_Ender

unread,
Apr 22, 2007, 1:49:12 PM4/22/07
to Python Ogre Developers
For anyone who hits a random crash in OgreNewt when you try to update
the world, there is something wrong with the SSE version of the
Netwon's update function on some versions of Linux. Adding
NewtonSetPlatformArchitecture(m_world, 0); To the OgreNewt::World
constructor fixes this. See these forum posts for more information:
http://newtondynamics.com/forum/viewtopic.php?t=1496&highlight=linux+crash
http://newtondynamics.com/forum/viewtopic.php?t=3201&start=15
Message has been deleted

kresim...@gmail.com

unread,
Apr 23, 2007, 11:12:45 AM4/23/07
to Python Ogre Developers
I comented out the visibility part in ogrenew/configure.in and
recompiled ogre with scons, but the unresolved external still remains?
Have I done something wrong? is that the correct file I should coment
out the visibility stuff from?

Game_Ender

unread,
Apr 23, 2007, 12:35:47 PM4/23/07
to Python Ogre Developers
You don't to recompile Python-Ogre, you need to recompilie Ogre
itself. So, go to configure.in and comment out the lines about
visibility (32-53 for me) then run "./bootstrap", "./configure <your
other options>", "make; make install". Then just try python-ogre
again. No need to spend all that time recompiling the wrapper. There
is no scons involved here.

On Apr 23, 11:12 am, "kresimir.s...@gmail.com"

Krešimir Špes

unread,
Apr 23, 2007, 12:46:10 PM4/23/07
to Python Ogre Developers
oh, so the way I see it, libOgreMain.so is ogre library, and _ogre_.so
only contains bindings for python?

one more thing, _ogre_.so and others are huge (~70 MB), how can I
scale that down? I've enabled -O3 optimisations in scons :?

Krešimir Špes

unread,
Apr 23, 2007, 1:33:07 PM4/23/07
to Python Ogre Developers
horray! python-ogre works on my linux box :D

a new issue: RuntimeError: DynamicModule::DynamicModule - Failed to
load module 'libCEGUIExpatParser.so': /usr/lib/libCEGUIExpatParser.so:
undefined symbol: _ZTIN5CEGUI9XMLParserE

I assume the solution is similar: recompile cegui without visibility?

dermont

unread,
Apr 23, 2007, 2:27:25 PM4/23/07
to Python Ogre Developers
I think this should help:
http://www.python-ogre.org/wiki/LinuxNotes (CEGUI)

Krešimir Špes

unread,
Apr 23, 2007, 6:54:45 PM4/23/07
to Python Ogre Developers
I don't get it :? what Am I supposed to do?

this error happens when running CEGUI demos in python-ogre

Game_Ender

unread,
Apr 23, 2007, 7:59:47 PM4/23/07
to Python Ogre Developers
You have to apply the patch to CEGUI source, run ./bootstrap, ./
configure, and make and make install again. The patch is here:
http://dev.mv3d.com/~mike/mv3d/python-ogre/cegui.patch . You do *not*
need to recompile Python-Ogre's CEGUI wrapper.

Irish

unread,
May 12, 2007, 11:29:36 AM5/12/07
to Python Ogre Developers
Is everyone aware that Andy Miller did put together a nice automated
installer?
http://python-ogre.org/attachment/wiki/LinuxNotes/ogre_cvs.sh
I'm trying it out, running into some problems with CMake, it appears.
Any ideas?

CMake Error: The source directory "/home/irish/Projects/python-ogre/
CEGUI-0.5.0/gccxml" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
boost-jam-3.1.13-1-linuxx86/LICENSE_1_0.txt
tar: boost-jam-3.1.13-1-linuxx86/LICENSE_1_0.txt: Cannot open:
Permission denied
tar: Skipping to next header
boost-jam-3.1.13-1-linuxx86/bjam
tar: Error exit delayed from previous errors
generating code
./python-ogre-installer: line 273: cd: python-ogre/code_generators/
ogre: No such file or directory
building python-ogre
./python-ogre-installer: line 292: cd: python-ogre: No such file or
directory

Andy Miller

unread,
May 12, 2007, 11:54:39 AM5/12/07
to python-ogre...@googlegroups.com
There is some work going on with the script at the moment..  Your best bet is to run each line of the script individually to see where it breaks...
 
I suspect the gccxml cvs download failed..
 
Cheers
 
Andy

 

Irish

unread,
May 12, 2007, 8:17:42 PM5/12/07
to Python Ogre Developers
New info:
creating a new directory and trying a "clean" run of the script
appears to be working. I'll post with my results once I get home from
work.

On May 12, 11:54 am, "Andy Miller" <nzmill...@gmail.com> wrote:
> There is some work going on with the script at the moment.. Your best bet
> is to run each line of the script individually to see where it breaks...
>
> I suspect the gccxml cvs download failed..
>
> Cheers
>
> Andy
>

Irish

unread,
May 12, 2007, 11:22:28 PM5/12/07
to Python Ogre Developers
No dice, I was wrong. Same exact error. It seems that gccxml
downloaded fine from CVS (I'm inexperienced with CVS but every file
said "update" and seemed to go fine, but the build process eats
itself:
[100%] Built target documentation
Install the project...
-- Install configuration: ""
-- Install configuration: ""
-- Install configuration: ""
-- Install configuration: ""
-- Install configuration: ""
-- Install configuration: ""
-- Installing /bin/gccxml_cc1plus
CMake Error: Error in cmake code at
/home/irish/Projects/Logoless/gccxml-build/GCC/gcc/cp/
cmake_install.cmake:30:
FILE INSTALL cannot copy file "/home/irish/Projects/Logoless/gccxml-
build/bin/gccxml_cc1plus" to "/bin/gccxml_cc1plus".
Current CMake stack: /home/irish/Projects/Logoless/gccxml-build/
cmake_install.cmake;/home/irish/Projects/Logoless/gccxml-build/GCC/
cmake_install.cmake;/home/irish/Projects/Logoless/gccxml-build/GCC/gcc/
cmake_install.cmake;/home/irish/Projects/Logoless/gccxml-build/GCC/gcc/
cp/cmake_install.cmake
make: *** [install] Error 255


I hope this helps someone else more than it helps me. I'm a bit
stuck.

Andy Miller

unread,
May 12, 2007, 11:38:13 PM5/12/07
to python-ogre...@googlegroups.com
Looks like it trying to install without superuser privledges (and it's not prompting you for  a password???)..
 
Can you try the new script that Renato just posted -- and if that fails wait a day and perhaps Jesse will have another update..
 
I will be back into building under Linux in a couple of days (working through a snapshot build for Windows at the moment) so should be in a better position to help
 
Cheers
Andy

 

Irish

unread,
May 13, 2007, 1:54:55 AM5/13/07
to Python Ogre Developers
Previous error was caused by ois not compiling properly (error was
lurking deeper in the code than was expected), due to the automake
package being installed, which overrides automake1.9
Now it's stuck on:
changing mode of /usr/bin/pyplusplus_gui to 755
changing mode of /usr/bin/pyplusplus_gui.pyw to 755
running install_egg_info
Removing /usr/lib/python2.5/site-packages/Py_-0.9.0.egg-info
Writing /usr/lib/python2.5/site-packages/Py_-0.9.0.egg-info
generating code
Traceback (most recent call last):
File "generate_code.py", line 25, in <module>
import environment
File "../../environment.py", line 287, in <module>
class betagui:
File "../../environment.py", line 293, in betagui
Config.PATH_INCLUDE_betagui
AttributeError: 'module' object has no attribute
'PATH_INCLUDE_betagui'

and betagui doesn't exist yet. Anyone know where it's built, or
downloaded from?

On May 12, 11:38 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> Looks like it trying to install without superuser privledges (and it's not
> prompting you for a password???)..
>
> Can you try the new script that Renato just posted -- and if that fails wait
> a day and perhaps Jesse will have another update..
>
> I will be back into building under Linux in a couple of days (working
> through a snapshot build for Windows at the moment) so should be in a better
> position to help
>
> Cheers
> Andy
>

Andy Miller

unread,
May 13, 2007, 2:10:19 AM5/13/07
to python-ogre...@googlegroups.com
Either remove betagui refernces from environment.py, or add the
include path to pythonogreconfig_posix file - it doesn't matter what
the entry is - just that it exists

Sorry - my fault , will fix the svn
Andy


On 13/05/07, Irish <drummin...@gmail.com> wrote:
>

Irish

unread,
May 15, 2007, 4:13:58 AM5/15/07
to Python Ogre Developers
Most of the problems I've been running into are simple directory
issues. I'm going to see if I can create a list of all the problems
tomorrow, and start fixing the installer one piece at a time.

On May 13, 2:10 am, "Andy Miller" <nzmill...@gmail.com> wrote:
> Either remove betagui refernces from environment.py, or add the
> include path to pythonogreconfig_posix file - it doesn't matter what
> the entry is - just that it exists
>
> Sorry - my fault , will fix the svn
> Andy
>

Reply all
Reply to author
Forward
0 new messages