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
Numpy tests fail on musl/AlpineLinux #7128
Comments
Yep, still no numpy for alpine users (which is increasingly popular as a docker base). It's made life miserable for our python users. Would love to see a patch. |
What library does AlpineLinux use? It must be something pretty close to glibc if the same trig functions fail. |
OK, it's musl. Is the really no macro to identify the presence of musl? One problem is other libc implementations combined with the gnuc compiler, so we can't just use |
Another case where trying to have an explicit list of all bad libm versions
|
Duplicate of #12095, closing this since the other has more information |
On AlpineLinux, which is a mil based Linux distributive, some of numpy's test fail. The log is attached.
log.txt
There are two types of issues - one for various missed overflow/underflow exceptions, the second one is for incorrect results from musl's trigonometric functions.
The first one can be fixed by including
fenv.h
header in musl builds, AFAIU this can be done innumpy/numpy/core/src/npymath/ieee754.c.src
andnumpy/core/include/numpy/ufuncobject.h
by replacing__GLIBC__
with__GNUC__
The second group can be fixed by disabling the trigonometric functions in
numpy/numpy/core/src/private/npy_config.h
not only for glibc, but also for musl. An issue here is that musl doesn't provide any macro like the__GLIBC__
to detect it.So the question, is numpy interested in such a patch? Could you please share your opinions what is best way to implement it?
Otherwise the patch can be implement in corresponding package for AlpineLinux
The text was updated successfully, but these errors were encountered: