[Numpy-discussion] [SciPy-Dev] 1.8.0rc1

Robert Kern robert.kern at gmail.com
Tue Oct 1 12:10:39 EDT 2013


On Tue, Oct 1, 2013 at 5:02 PM, Jack Howarth <howarth at bromo.med.uc.edu>
wrote:
>
> On Tue, Oct 01, 2013 at 04:52:06PM +0100, Robert Kern wrote:
> > On Tue, Oct 1, 2013 at 4:41 PM, Pauli Virtanen <pav at iki.fi> wrote:
> > >
> > > Hi,
> > >
> > > 01.10.2013 16:28, Jack Howarth kirjoitti:
> > > [clip]
> > > > /sw/bin/python2.7 setup.py build
> > > >
> > > > which fails at...
> > > >
> > > > /sw/bin/gfortran -Wall -L/sw/lib
> > build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_litemodule.o
> >
build/temp.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_lite/python_xerbla.o
> > -L/sw/lib -L/sw/lib/gcc4.8/lib/gcc/x86_64-apple-darwin10.8.0/4.8.1
> > -Lbuild/temp.macosx-10.6-x86_64-2.7 -llapack -lptf77blas -lptcblas
-latlas
> > -lgfortran -o
build/lib.macosx-10.6-x86_64-2.7/numpy/linalg/lapack_lite.so
> > > > Undefined symbols for architecture x86_64:
> > > >   "_main", referenced from:
> > > >       start in crt1.10.6.o
> > > [clip]
> > >
> > > Something is screwed up in your build environment: the `-shared` flag
is
> > > missing from the link command.
> > >
> > > Perhaps you have set one of the the environment variables FFLAGS,
> > > CFLAGS, LDFLAGS?
> >
> > Also the `-undefined dynamic_lookup` flag.
>
> The consensus of the fink developers is that you are introducing a bug in
both
> scipy and numpy. The build should be able to pass additional flags on
these
> variables and the scipy/numpy build should be able to append any
additional
> flags required. In particular, both MacPorts and fink will want to be
able to
> pass -L/opt/local/lib or -L/sw/lib via LDFLAGS. The changes added to
scipy and
> numpy have broken this and now require that these additional flags be
manually
> patched into the Makefiles of numpy and scipy rather than just passing
them
> on LDFLAGS as has always worked in the past.

Oh no it hasn't. It has been a consistent thorn in our side for a very long
time. In the case of Fortran modules built by numpy.distutils, $LDFLAGS has
replaced rather than appended flags since time immemorial. It is a
compromise solution to work around the fact that the wide variety of
Fortran compilers are very finicky about their flags, and distutils is not
very accommodating about letting users change the flags to suit their local
environments. If you think you have a better solution to this problem that
does not degrade the existing flexibility, your PR will be cheerfully
accepted. No one thinks this is desirable behavior, but it is most
certainly not *new* behavior.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131001/a9797d0d/attachment.html>


More information about the NumPy-Discussion mailing list