[Numpy-discussion] scipy binary for macosx tiger on ppc

Robert Kern robert.kern@gmail....
Fri Nov 30 14:16:15 CST 2007


Barry Wark wrote:

> Some remaining issues:
> - which SDK to build against. Leopard ships with a Python build
> against the 10.5 SDK. It would be much easier, at least initially, for
> us to produce binaries against the Leopard Python 2.5.

I would prefer that we use the Python binary from www.python.org. That should
work on 10.3.9+.

> - how to deal with library dependencies such as fftw2. We currently
> use MacPorts but I suppose it needs to be compiled statically or do we
> just require that users install MacPort's fftw2?

"Official" binaries intended for distribution from scipy.org or scipy.sf.net
should not be linked against FFTW or UMFPACK since they are GPLed.

The real problem is the Fortran runtime. It is possible to link against the
Fortran runtime libraries statically so as to avoid needing the user to also
install a Fortran compiler just to run scipy. Use the gfortran compiler built
for R's use (and do not use the one from hpc.sf.net):

  http://r.research.att.com/tools/

Basically, copy the libgfortran.a library to a separate location, say
~/staticlibs/. Then do the following:

  $ export LDFLAGS="-undefined dynamic_lookup -bundle -arch i386 -arch ppc
-Wl,-search_paths_first"
  $ python setup.py config_fc --fcompiler=gnu95 --arch="-arch i386 -arch ppc"
build_ext -L ~/staticlibs/ build

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the Numpy-discussion mailing list