[Pkg-opencl-devel] Bug#1114713: pyopencl: FTBFS with NumPy 2.3

roehling at debian.org roehling at debian.org
Mon Sep 8 20:44:32 BST 2025


Source: pyopencl
Version: 2025.1-1
Severity: important
User: debian-python at lists.debian.org
Usertags: numpy2.3
Tags: ftbfs, forky, sid

Dear maintainer,

During a test rebuild for NumPy 2.3, pyopencl failed to rebuild.

Log Summary:
-------------------------------------------------------------------------------
[...]
[ 57%] Building CXX object CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/implicit.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DNB_COMPACT_ASSERTIONS -I/usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include -I/usr/include/python3.13 -I/usr/share/nanobind/include -g -O2 -ffile-prefix-map=/build/reproducible-path/pyopencl-2025.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -fPIC -fvisibility=hidden -ffunction-sections -fdata-sections -fno-strict-aliasing -MD -MT CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/implicit.cpp.o -MF CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/implicit.cpp.o.d -o CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/implicit.cpp.o -c /usr/share/nanobind/src/implicit.cpp
[ 63%] Linking CXX static library libnanobind-static.a
/usr/bin/cmake -P CMakeFiles/nanobind-static.dir/cmake_clean_target.cmake
/usr/bin/cmake -E cmake_link_script CMakeFiles/nanobind-static.dir/link.txt --verbose=1
/usr/bin/x86_64-linux-gnu-ar qc libnanobind-static.a "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_internals.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_func.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_type.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_enum.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_ndarray.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_static_property.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/nb_ft.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/common.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/error.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/trampoline.cpp.o" "CMakeFiles/nanobind-static.dir/usr/share/nanobind/src/implicit.cpp.o"
/usr/bin/x86_64-linux-gnu-ranlib libnanobind-static.a
gmake[3]: Leaving directory '/tmp/tmpqbeqyngb/build'
[ 63%] Built target nanobind-static
/usr/bin/gmake  -f CMakeFiles/_cl.dir/build.make CMakeFiles/_cl.dir/depend
gmake[3]: Entering directory '/tmp/tmpqbeqyngb/build'
cd /tmp/tmpqbeqyngb/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /build/reproducible-path/pyopencl-2025.1 /build/reproducible-path/pyopencl-2025.1 /tmp/tmpqbeqyngb/build /tmp/tmpqbeqyngb/build /tmp/tmpqbeqyngb/build/CMakeFiles/_cl.dir/DependInfo.cmake "--color="
gmake[3]: Leaving directory '/tmp/tmpqbeqyngb/build'
/usr/bin/gmake  -f CMakeFiles/_cl.dir/build.make CMakeFiles/_cl.dir/build
gmake[3]: Entering directory '/tmp/tmpqbeqyngb/build'
[ 68%] Building CXX object CMakeFiles/_cl.dir/src/wrap_constants.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DPYGPU_PACKAGE=pyopencl -DPYGPU_PYOPENCL -D_cl_EXPORTS -I/usr/lib/x86_64-linux-gnu/python3-numpy/numpy/_core/include -I/usr/include/python3.13 -I/usr/share/nanobind/include -g -O2 -ffile-prefix-map=/build/reproducible-path/pyopencl-2025.1=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -flto=auto -fno-fat-lto-objects -fPIC -fvisibility=hidden -fno-stack-protector -ffunction-sections -fdata-sections -MD -MT CMakeFiles/_cl.dir/src/wrap_constants.cpp.o -MF CMakeFiles/_cl.dir/src/wrap_constants.cpp.o.d -o CMakeFiles/_cl.dir/src/wrap_constants.cpp.o -c /build/reproducible-path/pyopencl-2025.1/src/wrap_constants.cpp
In file included from /build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:101,
                 from /build/reproducible-path/pyopencl-2025.1/src/wrap_constants.cpp:30:
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp: In function ‘nanobind::object pyopencl::enqueue_map_buffer(nanobind::ref<command_queue>, memory_object_holder&, cl_map_flags, size_t, nanobind::object, nanobind::object, nanobind::object, nanobind::object, nanobind::object, bool)’:
/build/reproducible-path/pyopencl-2025.1/src/wrap_helpers.hpp:145:20: error: ‘NPY_FARRAY’ was not declared in this scope; did you mean ‘NPY_FR_Y’?
  145 |       ary_flags |= NPY_FARRAY; \
      |                    ^~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:3494:5: note: in expansion of macro ‘PYOPENCL_PARSE_NUMPY_ARRAY_SPEC’
 3494 |     PYOPENCL_PARSE_NUMPY_ARRAY_SPEC;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_helpers.hpp:147:20: error: ‘NPY_CARRAY’ was not declared in this scope; did you mean ‘NPY_WRAP’?
  147 |       ary_flags |= NPY_CARRAY; \
      |                    ^~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:3494:5: note: in expansion of macro ‘PYOPENCL_PARSE_NUMPY_ARRAY_SPEC’
 3494 |     PYOPENCL_PARSE_NUMPY_ARRAY_SPEC;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp: In function ‘nanobind::object pyopencl::enqueue_map_image(nanobind::ref<command_queue>, memory_object_holder&, cl_map_flags, nanobind::object, nanobind::object, nanobind::object, nanobind::object, nanobind::object, nanobind::object, nanobind::object, bool)’:
/build/reproducible-path/pyopencl-2025.1/src/wrap_helpers.hpp:145:20: error: ‘NPY_FARRAY’ was not declared in this scope; did you mean ‘NPY_FR_Y’?
  145 |       ary_flags |= NPY_FARRAY; \
      |                    ^~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:3579:5: note: in expansion of macro ‘PYOPENCL_PARSE_NUMPY_ARRAY_SPEC’
 3579 |     PYOPENCL_PARSE_NUMPY_ARRAY_SPEC;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_helpers.hpp:147:20: error: ‘NPY_CARRAY’ was not declared in this scope; did you mean ‘NPY_WRAP’?
  147 |       ary_flags |= NPY_CARRAY; \
      |                    ^~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:3579:5: note: in expansion of macro ‘PYOPENCL_PARSE_NUMPY_ARRAY_SPEC’
 3579 |     PYOPENCL_PARSE_NUMPY_ARRAY_SPEC;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp: In function ‘nanobind::object pyopencl::get_mem_obj_host_array(nanobind::object, nanobind::object, nanobind::object, nanobind::object)’:
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:5896:20: error: ‘NPY_FARRAY’ was not declared in this scope; did you mean ‘NPY_FR_Y’?
 5896 |       ary_flags |= NPY_FARRAY;
      |                    ^~~~~~~~~~
      |                    NPY_FR_Y
/build/reproducible-path/pyopencl-2025.1/src/wrap_cl.hpp:5898:20: error: ‘NPY_CARRAY’ was not declared in this scope; did you mean ‘NPY_WRAP’?
 5898 |       ary_flags |= NPY_CARRAY;
      |                    ^~~~~~~~~~
      |                    NPY_WRAP
gmake[3]: *** [CMakeFiles/_cl.dir/build.make:79: CMakeFiles/_cl.dir/src/wrap_constants.cpp.o] Error 1
gmake[3]: Leaving directory '/tmp/tmpqbeqyngb/build'
gmake[2]: *** [CMakeFiles/Makefile2:88: CMakeFiles/_cl.dir/all] Error 2
gmake[2]: Leaving directory '/tmp/tmpqbeqyngb/build'
gmake[1]: *** [Makefile:136: all] Error 2
gmake[1]: Leaving directory '/tmp/tmpqbeqyngb/build'


*** CMake build failed

ERROR Backend subprocess exited when trying to invoke build_wheel
E: pybuild pybuild:389: build: plugin pyproject failed with: exit code=1: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/pyopencl-2025.1/.pybuild/cpython3_3.13  
Traceback (most recent call last):
  File "/usr/bin/pybuild", line 387, in main
    run(func, i, version, c)
    ~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/pybuild", line 325, in run
    result = func(context, args)
  File "/usr/share/dh-python/dhpython/build/plugin_pyproject.py", line 108, in build
    self.build_wheel(context, args)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/share/dh-python/dhpython/build/base.py", line 365, in wrapped_func
    raise Exception(msg)
Exception: exit code=1: python3.13 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/reproducible-path/pyopencl-2025.1/.pybuild/cpython3_3.13  
dh_auto_build: error: pybuild --build -i python{version} -p 3.13 returned exit code 13
make: *** [debian/rules:24: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2025-09-08T06:26:44Z

-------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/debian/developers-roehling.numpy/artifact/2453978/

About the archive rebuild: The build was made on debusine.debian.net,
using sbuild.

You can find the build task here:
https://debusine.debian.net/debian/developers-roehling.numpy/work-request/163715/

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Cheers
Timo



More information about the Pkg-opencl-devel mailing list