Thread: [PyOpenGL-Users] Problem with PyOpenGL support under cygwin: ctypes cannot find GL lib(?)
Brought to you by:
mcfletch
From: Martin F. <fe...@in...> - 2007-02-07 15:15:43
Attachments:
cygcheck.out
|
Hi, in trying to get my python OpenGL application to run under cygwin, I installed the PyOpenGL package, version 3.0.0a5 for python 2.4, and ctypes 1.0.1. For one thing, could it be the .egg is broken? I keep getting 225> easy_install PyOpenGL-3.0.0a5-py2.4.egg Processing PyOpenGL-3.0.0a5-py2.4.egg Traceback (most recent call last): File "/usr/bin/easy_install", line 7, in ? sys.exit( File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 1670, in m ain with_ei_usage(lambda: File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 1659, in w ith_ei_usage return f() File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 1674, in < lambda> distclass=DistributionWithoutHelpCommands, **kw File "/tmp/python.340/usr/lib/python2.4/distutils/core.py", line 149, in setup File "/tmp/python.340/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands File "/tmp/python.340/usr/lib/python2.4/distutils/dist.py", line 966, in run_command File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 211, in ru n self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 427, in ea sy_install return self.install_item(None, spec, tmpdir, deps, True) File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 471, in in stall_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 619, in in stall_eggs return [self.install_egg(dist_filename, tmpdir)] File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 670, in in stall_egg dist = self.egg_distribution(egg_path) File "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/easy_install.py", line 661, in eg g_distribution metadata = EggMetadata(zipimport.zipimporter(egg_path)) zipimport.ZipImportError: not a Zip file: 'PyOpenGL-3.0.0a5-py2.4.egg' Well, anyway, the .zip file worked. Now whenever I try to run an OpenGL application, the following happens: Traceback (most recent call last): File "GLvis.py", line 8, in ? from OpenGL.GL import * File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/GL/__init__.py", line 2, in ? from OpenGL.raw.GL import * File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/raw/GL/__init__.py", line 6, in ? from OpenGL.raw.GL.constants import * File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/raw/GL/constants.py", line 7, in ? from OpenGL import platform, arrays File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/platform/__init__.py", line 24, in ? from OpenGL.platform.glx import * File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/platform/glx.py", line 29, in ? mode=ctypes.RTLD_GLOBAL File "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/platform/ctypesloader.py", line 37, in loadLibrary return dllType( name, mode ) File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 312, in __init__ self._handle = _dlopen(self._name, mode) OSError: No such file or directory When this happens, self._name is "GL" and mode is 4. It would seem as though somehow the GL library is not registered(?) with python? I'm at a loss here - can anybody give me a hint? Has there been any successful attempt at running PyOpenGL under cygwin? I append a cygwin configuration dump. Thanks, Martin |
From: Mike C. F. <mcf...@vr...> - 2007-02-08 16:48:03
|
Martin Felder wrote: > Hi, > > in trying to get my python OpenGL application to run under cygwin, I > installed the > PyOpenGL package, version 3.0.0a5 for python 2.4, and ctypes 1.0.1. > For one thing, could it be the .egg is broken? I keep getting > The .egg uploaded to the CheeseShop for some reason appears as a corrupted.zip. The one on SourceForge appears to work (I just installed from that on Win32 yesterday). ... > zipimport.ZipImportError: not a Zip file: 'PyOpenGL-3.0.0a5-py2.4.egg' I'll try to get the next release out ASAP to fix that. It's about time for one anyway. > Well, anyway, the .zip file worked. Now > whenever I try to run an OpenGL application, the following happens: ... > line 29, in ? > mode=ctypes.RTLD_GLOBAL > File > "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/platform/ctypesloader.py", > > line 37, in loadLibrary > return dllType( name, mode ) > File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 312, > in __init__ > self._handle = _dlopen(self._name, mode) > OSError: No such file or directory > > When this happens, self._name is "GL" and mode is 4. It would seem as > though somehow the GL library is not registered(?) with python? I'm at a > loss here - can anybody give me a hint? Has there been any successful > attempt at running PyOpenGL under cygwin? AFAIK there has been no successful attempt. From what I understand one of the tools inside ctypes is using an operation that doesn't work under cygwin, so it winds up unable to find the .so files. I haven't yet gone to the trouble of installing cygwin w/X in order to track down the problem. Likely we'll need to rewrite the find_library code to be able to deal with cygwin (and hopefully get that into ctypes for the next release). Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Thomas H. <th...@ct...> - 2007-02-08 19:35:21
|
Mike C. Fletcher schrieb: > Martin Felder wrote: >> Hi, >> >> in trying to get my python OpenGL application to run under cygwin, I >> installed the >> PyOpenGL package, version 3.0.0a5 for python 2.4, and ctypes 1.0.1. >> For one thing, could it be the .egg is broken? I keep getting >> > The .egg uploaded to the CheeseShop for some reason appears as a > corrupted.zip. The one on SourceForge appears to work (I just installed > from that on Win32 yesterday). > ... >> zipimport.ZipImportError: not a Zip file: 'PyOpenGL-3.0.0a5-py2.4.egg' > I'll try to get the next release out ASAP to fix that. It's about time > for one anyway. >> Well, anyway, the .zip file worked. Now >> whenever I try to run an OpenGL application, the following happens: > ... >> line 29, in ? >> mode=ctypes.RTLD_GLOBAL >> File >> "/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0a5-py2.4.egg/OpenGL/platform/ctypesloader.py", >> >> line 37, in loadLibrary >> return dllType( name, mode ) >> File "/usr/lib/python2.4/site-packages/ctypes/__init__.py", line 312, >> in __init__ >> self._handle = _dlopen(self._name, mode) >> OSError: No such file or directory >> >> When this happens, self._name is "GL" and mode is 4. It would seem as >> though somehow the GL library is not registered(?) with python? I'm at a >> loss here - can anybody give me a hint? Has there been any successful >> attempt at running PyOpenGL under cygwin? > AFAIK there has been no successful attempt. From what I understand one > of the tools inside ctypes is using an operation that doesn't work under > cygwin, so it winds up unable to find the .so files. I haven't yet gone > to the trouble of installing cygwin w/X in order to track down the > problem. Likely we'll need to rewrite the find_library code to be able > to deal with cygwin (and hopefully get that into ctypes for the next > release). I haven't run ctypes under cygwin for a long time, so I'm not sure any longer it works correctly. However, if someone provides working patches I will consider to accept them. Thomas |