I think it should be changed to check to see if the Python interpreter is currently running in 32 bit mode, and then compile to match:
if 'darwin' in sys.platform and sys.maxint == 2147483647: # The Python interpreter is running in 32 bit mode on OS X if "-arch" not in conf["CXXFLAGS"]: conf["CXXFLAGS"].extend(['-arch', 'i386', '-m32']) if "-arch" not in conf["LDFLAGS"]: conf["LDFLAGS"].extend(['-arch', 'i386', '-m32']) Some people (myself included) have to run Python in 32-bit mode on 64-bit OS X for various compatibility reasons (currently including libcudart.dylib, which is only shipped as a 32-bit library). Since the Python which Apple ships is compiled as a fat binary with both 32 and 64 bit versions, we can't know a priori what the right compiler flags are. - bryan On Sep 19, 2010, at 5:55 PM, Andreas Kloeckner wrote: > On Thu, 16 Sep 2010 14:37:31 -0400, gerald wrong <psillymathh...@gmail.com> > wrote: >> Looking at PyCUDA setup.py, I found this: >> >> if 'darwin' in sys.platform: >> # prevent from building ppc since cuda on OS X is not compiled for >> ppc >> # also, default to 32-bit build, since there doesn't appear to be a >> # 64-bit CUDA on Mac yet. >> if "-arch" not in conf["CXXFLAGS"]: >> conf["CXXFLAGS"].extend(['-arch', 'i386', '-m32']) >> if "-arch" not in conf["LDFLAGS"]: >> conf["LDFLAGS"].extend(['-arch', 'i386', '-m32']) >> >> Since 64bit CUDA support on Mac OS X is a reality since at least CUDA3.1, >> this should be changed. I know there are other problems regarding 32/64 >> python stopping 64bit mac users at the moment (including myself), but since >> changes are being made to the PyCUDA code to make it compatible with CUDA3.2 >> anyway... > > It looks like this should just be killed wholesale--right? Or is there > anything more appropriate that it should be changed to? > > Andreas > > _______________________________________________ > PyCUDA mailing list > PyCUDA@tiker.net > http://lists.tiker.net/listinfo/pycuda - bryan
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda