PyOpenGL build (was distutils question)

Randall Hopper aa8vb at yahoo.com
Wed Sep 26 14:51:40 EDT 2001


 > Please forgive my ignorance about distutils.  
 > 
 > I'm trying to install PyOpenGL on irix.  I keep getting binary
 > incompatability errors from the linker (o32 vs. n32 problem).  
 > 
 > I need to tell distutils to use a different library path than the
 > default one that it finds for the OpenGL libraries.  I want to change
 > "ld .... -L/usr/lib ..." to "ld ... -L/usr/lib/lib32 ..."  Unfortunatly,
 > I am unable to figure out how.  Thanks for any help.

Just went through this myself.

distutils isn't doing it.  PyOpenGL is (and shouldn't be).  Putting
explicit link refs to /usr/lib is bad on IRIX.  The linker adds the correct
path based on the active ABI setting (-32,-n32,-64,$SGI_ABI,etc.).
distutils uses the compile/link flags that Python used for it's build, and
that is sufficient for compiling/linking a compatible module. 

For now, apply the attached patch (a hack) if your Python was built with
the n32 ABI.  You may be able to null out library_dirs completely, but I
didn't try it.

You may run into other problems later when you try to run the demos though
(I did).  Here, PyOpenGL 2.0.0.44 is building a
site-packages/OpenGL/GL/__init__.so shared object file, which Python 2.1
ignores (reporting that there is no GL module).  Never heard of
__init__.so, but maybe it's something new (?)  I haven't looked into the
fix for this one yet.

Randall

-- 
Randall Hopper
aa8vb at yahoo.com
-------------- next part --------------
--- config/ORIG/irix.cfg	Tue Aug 28 10:11:17 2001
+++ config/irix.cfg	Wed Sep 26 13:59:26 2001
@@ -12,7 +12,7 @@
 build_togl=1
 gl_platform=GLX
 include_dirs=/usr/include:/usr/local/include:/usr/X11/include
-library_dirs=/usr/lib:/usr/local/lib:/usr/X11/lib
+library_dirs=/usr/lib32:/usr/local/lib32
 
 ; a sys.pathsep separated list of the libs needed when linking GL
 [GL]


More information about the Python-list mailing list