I’m cross-compiling from x86_64-linux to armv7l-linux, including some Python packages.
Numpy (which includes cross compilation) builds fine, but pandas fails. It looks like the build-system Python is being used to run setuptools, but with the site-packages that includes the target system numpy. The numpy import in the pandas setup fails because of the mismatch between the interpreter and the compiled numpy libraries.
This is still on 23.05 with Python 3.10.
Build log:
Sourcing python-remove-tests-dir-hook
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Sourcing python-remove-tests-dir-hook
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/y98c6mqa6ml0jyq3zwqc87c8ahnxs8b3-pandas-1.5.3.tar.gz
source root is pandas-1.5.3
setting SOURCE_DATE_EPOCH to timestamp 1674099055 of file pandas-1.5.3/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing setuptoolsBuildPhase
Traceback (most recent call last):
File "/nix/store/z68k14syamwvrm35v2ca919kywlzlc5k-python3.10-numpy-1.24.2-armv7l-unknown-linux-gnueabihf/lib/python3.10/site-packages/numpy/core/__init__.py", line 23, in <module>
from . import multiarray
File "/nix/store/z68k14syamwvrm35v2ca919kywlzlc5k-python3.10-numpy-1.24.2-armv7l-unknown-linux-gnueabihf/lib/python3.10/site-packages/numpy/core/multiarray.py", line 10, in <module>
from . import overrides
File "/nix/store/z68k14syamwvrm35v2ca919kywlzlc5k-python3.10-numpy-1.24.2-armv7l-unknown-linux-gnueabihf/lib/python3.10/site-packages/numpy/core/overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/pandas-1.5.3/nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 18, in <module>
import numpy
File "/nix/store/z68k14syamwvrm35v2ca919kywlzlc5k-python3.10-numpy-1.24.2-armv7l-unknown-linux-gnueabihf/lib/python3.10/site-packages/numpy/__init__.py", line 141, in <module>
from . import core
File "/nix/store/z68k14syamwvrm35v2ca919kywlzlc5k-python3.10-numpy-1.24.2-armv7l-unknown-linux-gnueabihf/lib/python3.10/site-packages/numpy/core/__init__.py", line 49, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.10 from "/nix/store/h31x3zrwrws1c3392919br8g9isvhh4x-python3-3.10.13/bin/python3.10"
* The NumPy version is: "1.24.2"