[Cython] Cygwin: Handling missing C99 long double functions

Erik Bray erik.m.bray at gmail.com
Tue Apr 26 10:58:44 EDT 2016


Hi again,

Sorry if I'm spamming the list too much, but I've encountered another
pretty serious and unfortunate issue with Cython on Cygwin.

The problem now is that many of libm long double functions like sqrtl,
tanl, etc. are missing on Cygwin (missing from newlib to be specific).
I think this is a previously known issue, but nothing's ever really
been done about it.  Well, to be clear, sometimes they're present, but
only when sizeof(double) == sizeof(long double).  However on 64-bit
Cygwin sizeof(long double) == 16, so the functions are simply not
defined.

This seems to be due to lack of interest / effort:
https://www.cygwin.com/ml/cygwin/2011-04/msg00231.html  That post is 5
years old, but I can't find any evidence that this has changed.

There are quite a few tests in Cygwin's test suite that test long
double support.  I guess what I'm asking is what would be the best
thing to do about it.

I could just skip those tests on Cygwin, though I'm not sure the best
way to go about skipping an entire test for a given platform.

More generally though, outside the context of testing, this means
Cygwin will sometimes generate code that cannot be compiled on this
platform, and a question arises as to what to do about that.  I have
some thoughts, but am not sure if it's worth discussing any further or
not.

Thanks,
Erik


More information about the cython-devel mailing list