multi-build / multibuild

Machinery for building and testing Python Wheels for Linux, OSX and (less flexibly) Windows.
Other
233 stars 85 forks source link

Settings FFLAGS breaks numpy.distutils Fortran compilation #163

Open pv opened 6 years ago

pv commented 6 years ago

The following part in multibuild sets the FFLAGS etc. environment variables: https://github.com/matthew-brett/multibuild/blob/devel/configure_build.sh#L32-L34

However, for numpy.distutils an environment variable with empty value is not the same thing as unset environment variable. Instead, the value of the environment variable fully overrides the default value.

In this case, setting empty FFLAGS removes -fPIC from numpy.distutils fortran compilation. Moreover, numpy.distutils does not use the contents of FFLAGS in constructing the linker command line, so adding -Wl,-strip-all to FFLAGS has no effect --- numpy.distutils appears to only look at the contents of the LDFLAGS variable, cf https://github.com/MacPython/scipy-wheels/pull/31

MarkWieczorek commented 6 years ago

I'm having the same problem. -fPIC is being removed from the compiler options, causing the build to fail.

https://github.com/SHTOOLS/SHTOOLS/issues/149

matthew-brett commented 6 years ago

@pv - what do you think we should do about the FFLAGS?