Bug 15677 - nativesdk-python3-numpy 2.1.3 fails do_compile
Summary: nativesdk-python3-numpy 2.1.3 fails do_compile
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.2 M2
Assignee: Alexander Kanavin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2024-12-02 18:42 UTC by Denys Dmytriyenko
Modified: 2024-12-05 17:28 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denys Dmytriyenko 2024-12-02 18:42:20 UTC
nativesdk-python3-numpy 2.1.3 fails do_compile

MACHINE="qemuarm64"
SDKMACHINE="x86_64"

...
| Has header "features.h" : YES
| Has header "xlocale.h" : NO
| Has header "dlfcn.h" : YES
| Has header "execinfo.h" : YES
| Has header "libunwind.h" : NO
| Has header "sys/mman.h" : YES
| Checking for function "strtold_l" : YES
| Compiler for C supports arguments -O3: YES
| 
| ../numpy-2.1.3/numpy/_core/meson.build:408:46: ERROR: Can not run test applications in this cross environment.
| 
| A full log can be found at /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-logs/meson-log.txt
| 
| ERROR Backend subprocess exited when trying to invoke build_wheel
| WARNING: exit code 1 from a shell command.
ERROR: Task (virtual:nativesdk:/OE/poky-master/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_compile) failed with exit code '1'


And meson.log doesn't say much:

...
-----------
Command line: `x86_64-pokysdk-linux-gcc -march=x86-64 --sysroot=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-private/tmp4hjzmbr6/testfile.c -o /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-private/tmp4hjzmbr6/output.exe -O2 -fcanon-prefix-map -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/numpy-2.1.3=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/numpy-2.1.3=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot= -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot= -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot-native= -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot-native= -pipe -D_FILE_OFFSET_BITS=64 -O0 -std=c11 -Wl,-O1` -> 0
Running compile:
Working directory:  /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-private/tmpnbz7eorf
Code:

    #ifdef _MSC_VER
    #pragma function(__builtin_prefetch)
    #endif
    int main(void) {
      __builtin_prefetch((float*)0, 0, 3);
      return 0;
    };
    
-----------
Command line: `x86_64-pokysdk-linux-gcc -march=x86-64 --sysroot=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-private/tmpnbz7eorf/testfile.c -o /OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build/meson-private/tmpnbz7eorf/output.exe -O2 -fcanon-prefix-map -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/numpy-2.1.3=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/numpy-2.1.3=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/build=/usr/src/debug/nativesdk-python3-numpy/2.1.3 -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot= -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot= -fdebug-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot-native= -fmacro-prefix-map=/OE/poky-master/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-python3-numpy/2.1.3/recipe-sysroot-native= -pipe -D_FILE_OFFSET_BITS=64 -O0 -std=c11 -Wl,-O1` -> 0

../numpy-2.1.3/numpy/_core/meson.build:408:46: ERROR: Can not run test applications in this cross environment.
Comment 1 Denys Dmytriyenko 2024-12-04 23:22:59 UTC
This patch by Alex is supposed to fix the issue:
https://patchwork.yoctoproject.org/project/oe-core/patch/20241204064920.817016-4-alex.kanavin@gmail.com/

Since nothing in OE-Core directly depends on python3-numpy (it's used in ptest), its nativesdk variant never gets pulled into any build on the AB and hence the breakage got missed...
Comment 2 Alexander Kanavin 2024-12-05 16:14:06 UTC
It does fix the issue. The failure no longer occurs with the patch. We can close this when it lands in master.
Comment 3 Alexander Kanavin 2024-12-05 17:28:46 UTC
In master now.