-
-
Notifications
You must be signed in to change notification settings - Fork 11k
ENH, DOC: Build notes and fixes for Cygwin. #18308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Do you know how difficult it would be to set up a CI run with cygwin, at least for the 64-bit case? Is it supported by github actions/Azure? |
I've heard of someone who's done it. I'll see if I can find their work. The Azure WindowsFast failure seems to be a problem finding |
egor-tensin/setup-cygwin looks promising. Do you want me to try adding that here? In another PR? |
There are a few things already going on in this PR.
I think we should try to set up CI for cygwin in another PR, then circle back to this once it is working. That github action looks plausible, you would need the python package and then could follow the way pypy overrides the PATH to make sure the cygwin python and gcc get used. |
The attempt at a 64-bit Cygwin CI run using GitHub actions is up at #18330. Setting up the Cygwin environment seems to be working fine, it looks like just the running the tests bit that's having trouble. I'm hoping someone here has experience with setting up that side of CI and can help get that working. |
A rebase should fix the test failures. |
7da3732
to
1a9abbf
Compare
@DWesl Needs rebase. How much of this is still needed? |
I think the only bits that haven't gone in one way or another are telling the fortran compiler that Cygwin doesn't have The tests are passing without needing to be told that
Leaving I can do PRs for both, if people are interested. The There's a few options for fixing |
This was suggested by @seiko2plus for debugging a segfault in the tests on Cygwin: numpy#18102 (comment) This test passes on Cygwin, and the whole testsuite has only the failures I expect from running on Cygwin (see numpy#18102 and numpy#16246).
Cygwin inherits Windows's lack of RPATH.
The old function only handled the default `/cygdrive` prefix. This can be customized to different values: `/` and `/mnt` are both common. `/proc/cygdrive` does the same thing, regardless of user customization. `cygpath` handles all of these. There's also a C function if you'd prefer to avoid the `fork()` call, which tends to be slow on Cygwin. Edit: Fix the cyg2win32 function to have correct types. It returned bytes earlier; this should return a string. Edit: Fix docsrting to follow numpydoc.
Move the for loops outside the test body so I can get more than one error at once. STY: Fix long lines flagged by linter.
1a9abbf
to
a254171
Compare
Remaining changes rebased. These are:
I can make separate PRs for these to clarify discussion. On one CI runner, the test
I don't think that's something I did. |
Teach the NumPy build system about Cygwin.
Someone seems to have fixed a number of failing tests, so thank you to whomever that might be.
There are twelve tests that still fail.
np.abs(np.complex256(+-inf+nanj))
givinginf
while the systemcabsl(INFINITY + NAN * _IMAGINARY_I)
givesnan
.np.abs(np.complex256(1.7e4932))
should not beinf
. The systemcabsl(1.1e4932 + 0j) == inf
; larger numbers give me compiler warnings about the literal not fitting in along double
.csqrt{f,}
not using the sign of zero for branch cuts.numpy/core/tests/test_umath.py:TestComplexFunctions.test_loss_of_precision:check
, and the divisor there isnp.arcsinh(z).real
. The systemarcsinhl(1e-20+0j) == 0+0j
np.power(np.complex256(2+0j), 32768+0j)
not raising an overflow FPE. I don't know how to check that one.I can include the tests, written in C, if anyone wants to see those.
Update of #18102, #16246.