Date: Fri, 19 Nov 2021 07:08:08 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 259930] graphics/opencv: cmake fails, if graphics/tesseract installed Message-ID: <bug-259930-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259930 Bug ID: 259930 Summary: graphics/opencv: cmake fails, if graphics/tesseract installed Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: rhurlin@FreeBSD.org CC: pkubaj@FreeBSD.org, tcberner@freebsd.org CC: pkubaj@FreeBSD.org, tcberner@freebsd.org I have encountered a problem on my system that seems to be related to graphics/opencv and graphics/tesseract. If the system already has graphics/tesseract installed, configure does not = work for graphics/opencv:=20 ----------------------------------------- CMake Error at /usr/local/cmake/TesseractConfig.cmake:24 (find_package): By not providing "FindLeptonica.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Leptonica", but CMake did not find one. Could not find a package configuration file provided by "Leptonica" with any of the following names: LeptonicaConfig.cmake leptonica-config.cmake Add the installation prefix of "Leptonica" to CMAKE_PREFIX_PATH or set "Leptonica_DIR" to a directory containing one of the above files. If "Leptonica" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): contrib/modules/text/cmake/init.cmake:8 (find_package) cmake/OpenCVModule.cmake:298 (include) cmake/OpenCVModule.cmake:364 (_add_modules_1) modules/CMakeLists.txt:7 (ocv_glob_modules) -- Configuring incomplete, errors occurred! See also "/usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeOutput.log= ". See also "/usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeError.log". *** Error code 1 ----------------------------------------- The mentioned log file CMakeError.log contains: ----------------------------------------- Determining if the include file sys/videoio.h exists failed with the follow= ing output: Change Dir: /usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/local/bin/ninja cmTC_73ae6 && [1/2] Building C ob= ject CMakeFiles/cmTC_73ae6.dir/CheckIncludeFile.c.o FAILED: CMakeFiles/cmTC_73ae6.dir/CheckIncludeFile.c.o=20 /usr/bin/cc -O2 -pipe -fstack-protector-strong -isystem /usr/local/inclu= de -fno-strict-aliasing -fsigned-char -W -Wall -Werror=3Dreturn-type -Werror=3Dnon-virtual-dtor -Werror=3Daddress -Werror=3Dsequence-point -Wfor= mat -Werror=3Dformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-pro= mo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-convers= ion -fdiagnostics-show-option -Wno-long-long -pthread -Qunused-arguments -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=3Dhid= den -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG -fPIE -MD -MT CMakeFiles/cmTC_73ae6.dir/CheckIncludeFile.c.o -MF CMakeFiles/cmTC_73ae6.dir/CheckIncludeFile.c.o.d -o CMakeFiles/cmTC_73ae6.dir/CheckIncludeFile.c.o -c /usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeTmp/CheckIncludeFile= .c /usr/ports/graphics/opencv/work/.build/CMakeFiles/CMakeTmp/CheckIncludeFile= .c:1:10: fatal error: 'sys/videoio.h' file not found #include <sys/videoio.h> ^~~~~~~~~~~~~~~ 1 error generated. ninja: build stopped: subcommand failed. ----------------------------------------- OpenCV seems to use an internal tesseract if no external one is found on the system. Once tesseract is present, the file FindLeptonica.cmake is also nee= ded, but it is not installed by graphics/leptonica, graphics/tesseract or graphics/opencv. This all seems to have become a problem only since graphics/tesseract switc= hed from autoconf to cmake [1] [1] https://cgit.freebsd.org/ports/commit/?id=3D3f1cf94980fdec66bdb115c46c94635= ec3b54572 You can easily reproduce the erroneous behavior in Poudriere by temporarily defining the following dependency in the graphics/opencv Makefile and then building it: LIB_DEPENDS+=3Dlibtesseract.so:graphics/tesseract --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259930-7788>