On Sat, Jan 14, 2017 at 12:20 AM, Luya Tshimbalanga <luya@xxxxxxxxxxxxxxxxx> wrote: > Here is an attempt at building YafaRay using scratch build: > > https://koji.fedoraproject.org/koji/taskinfo?taskID=17274673 > > > An issue is somehow OpenCV will not meet a requirement due to this error > below: > > -- Found opencv, version 3.1.0 > CMake Error at CMakeModules/FindOpenCV.cmake:120 (string): > string sub-command REGEX, mode REPLACE needs at least 6 arguments total to > command. > > > Using "" to work around the error inside "CMakeModules/FindOpenCV.cmake" > still produce a failure. Any pointer? The code [1] is looking for strings matching CV_[A-Z]+_VERSION in opencv2/core/version.hpp, which it then filters by CV_MAJOR_VERSION, CV_MINOR_VERSION, and CV_PATCH_VERSION. On my f25 system, opencv2/core/version.hpp only contains definitions for CV_VERSION_MAJOR, CV_VERSION_MINOR, and CV_VERSION_PATCH (the VERSION and MAJOR/MINOR/PATCH are swapped from what YafaRay expects.) From the CMake file's header information, it looks like they only ever tested against OpenCV 2, so the preprocessor definitions may have changed between versions 2 and 3. Anyway, you should be able to work around it by fixing the regexes to match in the short term. In the long term, it would be better to replace that whole file with pkg_check_modules, or find_package(OpenCV), instead of effectively manually re-implementing them. Rich [1] https://github.com/YafaRay/Core/blob/v3.1.1-beta/CMakeModules/FindOpenCV.cmake#L120 _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx