[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] pygame on OSX (10.2.1)



Pete,

The attached patch makes pygame CVS run with Python CVS (2.3a0) and SDL Framework install on my machine. Be aware that I'm totally new to OSX dev, so I might be missing something.

I only needed to do two changes (with the help of Bob):

* config_darwin.py: I added one line to the config file so that Setup is created and it pygame compiles and links on my system (previously the link failed). This is based on Bob's suggestions (see below), but I'm not sure, if that can be a permanent solution.

* SDLmain.m: I've corrected the path of the icon to represent *my* system. I think we need to change that totally, because the way it is now, this file would need to be touched manually based on what version of Python pygame will be compiled against. Maybe this can be changed via some #ifdefs, but I'm not sure.

All examples I tried out lately work fine. Except for a Bus Error or Segmentation Fault when exiting the application. I will try to have a look at that.

Even if the patch can't be applied to pygame at this stage, at least it documents the places where to look for. Others might be interested in running pygame on OSX.

Cheers,
Kaweh

On Montag, November 4, 2002, at 11:26 Uhr, Bob Ippolito wrote:

All you really need to do is add in -framework Cocoa to the link.. I don't recall exactly where this happens, but it should be in config_darwin.py

Dynload is the dynamic run-time linker used by Darwin and OS X (akin to .dll's on windows, .so's on linux.. but with some novel features primarily for Objective C).

-bob

On Monday, Nov 4, 2002, at 13:07 America/New_York, Kaweh Kazemi wrote:

hi,

if this has been discussed a couple of times, my apologizes for asking again. i'm trying to use pygame on OSX (10.2.1 on my iBook). that's what i've done so far:

* cvs checkout of current dev python, build & install (2.3a0) -> done
* Numeric 22.0, build & install -> done
* SDL OSX user package & OSX dev package, install -> done
* same for SDL_image, SDL_ttf, SDL_mixer -> done

so far so good. any of this components builds & installs and seem to work. so the next step would be

* cvs checkout of current dev pygame, build & instal

building pygame gives following error:

building 'pygame.base' extension
gcc -bundle -bundle_loader /usr/local/bin/python build/temp.darwin-6.1-Power Macintosh-2.3/base.o build/temp.darwin-6.1-Power Macintosh-2.3/SDLmain.o -o build/lib.darwin-6.1-Power Macintosh-2.3/pygame/base.so -framework >> SDL
ld: build/temp.darwin-6.1-Power Macintosh-2.3/SDLmain.o illegal reference to symbol: .objc_class_name_NSApplication defined in indirectly referenced dynamic library /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
ld: build/temp.darwin-6.1-Power Macintosh-2.3/SDLmain.o illegal reference to symbol: .objc_class_name_NSAutoreleasePool defined in indirectly referenced dynamic library /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
ld: build/temp.darwin-6.1-Power Macintosh-2.3/SDLmain.o illegal reference to symbol: _CPSEnableForegroundOperation defined in indirectly referenced dynamic library /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
ld: build/temp.darwin-6.1-Power Macintosh-2.3/SDLmain.o illegal reference to symbol: _objc_msgSend defined in indirectly referenced dynamic library /usr/lib/libobjc.A.dylib
error: command 'gcc' failed with exit status 1

this seems to be the last step to get a running pygame on OSX. the build process seems to be very far. imageext.so, mixer_music.so, surfarray.so, sndarray.so, font.so, mixer.so are all build.

because i'm new to OSX (& Unix) development, i'm not sure what to do next to get rid of this problem. the hint in config_darwin.py doesn't help (or i'm doing something wrong). do i need to build SDL from the source archive with any special options (i've read something about dynload, but i'm not sure what that is)? does the build process not work with the SDL OSX binary packages (user & dev)?

thanks for any help,
kaweh

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org


Attachment: config_darwin.py.diff
Description: Binary data