On Thu, Dec 10, 2015 at 2:41 AM, Daπid <davidmenhur@gmail.com> wrote:
On 9 December 2015 at 17:11, David Cournapeau <cournape@gmail.com> wrote:
You may have CFLAGS/CXXFLAGS defined, which override the distutils flags. Unset those (or append `-fPIC` to them)
I figured this one out. The culprit is actually FFLAGS. You can set CFLAGS and CXXFLAGS freely.
I noticed that Numpy compiled just fine, but produced errors with f2py; and the errors in Scipy's installation arise when gfortran is invoked. Also, last week I was building some FORTRAN, and I set the corresponding flags; hence the problem. Unsetting FFLAGS fixed the issue (but setting it to the empty string didn't!).
I confirm that distutils is just appending my CFLAGS to the preset ones, which seems to me a sane behaviour. I think f2py should do the same.
Please open an numpy issue for this. Chuck