Resending to list, because I got bounced from my usual address. This is a general problem with the system Python and XCode4, and it affects *all* compiled extensions.
If ARCHFLAGS is unset, distutils defaults to using '-arch ppc -arch i386 -arch x86_64', despite the fact that XCode4 removed ppc support. The general solution is to: a) always have ARCHFLAGS set (it can be empty, as long as it's set) or b) edit distutils.sysconfig, where it sets this default (~ L575 of /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/sysconfig.py) -MinRK > On Sun, May 15, 2011 at 17:01, Gleb Lomakin <[email protected]> wrote: >> DIY >> $export ARCHFLAGS="-arch x86_64 -arch i386" >> resolves. >> Anyway it's walkaround, not a sloution. >> >> On Sun, May 15, 2011 at 10:51 PM, Gleb Lomakin <[email protected]> wrote: >>> Trying to install pycuda to my mac (snow leopard 10.6.7, xcode 4.0.2 >>> (full install), boost and other preq done) >>> >>> Getting following error: >>> >>> building '_pvt_struct' extension >>> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -fwrapv -Wall -O3 >>> -DNDEBUG -arch i386 -arch ppc -arch x86_64 -pipe >>> -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 >>> -c src/wrapper/_pycuda_struct.c -o >>> build/temp.macosx-10.6-i386-2.6/src/wrapper/_pycuda_struct.o >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:273: warning: ‘_range_error’ defined but not >>> used >>> /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler >>> (/usr/bin/../libexec/gcc/darwin/ppc/as or >>> /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not >>> installed >>> Installed assemblers are: >>> /usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64 >>> /usr/bin/../libexec/gcc/darwin/i386/as for architecture i386 >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:273: warning: ‘_range_error’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:1553: fatal error: error writing to -: Broken >>> pipe >>> compilation terminated. >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> lipo: can't open input file: /var/tmp//ccpmcWns.out (No such file or >>> directory) >>> error: command 'gcc-4.2' failed with exit status 1 >>> make: *** [all] Error 1 >>> >>> >>> And i do have /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as >>> I know that so i twitched my siteconf.py with following settings: >>> >>> CXXFLAGS = ["-arch", "x86_64", "-arch", "i386", "-m32"] >>> LDFLAGS = ["-arch", "x86_64", "-arch", "i386", "-m32"] >>> >>> ^^^^^^ no PowerPC here ^^^^^^ >>> >>> and i still getting the same error. >>> >>> And it's not all. As i do have some PPC AS, and some experience in >>> getting-to-work funny open-source applications with messed >>> dependencies i've just "ln -s" >>> from /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1 to >>> /usr/local/libexec/gcc/darwin/ppc >>> >>> Now i got new error: >>> >>> building '_pvt_struct' extension >>> gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -fwrapv -Wall -O3 >>> -DNDEBUG -arch i386 -arch ppc -arch x86_64 -pipe >>> -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 >>> -c src/wrapper/_pycuda_struct.c -o >>> build/temp.macosx-10.6-i386-2.6/src/wrapper/_pycuda_struct.o >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:273: warning: ‘_range_error’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:273: warning: ‘_range_error’ defined but not >>> used >>> /usr/bin/../libexec/gcc/darwin/ppc/as: can't fork a new process to >>> execute: /usr/bin/../libexec/gcc/darwin/ppc/as (Resource temporarily >>> unavailable) >>> src/wrapper/_pycuda_struct.c:1553: fatal error: error writing to -: Broken >>> pipe >>> compilation terminated. >>> src/wrapper/_pycuda_struct.c:249: warning: ‘unpack_float’ defined but not >>> used >>> src/wrapper/_pycuda_struct.c:261: warning: ‘unpack_double’ defined but not >>> used >>> lipo: can't open input file: /var/tmp//cciIBEGT.out (No such file or >>> directory) >>> error: command 'gcc-4.2' failed with exit status 1 >>> make: *** [all] Error 1 >>> >>> >>> I'm not first one who got this error, so, i hope, there is some >>> solution allready, or you can give me A Good Advice. >>> Must i somehow disable "-arch ppc" key to the gcc or better to get >>> real PPC AS in /usr/local/libexec/gcc/darwin/ppc? >>> >>> Same case here: http://www.mail-archive.com/[email protected]/msg01810.html >>> >> >> _______________________________________________ >> PyCUDA mailing list >> [email protected] >> http://lists.tiker.net/listinfo/pycuda >> > _______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
