Skip to content
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

Closed
xdmiodz opened this issue Jan 27, 2016 · 5 comments
Closed

Numpy tests fail on musl/AlpineLinux #7128

xdmiodz opened this issue Jan 27, 2016 · 5 comments

Comments

@xdmiodz
Copy link
Contributor

xdmiodz commented Jan 27, 2016

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 in numpy/numpy/core/src/npymath/ieee754.c.src and numpy/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

@kylekyle
Copy link

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.

@charris
Copy link
Member

charris commented Mar 19, 2016

What library does AlpineLinux use? It must be something pretty close to glibc if the same trig functions fail.

@charris
Copy link
Member

charris commented Mar 19, 2016

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 __GNUC__.

@njsmith
Copy link
Member

njsmith commented Mar 19, 2016

Another case where trying to have an explicit list of all bad libm versions
bites us :-/ If someone is feeling particularly inspired, an fully
comprehensive solution would be to tackle #7173.
On Mar 18, 2016 6:13 PM, "Charles Harris" notifications@github.com wrote:

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 GNUC.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#7128 (comment)

@mattip
Copy link
Member

mattip commented Oct 9, 2018

Duplicate of #12095, closing this since the other has more information

@mattip mattip closed this as completed Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants