[ pyopengl-Bugs-2130003 ] Loading GLUT on DarwinPlatform failes

"SourceForge.net" <[email protected]> Thu, 27 Nov 2008 10:30:54 +0000
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #2130003, was opened at 2008-09-26 13:19
Message generated for change (Comment added) made by arve_knudsen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2130003&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GLUT
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Loading GLUT on DarwinPlatform failes

Initial Comment:
If the file system was formatted as case sensitive (Leopard offers this option at install time), the following code will fail:

from OpenGL.GLU import *

with

>>> from OpenGL.GLU import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "OpenGL/GLU/__init__.py", line 2, in <module>
    from OpenGL import platform
  File "OpenGL/platform/__init__.py", line 36, in <module>
    _load()
  File "OpenGL/platform/__init__.py", line 27, in _load
    plugin_class = plugin.load()
  File "OpenGL/plugins.py", line 14, in load
    return importByName( self.import_path )
  File "OpenGL/plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "OpenGL/platform/darwin.py", line 27, in <module>
    class DarwinPlatform( baseplatform.BasePlatform ):
  File "OpenGL/platform/darwin.py", line 47, in DarwinPlatform
    mode=ctypes.RTLD_GLOBAL 
  File "OpenGL/platform/ctypesloader.py", line 42, in loadLibrary
    return dllType( name, mode )
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 325, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ('dlopen(glut, 10): image not found', 'glut', None)
>>> 

Proposed fix:

in OpenGL/platform/darwin.py

change line 46 from:
      'glut',
to
      'GLUT',

this will solve the problem.

ikokai <at> gmail <dot> com 





----------------------------------------------------------------------

Comment By: Arve Knudsen (arve_knudsen)
Date: 2008-11-27 11:30

Message:
Regarding why it should be uppercase, I'm guessing it has to do with Mac
conventions, i.e., that frameworks should be capitalized.

----------------------------------------------------------------------

Comment By: Arve Knudsen (arve_knudsen)
Date: 2008-11-27 11:29

Message:
I just ran into this bug too :/ Luckily it is easy to fix (hint hint).

----------------------------------------------------------------------

Comment By: Jonathan Toomim (jtoomim)
Date: 2008-11-07 10:30

Message:
Hmmm... See also bug 1887247.  I don't know why neppord thinks it should be
lowercase.  Heck, I don't know why it should be uppercase except that
that's what works.

----------------------------------------------------------------------

Comment By: Jonathan Toomim (jtoomim)
Date: 2008-11-07 10:23

Message:
I confirm that this problem exists, and the fix described works.  I'm using
OS X Leopard with a case sensitive file system.  Building and installing
PyOpenGL-3.0.0b6 stock will let me do

>>> import OpenGL

but not

>>> import OpenGL.GLUT

which produces the "OSError: ('dlopen(glut, 10): image not found', 'glut',
None)" message described above at the end of the traceback.  Making the
change described above and rebuilding solved the problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2130003&group_id=5988

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net