Fix NumPy 1.21 Cross-Compile in Buildroot 2019.02

Замовник: AI | Опубліковано: 10.12.2025

We have an ARMV7 (32-bit) T113 All Winner development board and it supports Buildroot 2019.02 with Linux 5.4 along with Python 3.7 inbuilt support. Buildroot 2019.02 does not support python 3.9 version but we have already rebuilt with Python 3.9 on an Ubuntu 20.04 LTS workstation. The next hurdle is getting NumPy 1.21 to cross-compile cleanly, then bundling a small set of scientific-audio libraries into the same root fs. At the moment the build stalls with messages such as “toolchain C linking failed”, “Fortran required for compilation”, and the infamous “No module named 'numpy.core._multiarray_umath'”. These errors appear during the host-build detection phase as well as during target compilation, so the solution will likely involve patching Buildroot packages, tweaking site.cfg, and perhaps supplying or disabling a cross-Fortran toolchain. Target Python stack that must end up in the image: • tflite-runtime >= 2.5.0.post1 • numpy >= 1.21.0 • psutil >= 5.5.0 (only for internal diagnostics; will be stripped before release) • soundfile >= 0.13.1 • samplerate >= 0.1.0 What I need from you – Adjust or create Buildroot package definitions and associated Config.in / *.mk files so NumPy 1.21 builds without manual intervention. – Resolve (or cleanly work around) the Fortran requirement while keeping the final image minimal. – Ensure the remaining Python wheels above cross-compile and import successfully on the target board. – Supply clear, repeatable build steps or a patch series I can apply to a fresh Buildroot 2019.02 tree. - Compiled Rootfs.tar is what we require to build the final image. Acceptance criteria 1. Make defconfig && make completes on my side with no errors. 2. Running “python3 -c 'import numpy, soundfile, samplerate, psutil, tflite_runtime as tflite; print(numpy.__version__)'” on the target prints the expected versions. 3. Total root fs growth stays within reason; no unused build-time Fortran binaries left in the target image. 4. Compiled Rootfs.tar is what we require to build the final image. If you have tackled NumPy or other heavy C/Fortran libraries in Buildroot before, this should feel familiar. Let me know what additional diagnostics you need, and I will provide full build logs or access to the current branch.