gpanders / meta-scipy

OpenEmbedded layer for scipy (ARCHIVED)
https://github.com/tuxable-ltd/meta-scipy
MIT License
18 stars 23 forks source link

Building for target of different words size than host #14

Open jaskij opened 3 years ago

jaskij commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.