meta-scipy
meta-scipy copied to clipboard
Building for target of different words size than host
I'm trying to build scipy for a 32-bit target (Cortex-A7) using a 64-bit host and am hitting an error which I suppose has something to do with this:
| build/tmp-glibc/work/armv7vet2hf-neon-ultima-linux-gnueabi/python3-scipy/1.5.3-r0/recipe-sysroot-native/usr/include/python3.8/pyport.h:726:2: error: #error "long_bit definition appears wrong for platform (bad gcc/glibc config?)."
| 726 | #error "long_bit definition appears wrong for platform (bad gcc/glibc config?)."
| | ^~~~~
It seems that for whatever reason the native pyport.h is used which due to the word size mismatch will obviously be wrong.
To be specific, this happens when trying to compile pypocketfft.cxx in scipy/fft/_pocketfft.
It seems that the issue here is more with pybind11 than with NumPy or SciPy
I can't share the patch, but _pocketfft's setup.py gets a list of include directories which not only draws in native but even host include directories.