
Hi there, I'm having a lot of trouble on Snow Leopard. I'm trying to build a 32bit only version of our system.... Turns out I had to use python 2.7a3 in order to get Python --universalsdk to work.... But now numpy fails to build as well... First because of the:
_old_init_posix = distutils.sysconfig._init_posix
error
I got it to use sysconfig instead But now when running python setup.py build install I get: creating build/src.macosx-10.3-fat-2.7 creating build/src.macosx-10.3-fat-2.7/numpy creating build/src.macosx-10.3-fat-2.7/numpy/distutils building library "npymath" sources customize NAGFCompiler Could not locate executable f95 customize AbsoftFCompiler Could not locate executable f90 Could not locate executable f77 customize IBMFCompiler Could not locate executable xlf90 Could not locate executable xlf customize IntelFCompiler Could not locate executable ifort Could not locate executable ifc customize GnuFCompiler Could not locate executable g77 customize Gnu95FCompiler Could not locate executable gfortran customize G95FCompiler Could not locate executable g95 don't know how to compile Fortran code on platform 'posix' C compiler: gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -m32 compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/lgm/cdat/trunk/include/python2.7 -c' gcc: _configtest.c gcc _configtest.o -o _configtest ld: warning: in _configtest.o, file is not of required architecture Undefined symbols: "_main", referenced from: __start in crt1.o ld: symbol(s) not found collect2: ld returned 1 exit status ld: warning: in _configtest.o, file is not of required architecture Undefined symbols: "_main", referenced from: __start in crt1.o ld: symbol(s) not found collect2: ld returned 1 exit status failure. removing: _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 210, in <module> setup_package() File "setup.py", line 203, in setup_package configuration=configuration ) File "/svn/cdat/trunk/build/numpy/numpy/distutils/core.py", line 186, in setup return old_setup(**new_attr) File "/lgm/cdat/trunk/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/lgm/cdat/trunk/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/lgm/cdat/trunk/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/svn/cdat/trunk/build/numpy/numpy/distutils/command/build.py", line 37, in run old_build.run(self) File "/lgm/cdat/trunk/lib/python2.7/distutils/command/build.py", line 127, in run self.run_command(cmd_name) File "/lgm/cdat/trunk/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/lgm/cdat/trunk/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/svn/cdat/trunk/build/numpy/numpy/distutils/command/build_src.py", line 152, in run self.build_sources() File "/svn/cdat/trunk/build/numpy/numpy/distutils/command/build_src.py", line 163, in build_sources self.build_library_sources(*libname_info) File "/svn/cdat/trunk/build/numpy/numpy/distutils/command/build_src.py", line 298, in build_library_sources sources = self.generate_sources(sources, (lib_name, build_info)) File "/svn/cdat/trunk/build/numpy/numpy/distutils/command/build_src.py", line 385, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 670, in get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program Note: it's saying soemtihng about mac 10.3.... Any idea on how to build a pure 32bit numpy on snow leopard? Thx, C.

On 26-Feb-10, at 7:43 PM, Charles سمير Doutriaux wrote:
Any idea on how to build a pure 32bit numpy on snow leopard?
If I'm not mistaken you'll probably want to build against the Python.org Python rather than the wacky version that comes installed on the system. The Python.org installer is a 32-bit Python that installs itself in /Library. David

On Fri, Feb 26, 2010 at 6:59 PM, David Warde-Farley <dwf@cs.toronto.edu> wrote:
On 26-Feb-10, at 7:43 PM, Charles سمير Doutriaux wrote:
Any idea on how to build a pure 32bit numpy on snow leopard?
If I'm not mistaken you'll probably want to build against the Python.org Python rather than the wacky version that comes installed on the system. The Python.org installer is a 32-bit Python that installs itself in /Library.
David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
If you remain with 2.7 then you should also view the thread started 3 days ago: 'distutils problem with NumPy-1.4 & Py-2.7a3 (Snow Leopard)' http://mail.scipy.org/pipermail/numpy-discussion/2010-February/048882.html In particular: Ticket 1355 - that should be resolved with r8260 (thanks Stefan): http://projects.scipy.org/numpy/ticket/1355 Ticket 1409 http://projects.scipy.org/numpy/ticket/1409 Ticket 1345: http://projects.scipy.org/numpy/ticket/1345 Bruce

Thx David, Maybe i will have to try that as a temporary fix. But in the long run i do want to build my own Python. C. On Feb 26, 2010, at 4:59 PM, David Warde-Farley wrote:
On 26-Feb-10, at 7:43 PM, Charles سمير Doutriaux wrote:
Any idea on how to build a pure 32bit numpy on snow leopard?
If I'm not mistaken you'll probably want to build against the Python.org Python rather than the wacky version that comes installed on the system. The Python.org installer is a 32-bit Python that installs itself in /Library.
David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://*mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Bruce Southey
-
Charles سمير Doutriaux
-
David Warde-Farley