I've seen this problem with glchess, but I didn't want to install libgl1
-mesa-dev.

The problem is that ctypes.util.find_library('GL') should return
'libGL.so.1' and instead returns None.

So an alternative workaround can be:

    from ctypes import util

    def find_library(name):
        fullname = find_library_orig(name)
        if fullname is None and name == 'GL':
            fullname = 'libGL.so.1'
        return fullname
    
    find_library_orig = util.find_library
    util.find_library = find_library

and then start the Python program with execfile(whatever), e.g. for me:

    execfile('/usr/games/glchess')

The root of the problem is that python-opengl should not call
find_library every time a program is run, but it should hardcode a
specific ABI version of the library it wants (e.g. 'libGL.so.1').

The Python ctypes documentation states:

"""
If wrapping a shared library with ctypes, it may be better to determine the 
shared library name at development type, and hardcode that into the wrapper 
module instead of using find_library to locate the library at runtime.
"""

-- 
impressive does not work
https://bugs.launchpad.net/bugs/334213
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to