Skip to content

sigfm: support OpenCV 5 pkg-config module name - #12

Open
beefsizzle wants to merge 1 commit into
archeYR:cs9711-rebasefrom
beefsizzle:fix/opencv5-pkgconfig
Open

sigfm: support OpenCV 5 pkg-config module name#12
beefsizzle wants to merge 1 commit into
archeYR:cs9711-rebasefrom
beefsizzle:fix/opencv5-pkgconfig

Conversation

@beefsizzle

@beefsizzle beefsizzle commented Aug 12, 2026

Copy link
Copy Markdown

libfprint/sigfm/meson.build requires the opencv4 pkg-config module
unconditionally. OpenCV 5.0 installs opencv5.pc and no longer ships
opencv4.pc, so on distributions that have moved to OpenCV 5 the build fails
at configure time:

Run-time dependency opencv4 found: NO (tried pkg-config and cmake)
libfprint/sigfm/meson.build:4:9: ERROR: Dependency "opencv4" not found (tried pkg-config and cmake)

Arch Linux moved to opencv 5.0.0 on 2026-07-08, which is where I hit this.
It has also been reported independently against the AUR package.

This prefers opencv5 and falls back to opencv4, so both keep working.

Keeping the OpenCV 4 path matters for distributions that haven't moved yet:
Debian stable and the Ubuntu LTS releases will be on OpenCV 4 for some time.

No source changes were needed. The OpenCV API this module uses (cv::SIFT,
cv::BFMatcher, cv::Mat, cv::KeyPoint, cv::DMatch, cv::Point2i) is
unchanged in 5.0. OpenCV 5 does rename the features2d library to features,
but the opencv2/features2d.hpp include still resolves and linking picks up
libopencv_features.so.500 via pkg-config.

OpenCV 5.0 installs opencv5.pc and no longer ships opencv4.pc, so
requiring the opencv4 module unconditionally breaks configure on
distributions that have moved to OpenCV 5:

  libfprint/sigfm/meson.build:4:9: ERROR: Dependency "opencv4" not
  found (tried pkg-config and cmake)

Accept either module name, preferring opencv5, so distributions on
either major version keep working.

No source changes are needed: the OpenCV API used here is unchanged
in 5.0. OpenCV 5 renames the features2d library to features, but the
opencv2/features2d.hpp include still resolves and linking picks up
libopencv_features.so.500 via pkg-config.
@beefsizzle
beefsizzle force-pushed the fix/opencv5-pkgconfig branch from 6972ca4 to 24efa7f Compare August 17, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant