Hi, I've got a bug on pyopengl (http://bugs.debian.org/214026). Seems the immeadiate fix is
--- pymol-0.90.orig/setup.py +++ pymol-0.90/setup.py @@ -32,7 +32,7 @@ else: inc_dirs=["layer0","layer1","layer2","layer3","layer4","layer5"] libs=["GL","GLU","glut","png"] - pyogl_libs = [] + pyogl_libs = ["GL","GLU","glut","png"] lib_dirs=["/usr/X11R6/lib"] def_macros=[("_PYMOL_MODULE",None), # ("_PYMOL_NUMPY",None), Is there a reason why these libraries are not defined in pyogl_libs? With that fix, examples/devel/gl01.py works fine. gl02.py gl03.py still fail though, with this error message: Executive: object "gl02" created. Traceback (most recent call last): File "gl02.py", line 39, in __call__ glVertexPointer(3,0,self.vert) NameError: global name 'glVertexPointer' is not defined Digging a bit into contrib/pyopengl[1], I found that glVertexPointer will only get exported when NUMERIC is defined. As you can see from the patch above, _PYMOL_NUMPY is not defined and thus neither will be NUMERIC. If I uncomment that line above, I get this error while trying to build pymol: building 'pymol.opengl.glu._glu_num' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -D_PYMOL_MODULE -D_PYMOL_NUMPY -D_HAVE_LIBPNG -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -I/usr/include/python2.3 -c contrib/pyopengl/_glu_nummodule.c -o build/temp.linux-i686-2.3/contrib/pyopengl/_glu_nummodule.o In file included from contrib/pyopengl/_glu_nummodule.c:8: contrib/pyopengl/_glumodule.c:660:25: arrayobject.h: No such file or directory In file included from contrib/pyopengl/_glu_nummodule.c:8: contrib/pyopengl/_glumodule.c: In function `py_glu_Build2DMipmaps': contrib/pyopengl/_glumodule.c:737: error: `PyArrayObject' undeclared (first use in this function) contrib/pyopengl/_glumodule.c:737: error: (Each undeclared identifier is reported only once contrib/pyopengl/_glumodule.c:737: error: for each function it appears in.) contrib/pyopengl/_glumodule.c:737: error: `ap' undeclared (first use in this function) contrib/pyopengl/_glumodule.c:754: warning: implicit declaration of function `PyArray_Check' contrib/pyopengl/_glumodule.c:755: error: syntax error before ')' token contrib/pyopengl/_glumodule.c:758: error: syntax error before ')' token contrib/pyopengl/_glumodule.c: At top level: contrib/pyopengl/_glumodule.c:132: warning: `GLUquadricType' defined but not used error: command 'gcc' failed with exit status 1 make: *** [install] Error 1 Finally, when I add HAVE_NUMERIC_ARRAYOBJECT_H to the defines in setup.py, pymol compiles fine[2] but gl02.py still fails: Executive: object "gl02" created. Traceback (most recent call last): File "gl02.py", line 39, in __call__ glVertexPointer(3,0,self.vert) _opengl_num.error: Can't convert this type of array! That's where I stopped debugging stuff, can anybody help me? thanks, Michael [1] btw, is this the standard pyopengl module? Why is it shipped with pymol? If it's modified, can't the changes be sent upstream so that a fork is not necessary? (I haven't checked at all, these thoughts just occured to me now) [2] when byte-compiling, I get this warning with python2.3: /usr/lib/python2.3/site-packages/pymol/opengl/gl/glconst.py:438: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up GL_CLIENT_ALL_ATTRIB_BITS = 0xffffffff