bastienleonard / pysfml-cython

A Python 2/3 binding for SFML 2, written with Cython
http://pysfml2-cython.readthedocs.org/
Other
68 stars 8 forks source link

Compiling with XCode 4+ error and also a gcc-4.2 question. #50

Open Xavura opened 12 years ago

Xavura commented 12 years ago

XCode 4+ removes PowerPC support so compilation fails with a lipo error. I'm guessing the following is all that's needed to fix this problem:

export ARCHFLAGS="-arch i386 -arch x86_64"

I'm just thinking maybe there's something you can do with your Makefile so that this is handled automatically (I don't know anything about CMake)? I'm [trying to] walk someone through getting this compiled. It would make it a little easier for people who are trying to compile this who aren't used to the whole compilation thing.

Also, I noticed you're explicitly using gcc-4.0, any reason you're not using gcc? I'm just wondering what would happen if say gcc-4.0 was symlinked to gcc-4.2? I'm not really expecting it to work but it's worth a shot heh.

Just gcc-4.0 isn't on the system and I figured I'd try that before having the guy compile gcc 4.0 as it's not available in homebrew etc.

bastienleonard commented 12 years ago

I don't use CMake for this project. The build is handled by a setup script, you can find more information here: http://docs.python.org/distutils/index.html

As far as I can tell it provides no way of specifying the architecture. There's this, but it seems only available for Windows. I think this kind of detail should be handled by the system's packagers, assuming there is some kind of package manager on Mac OS.

There shouldn't be any direct reference to gcc-4.0. The setup script handles this kind of stuff and you can tell it to use another compiler via a command-line option.

Xavura commented 12 years ago

Yeah, it just defaulted to that. We managed to get it working by specifying clang via CC but even though clang was installed it was defaulting to gcc-4.0 for him which was strange because his system only had gcc-4.2.

Just thought I'd bring it up.