meta-scipy icon indicating copy to clipboard operation
meta-scipy copied to clipboard

Building for target of different words size than host

Open jaskij opened this issue 4 years ago • 2 comments

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.

jaskij avatar Jan 13 '21 19:01 jaskij

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

jaskij avatar Jan 14 '21 17:01 jaskij

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.

jaskij avatar Jan 20 '21 15:01 jaskij