php-opencv / php-opencv

opencv 4.5+ with dnn module for php 7/8

Home Page:https://github.com/php-opencv/php-opencv-examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configure says: "no opencv detected in the system"

spidgorny opened this issue · comments

I'm installing on CentOS 7 according to the instructions. Everything works until the ./configure line, which says:

checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/cpanel/3rdparty/php/73
checking for PHP includes... -I/usr/local/cpanel/3rdparty/php/73/include/php -I/usr/local/cpanel/3rdparty/php/73/include/php/main -I/usr/local/cpanel/3rdparty/php/73/include/php/TSRM -I/usr/local/cpanel/3rdparty/php/73/include/php/Zend -I/usr/local/cpanel/3rdparty/php/73/include/php/ext -I/usr/local/cpanel/3rdparty/php/73/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/cpanel/3rdparty/php/73/lib/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/cpanel/3rdparty/php/73/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for opencv support... yes, shared
checking for php debug... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for pkg-config... found
checking for opencv... not found
configure: error: Ooops ! no opencv detected in the system

Do you know how can I fix that?
Where does it look for opencv (which was successfully built) and why it can't find it?

Running opencv_version returns 3.4.9-dev. I'm on the 3.4 branch.
Thanks.

The message above references the PKG_CONFIG_PATH environment variable. This variable is used to augment pkg-config's search path. On a typical Unix system, it will search in the directories /usr/lib/pkgconfig and /usr/share/pkgconfig

I needed to copy build/unix-install/opencv.pc to /usr/share/pkgconfig

You can close the issue.