sigfm: support OpenCV 5 pkg-config module name - #12
Open
beefsizzle wants to merge 1 commit into
Open
Conversation
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
force-pushed
the
fix/opencv5-pkgconfig
branch
from
August 17, 2026 17:07
6972ca4 to
24efa7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libfprint/sigfm/meson.buildrequires theopencv4pkg-config moduleunconditionally. OpenCV 5.0 installs
opencv5.pcand no longer shipsopencv4.pc, so on distributions that have moved to OpenCV 5 the build failsat configure time:
Arch Linux moved to
opencv 5.0.0on 2026-07-08, which is where I hit this.It has also been reported independently against the AUR package.
This prefers
opencv5and falls back toopencv4, 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) isunchanged in 5.0. OpenCV 5 does rename the
features2dlibrary tofeatures,but the
opencv2/features2d.hppinclude still resolves and linking picks uplibopencv_features.so.500via pkg-config.