#31 CVS HEAD does not build (OS-X)

v2.0.1
closed-fixed
build (28)
5
2003-10-26
2002-04-15
Jack Jansen
No

I checked out PyOpenGL from CVS (because the most recent distribution doesn't support Mac OS X yet), but it doesn't build.

First it runs into a shallow error (missing semicolon) in interface/WGL/util.inc, but then it runs into serious problems compiling GL.ARB.matrix_palette.c: lots of undeclared variables, etc.

Tried the whole process again on Linux (to make sure it isn't a Mac OS specific problem) with exactly te same results.

Discussion

1 2 > >> (Page 1 of 2)
  • Jack Jansen
    Jack Jansen
    2002-04-15

    Logged In: YES
    user_id=45365

    Update: I can now build from CVS, after downgrading SWIG to 1.3.9 (I started with the most recent SWIG, 1.3.11), and after fixing a few other things. The main thing I had to fix was add support for extra_link_args in the .cfg file, so I could pass the "-framework GLUT" needed for linking GLUT.

    Let me now I you want this patch,

     
  • Greg Copeland
    Greg Copeland
    2002-06-22

    Logged In: YES
    user_id=40173

    Would you mind submiting a patch for your changes? I think
    this may have some value for others!

    Thanks!

     
    • summary: CVS HEAD does not build --> CVS HEAD does not build (OS-X)
     
  • Logged In: YES
    user_id=34901

    Changed summary to be a little more descriptive

     
  • Jack Jansen
    Jack Jansen
    2002-12-29

     
    Attachments
  • Jack Jansen
    Jack Jansen
    2002-12-29

    Logged In: YES
    user_id=45365

    Sorry for the delay, but here is the patch that I use to make PyOpenGL build on MacOSX. This is with Python 2.3a0 (i.e. the CVS version), MacOSX 10.2.3, developer tools Dec 2002 (but that shouldn't matter much) and swig 1.3.13 (this is very important). The patch to setup.py is needed for the current state of distutils in CVS, it may not be needed in the future.

     
  • Logged In: YES
    user_id=34901

    Patch looks fine to me, I was expecting something much
    larger. Jack, can you explain what the:

    self.output_dir = "" # Try by Jack

    in config.py line is trying to do and/or why it is needed?
    The comment isn't really that helpful ;) .

     
  • Jack Jansen
    Jack Jansen
    2002-12-30

    Logged In: YES
    user_id=45365

    The "self.output_dir = "" # Try by Jack" is a hack, and I'm not sure whether it is needed, or will be needed in the future.

    Distutils in CVS has changed to use the directory part of source files to create the path of the .o file. This was in response to an SF bug report that you couldn't have two source files of the same name in a single distribution, even if they were in different directories. Unfortunately this fix broke building PyOpenGL. After I added this line things work again for me, but it doesn't really look like the correct fix.

    The correct course of action would probably be to comment this out, test building PyOpenGL with CVS python without it, and submitting a Python bug report if it doesn't build.

     
  • Bob Ippolito
    Bob Ippolito
    2003-02-12

    Logged In: YES
    user_id=139309

    I have created a new patch (as soon as I figure out how to
    upload it), that allows PyOpenGL to build on stock python
    2.2 for OS X (but requires the Makefile.jaguar Python
    application bundle to be actually useful).. it works around
    (at least) three major bugs that make it hard to compile
    PyOpenGL:
    (1) stock python 2.2 can't have two C extensions with the
    same filename, so I renamed the __init___.so files to
    something else
    (2) OS X GLUT changes the working directory on glutInit
    (3) OS X requires ranlib for static libraries

    To compile, one must also change
    /usr/lib/python2.2/config/Makefile.. -arch i386 needs to be
    removed and this needs to be added (in place of their
    existing definitions):
    LDSHARED= $(CC) $(LDFLAGS) -bundle -bundle_loader
    /usr/bin/python
    BLDSHARED= $(CC) $(LDFLAGS) -bundle -bundle_loader
    /usr/bin/python

    The makefile changes fix problems regarding the dynamic
    linker in OS X, where exported symbols from multiple modules
    that use SWIG conflict when linked with flat_namespace...
    using bundle_loader and not flat_namespace uses two level
    namespaces and makes it happy.

    It should not harm compilation on any other platform, and it
    integrates Jack's changes as well. This is meant for CVS
    head of PyOpenGL with no additional changes.

    Also, I make have changed tabs to 4-spaces in some of these
    files.. sorry.

     
  • Logged In: YES
    user_id=34901

    We have at least one report of building w/out problem on
    OS-X, so I'm going to call this one closed.

     
1 2 > >> (Page 1 of 2)