Purpose of commit 359cf0 ?

Hi there, I see that this fix broke visual studio build in a non trivial manner (a few cephes functions are declared in VS math.h, with incompatible linkage). I don't understand the fix: which platform did it fix, and why not having isfinite matter since we're using npy_ macro in struve.c ? thanks, David

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, 30.08.2013 13:43, David Cournapeau kirjoitti:
I see that this fix broke visual studio build in a non trivial manner (a few cephes functions are declared in VS math.h, with incompatible linkage).
I don't understand the fix: which platform did it fix, and why not having isfinite matter since we're using npy_ macro in struve.c ?
The platform it fixed was Centos 5 + epd-7.0-2-rh5-x86_64 (with Numpy 1.5.1 and Python 2.7.1). There is a weird interaction between the header files, which causes import to fail with ./_ufuncs.so: undefined symbol: isfinite if <math.h> is included before <Python.h> (which is included from amos_wrappers.h). So perhaps the Python setup is just broken there. Other ideas how to fix it? (NB: You can ask Ognen for account on docs.scipy.org if you want to debug it yourself.) *** This seems to show that no matter how trivial the change is, do it via PR rather than just pushing it... Pauli -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlIgw2oACgkQ6BQxb7O0pWDZPgCggOiJZ4bUaWpAOQetqwyTWaMq aGQAniF9zI+ssNErWxb2Vsh6GpiNJ2Cb =Bt9Q -----END PGP SIGNATURE-----

On Fri, Aug 30, 2013 at 5:08 PM, Pauli Virtanen <pav@iki.fi> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
30.08.2013 13:43, David Cournapeau kirjoitti:
I see that this fix broke visual studio build in a non trivial manner (a few cephes functions are declared in VS math.h, with incompatible linkage).
I don't understand the fix: which platform did it fix, and why not having isfinite matter since we're using npy_ macro in struve.c ?
The platform it fixed was Centos 5 + epd-7.0-2-rh5-x86_64 (with Numpy 1.5.1 and Python 2.7.1).
There is a weird interaction between the header files, which causes import to fail with
./_ufuncs.so: undefined symbol: isfinite
if <math.h> is included before <Python.h> (which is included from amos_wrappers.h). So perhaps the Python setup is just broken there.
I can reproduce the error with numpy 1.7.1 on Centos 5, most likely some centos5-specific python header bugs. I would suggest reverting your change + include Python.h first: it makes the bug disappear on Centos 5 at least. I will prepare a PR once I have tested this on all our supported platforms @ Enthought. David
Other ideas how to fix it? (NB: You can ask Ognen for account on docs.scipy.org if you want to debug it yourself.)
***
This seems to show that no matter how trivial the change is, do it via PR rather than just pushing it...
Pauli
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlIgw2oACgkQ6BQxb7O0pWDZPgCggOiJZ4bUaWpAOQetqwyTWaMq aGQAniF9zI+ssNErWxb2Vsh6GpiNJ2Cb =Bt9Q -----END PGP SIGNATURE-----
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
participants (2)
-
David Cournapeau
-
Pauli Virtanen