Bug 2332211

Summary: numpy 2.2.0 FTBFS on ELN ppc64le
Product: [Fedora] Fedora Reporter: Yaakov Selkowitz <yselkowi>
Component: numpyAssignee: Gwyn Ciesla <gwync>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, dan, fweimer, gwync, orion, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
URL: https://koji.fedoraproject.org/koji/taskinfo?taskID=126765530
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2339416 (view as bug list) Environment:
Last Closed: 2024-12-17 21:04:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880, 2332159    

Description Yaakov Selkowitz 2024-12-13 01:04:16 UTC
numpy 2.2.0 FTBFS on ELN ppc64le: https://koji.fedoraproject.org/koji/taskinfo?taskID=126765530

Note that, while Fedora uses a POWER8 baseline, ELN targets POWER9 with tuning for POWER10.

Compile error:

  FAILED: numpy/_core/libhighway_qsort_16bit.dispatch.h_VSX2.a.p/src_npysort_highway_qsort_16bit.dispatch.cpp.o
  g++ -Inumpy/_core/libhighway_qsort_16bit.dispatch.h_VSX2.a.p -Inumpy/_core -I../numpy/_core -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/common -I../numpy/_core/src/multiarray -I../numpy/_core/src/npymath -I../numpy/_core/src/umath -I../numpy/_core/src/highway -I/usr/include/python3.13 -I/builddir/build/BUILD/numpy-2.2.0-build/numpy-2.2.0/.mesonpy-5zpkkuqi/meson_cpu -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -mcpu=power9 -DNPY_HAVE_VSX -DNPY_HAVE_VSX_ASM -DNPY_HAVE_VSX3 -DNPY_HAVE_VSX3_HALF_DOUBLE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power9 -mtune=power10 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DNPY_INTERNAL_BUILD -DHAVE_NPY_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -fno-exceptions -fno-rtti -O3 -DNPY_HAVE_VSX2 -mcpu=power8 -DNPY_MTARGETS_CURRENT=VSX2 -MD -MQ numpy/_core/libhighway_qsort_16bit.dispatch.h_VSX2.a.p/src_npysort_highway_qsort_16bit.dispatch.cpp.o -MF numpy/_core/libhighway_qsort_16bit.dispatch.h_VSX2.a.p/src_npysort_highway_qsort_16bit.dispatch.cpp.o.d -o numpy/_core/libhighway_qsort_16bit.dispatch.h_VSX2.a.p/src_npysort_highway_qsort_16bit.dispatch.cpp.o -c ../numpy/_core/src/npysort/highway_qsort_16bit.dispatch.cpp
  In file included from ../numpy/_core/src/common/common.hpp:10,
                   from ../numpy/_core/src/npysort/highway_qsort.hpp:6,
                   from ../numpy/_core/src/npysort/highway_qsort_16bit.dispatch.cpp:1:
  ../numpy/_core/src/common/half.hpp: In member function ‘np::Half::operator float() const’:
  ../numpy/_core/src/common/half.hpp:95:54: error: ‘__builtin_vsx_vextract_fp_from_shorth’ requires the ‘-mcpu=power9’ and ‘-mvsx’ options
     95 |         return vec_extract(vec_extract_fp_from_shorth(vec_splats(bits_)), 0);
        |                                                      ^
  ../numpy/_core/src/common/half.hpp:95:54: note: overloaded builtin ‘__builtin_vec_vextract_fp_from_shorth’ is implemented by builtin ‘__builtin_vsx_vextract_fp_from_shorth’

  FAILED: numpy/_core/libhighway_qsort.dispatch.h_VSX2.a.p/src_npysort_highway_qsort.dispatch.cpp.o
  g++ -Inumpy/_core/libhighway_qsort.dispatch.h_VSX2.a.p -Inumpy/_core -I../numpy/_core -Inumpy/_core/include -I../numpy/_core/include -I../numpy/_core/src/common -I../numpy/_core/src/multiarray -I../numpy/_core/src/npymath -I../numpy/_core/src/umath -I../numpy/_core/src/highway -I/usr/include/python3.13 -I/builddir/build/BUILD/numpy-2.2.0-build/numpy-2.2.0/.mesonpy-5zpkkuqi/meson_cpu -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -std=c++17 -O3 -mcpu=power9 -DNPY_HAVE_VSX -DNPY_HAVE_VSX_ASM -DNPY_HAVE_VSX3 -DNPY_HAVE_VSX3_HALF_DOUBLE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power9 -mtune=power10 -fasynchronous-unwind-tables -fstack-clash-protection -fPIC -DNPY_INTERNAL_BUILD -DHAVE_NPY_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -fno-exceptions -fno-rtti -O3 -DNPY_HAVE_VSX2 -mcpu=power8 -DNPY_MTARGETS_CURRENT=VSX2 -MD -MQ numpy/_core/libhighway_qsort.dispatch.h_VSX2.a.p/src_npysort_highway_qsort.dispatch.cpp.o -MF numpy/_core/libhighway_qsort.dispatch.h_VSX2.a.p/src_npysort_highway_qsort.dispatch.cpp.o.d -o numpy/_core/libhighway_qsort.dispatch.h_VSX2.a.p/src_npysort_highway_qsort.dispatch.cpp.o -c ../numpy/_core/src/npysort/highway_qsort.dispatch.cpp
  In file included from ../numpy/_core/src/common/common.hpp:10,
                   from ../numpy/_core/src/npysort/highway_qsort.hpp:6,
                   from ../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:1:
  ../numpy/_core/src/common/half.hpp: In member function ‘np::Half::operator float() const’:
  ../numpy/_core/src/common/half.hpp:95:54: error: ‘__builtin_vsx_vextract_fp_from_shorth’ requires the ‘-mcpu=power9’ and ‘-mvsx’ options
     95 |         return vec_extract(vec_extract_fp_from_shorth(vec_splats(bits_)), 0);
        |                                                      ^
  ../numpy/_core/src/common/half.hpp:95:54: note: overloaded builtin ‘__builtin_vec_vextract_fp_from_shorth’ is implemented by builtin ‘__builtin_vsx_vextract_fp_from_shorth’

Please fix this as soon as possible, as other packages dependent on numpy will now either FTBFS in ELN or will need to be manually rebuilt once fixed.

Reproducible: Always

Comment 1 Gwyn Ciesla 2024-12-13 18:32:22 UTC
Would simply adding ‘-mcpu=power9’ and ‘-mvsx’ for that arch specifically fix this?

Comment 2 Yaakov Selkowitz 2024-12-13 18:50:01 UTC
-mcpu=power9 -mtune=power10 is already the default for ppc64le in RHEL 10+.  The problem may be that numpy is apparently trying to clever, and has added its own -mcpu=power8.  Packages MUST NOT contradict the default compiler flags.  Hopefully, just getting it to drop -mcpu=power8 will be enough.  If not, then -mvsx MUST NOT be added, but the code must be made to compile without it.