Problems using Opengl

Manfred Hain manfred.k.hain at t-online.de
Thu Dec 9 18:51:40 EST 1999


On Sat, 4 Dec 1999, patrick dutoit wrote:

> Hi
> I have got the Opengl package for Python and I have tested the examples.
> I always obtain the following message:
> Traceback (innermost last):
>   File "first.py", line 3, in ?
>     from OpenGL.GL import *
>   File "/usr/lib/python1.5/site-packages/OpenGL/GL/__init__.py", line 7,
> in ?
>     from _opengl import *
> ImportError: /usr/X11R6/lib/libMesaGL.so.3: undefined symbol:
> XFreePixmap
> 
> Mesa was installed as a rpm package and didn't give me any troubles. So
> I don't understand what happens.
> If you have any idea or if you have meet the problem and have a solution
> to fix it, you're welcome.
> 
> 
> Regards
> 
> 
> 



I just read your question and have a possible solution:
if you "import _opengl" somewhere "XFreePixmap" is needed, which is
contained in "_glumodule". So try "import _glu", then "import _opengl".
I think the "import _opengl" was proposed as a test during installation
of PyOpenGL.


How to find this out?
Scan the symbols of the X-libs (say in path "/usr/X11R6/lib and
not stripped) eg. do a
  nm --print-file-name /usr/X11R6/lib/lib*.so.* | grep "T XFreePixmap"
which should report
  /usr/X11R6/lib/libX11.so.6:0001bdb8 T XFreePixmap
  /usr/X11R6/lib/libX11.so.6.1:0001bdb8 T XFreePixmap
So "libX11" is it.
	  
Looking into the libs (with "ldd") in the directory where
  "_openglmodule" is located 
you find out that "_glumodule" loads "libX11".
	  
	  
To make the expamles in "...site-packages/OpenGL/OpenGL/Demo"
working add the "import _glu" statement into
  "...site-packages/OpenGL/OpenGL/GL/__init.py__" (before "import
OpenGL").


Salu
Manfred
	   
	   




More information about the Python-list mailing list