Fixed. My siteconf.py was as above but with minor changes: # if on Snow Leopard, include these lines: #CXXFLAGS = ["-arch", "x86_64", "-arch", "i386"] #LDFLAGS = ["-arch", "x86_64", "-arch", "i386"] CXXFLAGS = ["-arch", "i386", "-mmacosx-version-min=10.6"] LDFLAGS = ["-arch", "i386", "-mmacosx-version-min=10.6"] CXXFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk']) LDFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk'])
i.e. I removed x86_64 (I only want a 32bit build) and forced -mmacosx-version-min to be 10.6 (this seems to double for MACOSX_DEPLOYMENT_TARGET but this change actually made it work...). Possibly Python's default build rule was ignoring the shell's MACOSX_DEPLOYMENT_TARGET? Anyhow, forcing the above cleans up all the build warnings about 10.4 that I was seeing (these only disappeared after adding -mmacosx-version-min) and it all built cleanly. 'python demo.py' now works. All I did was make the above changes so my full siteconf.py is: ---- BOOST_INC_DIR = [] BOOST_LIB_DIR = [] BOOST_COMPILER = 'gcc' USE_SHIPPED_BOOST = True BOOST_PYTHON_LIBNAME = ['boost_python-gcc43-mt'] BOOST_THREAD_LIBNAME = ['boost_thread-gcc43-mt'] CUDA_TRACE = False CUDA_ENABLE_GL = False CUDA_ENABLE_CURAND = True CUDA_ROOT = '/usr/local/cuda' CUDADRV_LIB_DIR = [] CUDADRV_LIBNAME = ['cuda'] CUDART_LIB_DIR = [] CUDART_LIBNAME = ['cudart'] CXXFLAGS = ["-arch", "i386", "-mmacosx-version-min=10.6"] LDFLAGS = ["-arch", "i386", "-mmacosx-version-min=10.6"] CXXFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk']) LDFLAGS.extend(['-isysroot', '/Developer/SDKs/MacOSX10.6.sdk']) ---- siteconf.py was originally generated using './configure.py', then I made the changes reflected above. Next I did: sudo make clean sudo make sudo make install cd examples python demo.py python dump_properties.py Rather than go edit the wiki without guidance - can anyone else who built for Python 2.7/Snow Leopard agree with the changes I made? i. On 13 June 2011 12:43, Ian Ozsvald <[email protected]> wrote: > Hi again Andreas :-) I agree that 10.4 is ancient. > > I should have said that I'd already tried: > MACOSX_DEPLOYMENT_TARGET=10.6 (I'm on 10.6) > and just now I tried > MACOSX_DEPLOYMENT_TARGET=10.5 > but the error is exactly the same. > > I've got Python 2.7 (32bit), Python 2.6 (64bit default) and two > versions of gcc (4.0, 4.2 as supplied by XCode) - I've no idea if the > conflict exists in here somewhere. The difficulty with Snow Leopard > (10.6) being that it is both 32bit and 64bit and the default Python is > 2.6 64bit (hence my installation of 2.7 32bit which I've been using > for months). > > Does anyone have a Python 2.7 build of pyCUDA running on MacOS 10.6? > > Any other thoughts on Mac building? > > Ian. > > On 13 June 2011 01:30, Andreas Kloeckner <[email protected]> wrote: >> On Mon, 13 Jun 2011 00:05:11 +0100, Ian Ozsvald <[email protected]> wrote: >>> Hello. Last January I had some troubles building pyCUDA on my Macbook >>> (Leopard), now I've upgraded to Snow Leopard and am trying to get CUDA >>> 4 running and (inevitably) it isn't going smoothly. >>> >>> If anyone can point out any obvious errors in my setup, I'd love your >>> feedback. I watched the original notes about Snow Leopard build issues >>> over the last year, I'd hoped it would go smoother! >>> >>> I'm hoping to add pyCUDA to my EuroPython tutorial on High Performance >>> Python Computing, it'd be grand to give a short demo (I'm covering >>> Cython, ShedSkin, numpy etc). >> >> A quick Google search seems to suggest that you need to set >> >> MACOSX_DEPLOYMENT_TARGET=10.5 >> >> Please let me know if this is successful, in which case I'd automate >> this, on the assumption that almost noone is on 10.4 and earlier...? >> >> Andreas >> >> > > > > -- > Ian Ozsvald (A.I. researcher, screencaster) > [email protected] > > http://IanOzsvald.com > http://SocialTiesApp.com/ > http://MorConsulting.com/ > http://blog.AICookbook.com/ > http://TheScreencastingHandbook.com > http://FivePoundApp.com/ > http://twitter.com/IanOzsvald > -- Ian Ozsvald (A.I. researcher, screencaster) [email protected] http://IanOzsvald.com http://SocialTiesApp.com/ http://MorConsulting.com/ http://blog.AICookbook.com/ http://TheScreencastingHandbook.com http://FivePoundApp.com/ http://twitter.com/IanOzsvald _______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
