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

Can't compile on Debian 10

jackyhallyday opened this issue · comments

Hi,

I tried to install php-opencv on a my Debian 10, but it won't compile because of this error:

/root/php-opencv/source/opencv2/core/opencv_mat.cc: In function ‘void opencv_mat_init()’: /root/php-opencv/source/opencv2/core/opencv_mat.cc:858:49: error: invalid conversion from ‘void (*)(zval*, zval*, zval*, void**)’ {aka ‘void (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} to ‘zend_object_write_property_t’ {aka ‘_zval_struct* (*)(_zval_struct*, _zval_struct*, _zval_struct*, void**)’} [-fpermissive] opencv_mat_object_handlers.write_property = opencv_mat_write_property; ^~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:194: source/opencv2/core/opencv_mat.lo] Error 1

Hi,
It works only with PHP 7.0 / 7.1 / 7.2 and OpenCV 4.0.0+
What version do you use?

Oooooh, ok. I installed OpenCV 4.3 but I'm using PHP 7.4.
Thanks for your answer, I looked at the requirements for the OpenCV version and just had a glance at the PHP requirement. I saw 7 dot....and I assumed any version above that would work. My bad.

now php-opencv supports php 7.4 / 8.0