ruba / cortex-vfx

Automatically exported from code.google.com/p/cortex-vfx
Other
2 stars 1 forks source link

Python2.5 and IECore #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install cortexvfx with python2.5 (for more details, see below "additional 
information")
2. Run python2.5
3. import IECore

What is the expected output? What do you see instead?
I expected it to just import, but can't confirm which python-versions it 
supports. Instead, I get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.5/site-packages/IECore/__init__.py", line 58, in <module>
    from RemovePrimitiveVariables import RemovePrimitiveVariables
  File "/usr/lib64/python2.5/site-packages/IECore/RemovePrimitiveVariables.py", line 77, in <module>
    registerRunTimeTyped( RemovePrimitiveVariables )
  File "/usr/lib64/python2.5/site-packages/IECore/registerRunTimeTyped.py", line 119, in registerRunTimeTyped
    IECore.RunTimeTyped.registerType( prevTypId, typeName, IECore.TypeId( runTypedBaseClass.staticTypeId() ) )
Boost.Python.ArgumentError: Python argument types in
    RunTimeTyped.registerType(TypeId, str, TypeId)
did not match C++ signature:
    registerType(IECore::TypeId, char const*, IECore::TypeId)

What version of the product are you using? On what operating system?
Cortex 5.6.0 on Gentoo Linux with Python 2.5.2.

Please provide any additional information below.
Flags: BOOST_INCLUDE_PATH=/usr/include/boost-1_41/ BOOST_LIB_SUFFIX='' 
OPENEXR_INCLUDE_PATH=/usr/include/OpenEXR FREETYPE_INCLUDE_PATH=/usr/include/ 
INSTALL_PYTHONLIB_NAME=/usr/lib64/python2.5/plat-linux2 
INSTALL_PYTHON_DIR=/usr/lib64/python2.5/site-packages DOXYGEN=/usr/bin/doxygen

Original issue reported on code.google.com by daibou...@gmail.com on 4 Oct 2010 at 5:08

GoogleCodeExporter commented 8 years ago
I've only seen this kind of error before when there has been some sort of 
library mismatch. Either linking to two different versions of boost, or two 
different builds of IECore, or two different versions of python. Or building 
with one and then running with another. Is it possible you have two pythons on 
your system? Or a couple of different builds of boost or IECore?

Usually I debug this kind of problem in a couple of different ways. Firstly I 
might run "ldd _IECore.so" on the binary part of the python module to check 
that it links against the version of python and boost I expect. If that doesn't 
reveal anything unexpected then I might set the environment variable LD_DEBUG 
to "files" before I run python. This prints out information about all libraries 
being loaded at runtime, and often reveals the problem.

Original comment by thehaddo...@gmail.com on 4 Oct 2010 at 5:24

GoogleCodeExporter commented 8 years ago
You might also find this thread useful :

http://groups.google.com/group/cortexdev/browse_thread/thread/7fb762198064c9ff/9
8f87a27d906ea4a?lnk=gst&q=did+not+match+C%2B%2B+signature#98f87a27d906ea4a

Original comment by thehaddo...@gmail.com on 4 Oct 2010 at 5:39

GoogleCodeExporter commented 8 years ago
We have only had one build of Boost so far (1.41) compiled using emerge (so not 
manually).
But for Python, yes we unfortunate have 2.4, 2.5 and 2.6. We only use 2.5 
however which is system default.
In my first tries I actually managed to specify 2.5 search paths but had 
defaulted the system to 2.6 so maybe there are some garbage left.

When running "ldd _IECore.so" I see that all boost-dependent libraries have 
correct version names. I'm not entirely sure what I'm going to look for when 
setting the LD_DEBUG to files but the version names all are correct.
Running the "scons test"-thing results in error right away (so 
test/IECore/resultsPython.txt is empty)

However other stuff got broken after my compiles:
* The symlink /usr/lib64/xorg/modules/extensions/libglx.so got removed so I 
lost my OpenGL support, resulting in no OpenGL applications working anymore. It 
was easily fixed thought once I understood what happened.
* Shake have stoped working. I have been looking at this all morning without 
figuring out what the cause is. The only thing I found out was that the folder 
"/usr/lib32/opengl/xorg-x11/lib/" suddenly contained OpenGL libraries (no other 
machine here has anything inside that folder) and that Shake wanted those 
instead of the original once placed elsewhere on the system. Tried removing 
them and they ended up finding the correct ones.. but still not starting.

Sorry I'm starting to carrying away from the subject. My best shot probably is 
a computer reinstall and try again. But I have done this same thing like 
one-two months ago and had the same problem. I'm the only one knowing any Linux 
here and are still learning the OS myself.. So I could have done something 
wrong somewhere in the process. I'm most worried that it will break again =)

Original comment by daibou...@gmail.com on 5 Oct 2010 at 10:23

GoogleCodeExporter commented 8 years ago
My guess then would be that your libbboost_python was not built against 
python2.5, or that your _IECore.so was not built against python2.5. You can 
check this by running ldd on them and looking for the libpython line.

The changes to libglx.so and your /usr/lib/opengl folder should not have been 
caused by the Cortex install - we make no attempt to change anything along 
those lines. Perhaps they were changed by your package manager when you 
installed other things?

Original comment by john.ima...@gmail.com on 5 Oct 2010 at 3:41

GoogleCodeExporter commented 8 years ago
Closing due to lack of feedback. Cortex tests pass for both python 2.5 and 2.6 
so I believe this was caused by an inadvertent mixing of different versions.

Original comment by john.ima...@gmail.com on 26 Jan 2011 at 1:53