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
Would simply adding ‘-mcpu=power9’ and ‘-mvsx’ for that arch specifically fix this?
-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.