keyjnote exits with OpenGL error

Bug #211962 reported by levien
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pyopengl (Ubuntu)
Triaged
High
Unassigned
python2.6 (Debian)
Fix Released
Unknown

Bug Description

Binary package hint: keyjnote

I'm trying to run keyjnote on the most current Ubuntu server 8.04 beta. Xorg is running fine, Xpdf works fine, glxinfo reports a working GL environment (albeit software rendering), glxgears runs fine, yet keyjnote always gives me the following error:

Welcome to KeyJnote version 0.10.2
Traceback (most recent call last):
  File "/usr/bin/keyjnote", line 160, in <module>
    from OpenGL.GL import *
  File "/usr/lib/python2.5/site-packages/OpenGL/GL/__init__.py", line 2, in <module>
    from OpenGL.raw.GL import *
  File "/usr/lib/python2.5/site-packages/OpenGL/raw/GL/__init__.py", line 6, in <module>
    from OpenGL.raw.GL.constants import *
  File "/usr/lib/python2.5/site-packages/OpenGL/raw/GL/constants.py", line 7, in <module>
    from OpenGL import platform, arrays
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/__init__.py", line 57, in <module>
    _load()
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/__init__.py", line 40, in _load
    plugin_class = _findPlatform( platform )
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/__init__.py", line 28, in _findPlatform
    return entrypoint.load()
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/glx.py", line 8, in <module>
    class GLXPlatform( baseplatform.BasePlatform ):
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/glx.py", line 16, in GLXPlatform
    mode=ctypes.RTLD_GLOBAL
  File "/usr/lib/python2.5/site-packages/OpenGL/platform/ctypesloader.py", line 42, 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)

It seems that python cannot find the OpenGL library, but I don't know anything about Python so I'm having a hard time figuring out what's causing this...

Related branches

Revision history for this message
Stéphan Kochen (stephank) wrote :

I had a similar problem trying to run a Python-based OpenGL application on a minimal install.

It turns out, the Python OpenGL module uses the ctypes module to find libGL, which in turns relies on binutils' objdump.

Try installing the binutils package, and see if this solves your problem.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in keyjnote:
status: New → Incomplete
Revision history for this message
David Herbert (david-webmast) wrote :

Same problem with Impressive 0.10.2r-2 on Debian Lenny, installing binutils fixed it, reported as Debian bug #509821.

Revision history for this message
Lino Mastrodomenico (l-mastrodomenico) wrote :

I still see a problem very similar to this in Ubuntu 9.04.

Running:

    python -c 'import OpenGL.GL'

produces an error very similar to the one reported.

Installing binutils didn't fix this for me. I think this is the same as bug #334213. See that bug for two possible workarounds.

Revision history for this message
Stani (stani) wrote :

binutils fixed keyjnote for me on ubuntu intrepid

Revision history for this message
Paolo Sammicheli (xdatap1) wrote :

Fixed in Debian with Python 2.5.2-15

Changed in keyjnote (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

We could consider to backport changes for both python2.5 and python2.6

affects: keyjnote (Ubuntu) → python2.6 (Ubuntu)
Changed in python2.6 (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Iain Harris (iain-harris) wrote :

I'm gettin the same (or similar) error on OS X with Python 2.6 and the latest PyOpenGL:-

>>> import OpenGL.GL
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/GL/__init__.py", line 2, in <module>
    from OpenGL.raw.GL import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/raw/GL/__init__.py", line 6, in <module>
    from OpenGL.raw.GL.constants import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/raw/GL/constants.py", line 7, in <module>
    from OpenGL import platform, arrays
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 36, in <module>
    _load()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 27, in _load
    plugin_class = plugin.load()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/plugins.py", line 14, in load
    return importByName( self.import_path )
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/platform/glx.py", line 8, in <module>
    class GLXPlatform( baseplatform.BasePlatform ):
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/platform/glx.py", line 16, in GLXPlatform
    mode=ctypes.RTLD_GLOBAL
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/OpenGL/platform/ctypesloader.py", line 53, in loadLibrary
    return dllType( name, mode )
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ('dlopen(GL, 10): image not found', 'GL', None)

Revision history for this message
Matthias Klose (doko) wrote :

reassigning to pyopengl.

affects: python2.6 (Ubuntu) → pyopengl (Ubuntu)
Revision history for this message
Hugo Roy (hugoroy) wrote :

I still have the problem with Karmic Koala. 'binutils' is already installed.

Revision history for this message
Stani (stani) wrote :

I think this is a duplicate of https://bugs.launchpad.net/ubuntu/+source/fretsonfire/+bug/357076

This solution solved it for me:
sudo ln -s /usr/lib/libGL.so.1 /usr/lib/libGL.so

Besides it is not a bug in impressive or fretsonfire... it is a bug in python-opengl which is reproducable by:
$ python
>>> from OpenGL.GL import *

Changed in python2.6 (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.