[Pythonmac-SIG] Problems with universal Python 2.4.3's distutils
Hi all, I'm running Universal Python 2.4.3 on my Powerbook G4 under OS X 10.4.8. I'm trying to install a package called mpi4py (MPI for Python), and Universal Python's distutils seem to be causing some trouble. It looks like the -arch i386 argument is confusing the linker somehow because my computer is a PPC. Also, I'm not sure what the library rt is, but there doesn't seem to be such a thing on my computer (though I've installed the latest version of Xcode). Does anyone know how I can resolve this? Sorry if this is OT, I didn't know where else to post. Thanks for any advice, Anand Patil Anand-Patils-Computer:~/Desktop/mpi4py-0.4.0rc1 anand$ python setup.py build --mpi=mpich2 running build running build_py running build_ext MPI configuration: from section 'mpich2' in file/s 'mpi.cfg' MPI C compiler:/usr/local/mpich2/bin/mpicc MPI C++ compiler: /usr/local/mpich2/bin/mpicxx building 'mpi4py.libmpi' extension /usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -O3 -I/usr/local/mpich2/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c mpi/ext/libmpi.c -o build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o /usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o -L/usr/local/mpich2/lib -L/usr/local/mpich2 -lmpich -lrt -o build/lib.macosx-10.4-fat-2.4/mpi4py/libmpi.so /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /usr/local/mpich2/lib/libmpich.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: can't locate file for: -lrt collect2: ld returned 1 exit status /usr/bin/ld: for architecture ppc /usr/bin/ld: can't locate file for: -lrt collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccFhLQNI.out (No such file or directory) error: command '/usr/local/mpich2/bin/mpicc' failed with exit status 1 ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] xcode problems
Ronald Oussoren wrote: > What I'd like to see in a future version of Xcode is > a public plugin API (outright Python support would also > be nice of course) and an tool for creating/maintaining > project templates. I'd be happy with just an API for modifying their project files, as currently the format changes every few months in backwards-incompatible ways, and all the tools that hack parsing of it end up stuffed. The suggestion of Apple engineers is to just use AppleScript, as if that is a workable solution... (requires XC to be open, is damn slow, etc.) But yes, it would be nice if, for instance, names in the templates could be changed without looking a bazillion places. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Problems with universal Python 2.4.3's distutils
On Tuesday, October 24, 2006, at 06:09PM, Anand Patil <[EMAIL PROTECTED]> wrote: >Hi all, > >I'm running Universal Python 2.4.3 on my Powerbook G4 under OS X 10.4.8. >I'm trying to install a package called mpi4py (MPI for Python), and >Universal Python's distutils seem to be causing some trouble. It looks >like the -arch i386 argument is confusing the linker somehow because my >computer is a PPC. Also, I'm not sure what the library rt is, but there >doesn't seem to be such a thing on my computer (though I've installed >the latest version of Xcode). Does anyone know how I can resolve this? >Sorry if this is OT, I didn't know where else to post. > >Thanks for any advice, >Anand Patil > >Anand-Patils-Computer:~/Desktop/mpi4py-0.4.0rc1 anand$ python setup.py >build --mpi=mpich2 >running build >running build_py >running build_ext >MPI configuration: from section 'mpich2' in file/s 'mpi.cfg' >MPI C compiler:/usr/local/mpich2/bin/mpicc >MPI C++ compiler: /usr/local/mpich2/bin/mpicxx >building 'mpi4py.libmpi' extension >/usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot >/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double >-no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -O3 >-I/usr/local/mpich2/include >-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c >mpi/ext/libmpi.c -o build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o >/usr/local/mpich2/bin/mpicc -arch ppc -arch i386 -isysroot >/Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup >build/temp.macosx-10.4-fat-2.4/mpi/ext/libmpi.o -L/usr/local/mpich2/lib >-L/usr/local/mpich2 -lmpich -lrt -o >build/lib.macosx-10.4-fat-2.4/mpi4py/libmpi.so >/usr/bin/ld: for architecture i386 >/usr/bin/ld: warning /usr/local/mpich2/lib/libmpich.dylib cputype (18, >architecture ppc) does not match cputype (7) for specified -arch flag: >i386 (file not loaded) >/usr/bin/ld: can't locate file for: -lrt >collect2: ld returned 1 exit status >/usr/bin/ld: for architecture ppc >/usr/bin/ld: can't locate file for: -lrt >collect2: ld returned 1 exit status >lipo: can't open input file: /var/tmp//ccFhLQNI.out (No such file or >directory) >error: command '/usr/local/mpich2/bin/mpicc' failed with exit status 1 The universal build of python builds universal extensions by default. In 2.4.4 you can add ['-arch', 'ppc'] to the extra_compile_args and extra_link_args arguments for Extension (in your setup.py) to build a thin extension. Using CFLAGS and LDFLAGS might work as well, I haven't tested this. IIRC this doesn't work with 2.4.3, the necessary changes were added in 2.5 and 2.4.4. BTW. The best way (TM) to fix your problem is to build mpich2 as a universal binary :-). Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig