#1147680#5
Date:
2026-09-14 11:16:23 UTC
From:
To:
Dear maintainer,

Your package fails to build from source against opencv 5.0.0+dfsg-1~exp1,
currently in experimental.

OpenCV 5.0 renames its entire install tree from opencv4 to opencv5 and ships
no compatibility shims:

  * pkg-config: only /usr/lib/<triplet>/pkgconfig/opencv5.pc.  There is no
                opencv4.pc and no opencv.pc.
  * headers:    /usr/include/opencv5/opencv2/..., no /usr/include/opencv4.
  * cmake:      /usr/lib/<triplet>/cmake/opencv5/OpenCVConfig.cmake.  A bare
                find_package(OpenCV) still resolves, but a pinned version
                such as find_package(OpenCV 4.7) no longer matches.
  * modules:    libopencv-calib3d-dev is split into libopencv-calib-dev,
                libopencv-geometry-dev, libopencv-stereo-dev and
                libopencv-ptcloud-dev; libopencv-features2d-dev becomes
                libopencv-features-dev.  The CMake component names change
                with them (features2d -> features).
  * geometry:   the new geometry module is not only a piece of calib3d.  It
                also absorbs shape and contour functions that used to live
                in imgproc -- contourArea, arcLength, approxPolyDP,
                boundingRect, minAreaRect, convexHull and
                getPerspectiveTransform among them -- and opencv2/opencv.hpp
                does not pull in opencv2/geometry.hpp, so code that reached
                those through the umbrella header now needs an explicit
                include of opencv2/geometry.hpp.

In node-opencv's case, utils/find-opencv.js:29 throws (the missing
space is from the script's own string concatenation) "ERROR: failed
to run: pkg-configopencv4 --cflags - Is OpenCV installed?" because
the script hardcodes the module name "opencv4" when invoking
pkg-config, with no fallback to another name, so gyp's configure step
aborts inside override_dh_auto_configure before any compilation
happens. The maintainer should edit utils/find-opencv.js to also try
"opencv5" (e.g. probe pkg-config --exists in the order opencv5,
opencv4, opencv and use whichever succeeds) so the module can locate
OpenCV 5's pkg-config file.

The same source builds fine in the same chroot against the OpenCV 4.10
packages currently in unstable, so this is specific to OpenCV 5.

The relevant part of the build log follows; the full log is attached.


  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.xml' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.html' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.gyp' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.md' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.png' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.jpg' -exec chmod a-x {} \;
  find /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
-name '*.h' -exec chmod a-x {} \;
  chmod a-x examples/make-example-files.sh
  chmod a-x examples/make-example-files.sh
  dh_auto_configure
  node-gyp configure
  gyp info it worked if it ends with ok
  gyp info using node-gyp@13.0.2
  gyp info using node@24.20.0 | linux | x64
  gyp info find Python using Python version 3.14.7 found at "/usr/bin/python3"
  gyp info spawn /usr/bin/python3
  gyp info spawn args [
  gyp info spawn args '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
  gyp info spawn args 'binding.gyp',
  gyp info spawn args '-f',
  gyp info spawn args 'make',
  gyp info spawn args '-I',
  gyp info spawn args
'/build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b/build/config.gypi',
  gyp info spawn args '-I',
  gyp info spawn args '/usr/share/nodejs/node-gyp/addon.gypi',
  gyp info spawn args '-I',
  gyp info spawn args '/usr/include/nodejs/common.gypi',
  gyp info spawn args '-Dlibrary=shared_library',
  gyp info spawn args '-Dvisibility=default',
  gyp info spawn args '-Dnode_root_dir=/usr/include/nodejs',
  gyp info spawn args '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
  gyp info spawn args
'-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
  gyp info spawn args
'-Dmodule_root_dir=/build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b',
  gyp info spawn args '-Dnode_engine=v8',
  gyp info spawn args '--depth=.',
  gyp info spawn args '--no-parallel',
  gyp info spawn args '--generator-output',
  gyp info spawn args 'build',
  gyp info spawn args '-Goutput_dir=.'
  gyp info spawn args ]
  /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b/utils/find-opencv.js:29
                throw new Error("ERROR: failed to run: pkg-config" +
opencv + " " + flag + " - Is OpenCV installed?");
                ^

  Error: ERROR: failed to run: pkg-configopencv4 --cflags - Is OpenCV installed?
      at /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b/utils/find-opencv.js:29:21
      at ChildProcess.exithandler (node:child_process:424:5)
      at ChildProcess.emit (node:events:514:28)
      at maybeClose (node:internal/child_process:1141:16)
      at Socket.<anonymous> (node:internal/child_process:498:11)
      at Socket.emit (node:events:514:28)
      at Pipe.<anonymous> (node:net:363:12)

  Node.js v24.20.0
  gyp: Call to 'node utils/find-opencv.js --cflags' returned exit
status 1 while in binding.gyp. while trying to load binding.gyp
  gyp ERR! configure error
  gyp ERR! stack Error: `gyp` failed with exit code: 1
  gyp ERR! stack at ChildProcess.<anonymous>
(/usr/share/nodejs/node-gyp/lib/configure.js:321:18)
  gyp ERR! stack at ChildProcess.emit (node:events:514:28)
  gyp ERR! stack at ChildProcess._handle.onexit
(node:internal/child_process:295:12)
  gyp ERR! System Linux 6.12.101+deb13-amd64
  gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "configure"
  gyp ERR! cwd /build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b
  gyp ERR! node -v v24.20.0
  gyp ERR! node-gyp -v v13.0.2
  gyp ERR! not ok
  make[1]: *** [debian/rules:27: override_dh_auto_configure] Error 1
  make[1]: Leaving directory
'/build/reproducible-path/node-opencv-7.0.0+git20200316.f0a03a4b'
  make: *** [debian/rules:14: binary] Error 2
  dpkg-buildpackage: error: debian/rules binary subprocess failed with
exit status 2
  --------------------------------------------------------------------------------

Please close this bug if it turns out to be a collision with another ongoing
transition rather than an OpenCV 5 problem.

Thanks,
Aron