buildroot/package/python-numpy/Config.in
Damien DUVAL 1aa59097e6 package/python-numpy: disable numpy if fenv.h is not provided by libc
With a C library which does not provide fenv.h, it won't work at runtime:
Crash after an "import numpy" on python.

Since numpy v1.16.0:
"Alpine Linux (and other musl c library distros) support
We now default to use fenv.h for floating point status error reporting.
Previously we had a broken default that sometimes would not report
underflow, overflow, and invalid floating point operations. Now we can
support non-glibc distrubutions like Alpine Linux as long as they ship
fenv.h."

Disable python-numpy for uClibc to avoid the runtime errors.

ARC's glibc used to have an incomplete fenv.h, but this has been fixed
since commit be0aaaaecd ("toolchain: bump ARC tools to arc-2019.03
release"), so we don't need an exception for ARC.

Two patches attempted to fix the build for uclibc and glibc for ARC, but
didn't fix the runtime issue. Remove those patches.

Signed-off-by: Damien DUVAL <damien.duval@smile.fr>
Signed-off-by: Alexandre PAYEN <alexandre.payen@smile.fr>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-08-03 12:33:15 +02:00

32 lines
873 B
Plaintext

config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
bool
# Numpy has some CPU specific code
default y if BR2_arc
default y if BR2_aarch64
default y if BR2_arm
default y if BR2_armeb
default y if BR2_i386
default y if BR2_mips
default y if BR2_mipsel
default y if BR2_powerpc
default y if BR2_powerpc64
default y if BR2_sh
default y if BR2_x86_64
config BR2_PACKAGE_PYTHON_NUMPY
bool "python-numpy"
depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
# python-numpy needs fenv.h which is not provided by uclibc
depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL
help
NumPy is the fundamental package for scientific computing
with Python.
Note that NumPy needs fenv.h fully supported by the
C library.
http://www.numpy.org/
comment "python-numpy needs glibc or musl"
depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)