#557096 python-opengl: cannot import most submodules

#557096#5
Date:
2009-11-11 23:04:13 UTC
From:
To:
I found this problem trying to use impressive, that tries to import OpenGL.GL. It is the same for most submodules of OpenGL, such as GL, GLU, GLE, platform:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.5/OpenGL/GLU/__init__.py", line 2, in <module>
    from OpenGL import platform
  File "/usr/lib/pymodules/python2.5/OpenGL/platform/__init__.py", line 36, in <module>
    _load()
  File "/usr/lib/pymodules/python2.5/OpenGL/platform/__init__.py", line 27, in _load
    plugin_class = plugin.load()
  File "/usr/lib/pymodules/python2.5/OpenGL/plugins.py", line 14, in load
    return importByName( self.import_path )
  File "/usr/lib/pymodules/python2.5/OpenGL/plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "/usr/lib/pymodules/python2.5/OpenGL/platform/glx.py", line 8, in <module>
    class GLXPlatform( baseplatform.BasePlatform ):
  File "/usr/lib/pymodules/python2.5/OpenGL/platform/glx.py", line 16, in GLXPlatform
    mode=ctypes.RTLD_GLOBAL
  File "/usr/lib/pymodules/python2.5/OpenGL/platform/ctypesloader.py", line 48, in loadLibrary
    return dllType( name, mode )
  File "/usr/lib/python2.5/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ('GL: cannot open shared object file: No such file or directory', 'GL', None)

The file that it tries to load as a dynamic library is “GL”. Not “libGL.so”, but “GL”!
I do not know what is missing on the code, but as it is, it will always fail.

Good luck. :-)

Regards,

#557096#10
Date:
2009-11-17 07:12:45 UTC
From:
To:
Hi,

Python appears to convert "GL" to "libGL.so.1" on my system by running
"/sbin/ldconfig -p" and parsing its output.  Would you please run that
command on your system and send any lines containing "GL" to the bug
report?

#557096#13
Date:
2009-11-17 07:12:45 UTC
From:
To:
Hi,

Python appears to convert "GL" to "libGL.so.1" on my system by running
"/sbin/ldconfig -p" and parsing its output.  Would you please run that
command on your system and send any lines containing "GL" to the bug
report?

#557096#18
Date:
2009-11-17 20:39:17 UTC
From:
To:
Le lundi 16 novembre 2009, Matt Kraai a écrit :
% /sbin/ldconfig -p | grep GL
    libGLU.so.1 (libc6) => /usr/lib/libGLU.so.1
    libGLEW.so.1.5 (libc6) => /usr/lib/libGLEW.so.1.5
    libGL.so.1 (libc6, Système d'exploitation ABI : Linux 2.4.20) => /usr/lib/libGL.so.1

#557096#23
Date:
2009-11-18 14:26:07 UTC
From:
To:
reassign 555834 python2.5
thanks

Hi,

This is a problem with /usr/lib/python2.5/ctypes/util.py, so I'm
reassigning this report to python2.5, which contains that file.

util.py contains the following regular expression:

 r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)'

which doesn't match on your system because "OS ABI" has been
translated.  If it doesn't cause other problems, you should be able to
work around this problem by using the C locale.

#557096#30
Date:
2009-11-18 14:26:07 UTC
From:
To:
reassign 555834 python2.5
thanks

Hi,

This is a problem with /usr/lib/python2.5/ctypes/util.py, so I'm
reassigning this report to python2.5, which contains that file.

util.py contains the following regular expression:

 r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)'

which doesn't match on your system because "OS ABI" has been
translated.  If it doesn't cause other problems, you should be able to
work around this problem by using the C locale.

#557096#35
Date:
2009-11-18 20:11:10 UTC
From:
To:
tag 555834 pending
severity 555834 important
thanks

no, it doesn't make the python2.5 package unusable.

#557096#44
Date:
2009-11-19 14:29:13 UTC
From:
To:
clone 555834 -1
reassign -1 eglibc
thanks

The translation seems to be incomplete, why just translate `OS' an dnot `ABI'?;
IMO it would be better if things like this wouldn't be translated at all.