{"action":"created","issue":{"url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/16","labels_url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/16/comments","events_url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/16/events","html_url":"https://github.com/infusion/PHP-Facedetect/issues/16","id":117997077,"number":16,"title":"Fail to install : undeclared identifier 'CV_VERSION'","user":{"login":"loranger","id":6014,"avatar_url":"https://avatars.githubusercontent.com/u/6014?v=3","gravatar_id":"","url":"https://api.github.com/users/loranger","html_url":"https://github.com/loranger","followers_url":"https://api.github.com/users/loranger/followers","following_url":"https://api.github.com/users/loranger/following{/other_user}","gists_url":"https://api.github.com/users/loranger/gists{/gist_id}","starred_url":"https://api.github.com/users/loranger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loranger/subscriptions","organizations_url":"https://api.github.com/users/loranger/orgs","repos_url":"https://api.github.com/users/loranger/repos","events_url":"https://api.github.com/users/loranger/events{/privacy}","received_events_url":"https://api.github.com/users/loranger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-20T09:06:48Z","updated_at":"2015-12-08T22:42:54Z","closed_at":"2015-12-08T22:42:54Z","body":"Hello,\r\n\r\nI try to install PHP-Facedetect on my Mac (OSX 10.11.1) but it fails.\r\n\r\nI did install opencv3 using homebrew :\r\n\r\n```bash\r\n$ brew install opencv3 --with-contrib\r\n$ brew link opencv3\r\n```\r\n\r\nThen tried to build the PHP-Facedetect extension\r\n\r\n```bash\r\n$ phpize && ./configure && make && make install\r\nConfiguring for:\r\nPHP Api Version:         20131106\r\nZend Module Api No:      20131226\r\nZend Extension Api No:   220131226\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/build/mkdep.awk: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/build/scan_makefile_in.awk: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/build/shtool: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/build/libtool.m4: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/acinclude.m4: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/Makefile.global: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/config.sub: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/config.guess: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/ltmain.sh: Permission denied\r\ncp: /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/run-tests.php: Permission denied\r\nchecking for grep that handles long lines and -e... /usr/bin/grep\r\nchecking for egrep... /usr/bin/grep -E\r\nchecking for a sed that does not truncate output... /usr/local/bin/gsed\r\nchecking for cc... cc\r\nchecking whether the C compiler works... yes\r\nchecking for C compiler default output file name... a.out\r\nchecking for suffix of executables...\r\nchecking whether we are cross compiling... no\r\nchecking for suffix of object files... o\r\nchecking whether we are using the GNU C compiler... yes\r\nchecking whether cc accepts -g... yes\r\nchecking for cc option to accept ISO C89... none needed\r\nchecking how to run the C preprocessor... cc -E\r\nchecking for icc... no\r\nchecking for suncc... no\r\nchecking whether cc understands -c and -o together... yes\r\nchecking for system library directory... lib\r\nchecking if compiler supports -R... no\r\nchecking if compiler supports -Wl,-rpath,... yes\r\nchecking build system type... x86_64-apple-darwin15.0.0\r\nchecking host system type... x86_64-apple-darwin15.0.0\r\nchecking target system type... x86_64-apple-darwin15.0.0\r\nchecking for PHP prefix... /usr/local/Cellar/php56/5.6.15\r\nchecking for PHP includes... -I/usr/local/Cellar/php56/5.6.15/include/php -I/usr/local/Cellar/php56/5.6.15/include/php/main -I/usr/local/Cellar/php56/5.6.15/include/php/TSRM -I/usr/local/Cellar/php56/5.6.15/include/php/Zend -I/usr/local/Cellar/php56/5.6.15/include/php/ext -I/usr/local/Cellar/php56/5.6.15/include/php/ext/date/lib\r\nchecking for PHP extension directory... /usr/local/Cellar/php56/5.6.15/lib/php/extensions/no-debug-non-zts-20131226\r\nchecking for PHP installed headers prefix... /usr/local/Cellar/php56/5.6.15/include/php\r\nchecking if debug is enabled... no\r\nchecking if zts is enabled... no\r\nchecking for re2c... no\r\nconfigure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.\r\nchecking for gawk... gawk\r\nchecking for facedetect support... yes, shared\r\nchecking for facedetect in default path... found in /usr/local\r\nchecking for ANSI C header files... yes\r\nchecking for sys/types.h... yes\r\nchecking for sys/stat.h... yes\r\nchecking for stdlib.h... yes\r\nchecking for string.h... yes\r\nchecking for memory.h... yes\r\nchecking for strings.h... yes\r\nchecking for inttypes.h... yes\r\nchecking for stdint.h... yes\r\nchecking for unistd.h... yes\r\nchecking /usr/local/include/opencv/cv.h usability... yes\r\nchecking /usr/local/include/opencv/cv.h presence... yes\r\nchecking for /usr/local/include/opencv/cv.h... yes\r\nchecking /usr/local/include/opencv/highgui.h usability... yes\r\nchecking /usr/local/include/opencv/highgui.h presence... yes\r\nchecking for /usr/local/include/opencv/highgui.h... yes\r\nchecking for cvLoad in -lopencv_core... yes\r\nchecking for cvHaarDetectObjects in -lopencv_objdetect... yes\r\n./configure: line 4785: ,: command not found\r\nchecking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\r\nchecking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no\r\nchecking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r\r\nchecking for BSD-compatible nm... /usr/bin/nm\r\nchecking whether ln -s works... yes\r\nchecking how to recognize dependent libraries... pass_all\r\nchecking dlfcn.h usability... yes\r\nchecking dlfcn.h presence... yes\r\nchecking for dlfcn.h... yes\r\nchecking the maximum length of command line arguments... 196608\r\nchecking command to parse /usr/bin/nm output from cc object... ok\r\nchecking for objdir... .libs\r\nchecking for ar... ar\r\nchecking for ranlib... ranlib\r\nchecking for strip... strip\r\nchecking for dsymutil... dsymutil\r\nchecking for nmedit... nmedit\r\nchecking for -single_module linker flag... yes\r\nchecking for -exported_symbols_list linker flag... yes\r\nchecking if cc supports -fno-rtti -fno-exceptions... yes\r\nchecking for cc option to produce PIC... -fno-common\r\nchecking if cc PIC flag -fno-common works... yes\r\nchecking if cc static flag -static works... no\r\nchecking if cc supports -c -o file.o... yes\r\nchecking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes\r\nchecking dynamic linker characteristics... darwin15.0.0 dyld\r\nchecking how to hardcode library paths into programs... immediate\r\nchecking whether stripping libraries is possible... yes\r\nchecking if libtool supports shared libraries... yes\r\nchecking whether to build shared libraries... yes\r\nchecking whether to build static libraries... no\r\n\r\ncreating libtool\r\nappending configuration tag \"CXX\" to libtool\r\nconfigure: creating ./config.status\r\nconfig.status: creating config.h\r\nconfig.status: config.h is unchanged\r\n/bin/sh /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/libtool --mode=compile cc  -I. -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect -DPHP_ATOM_INC -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect/include -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect/main -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect -I/usr/local/Cellar/php56/5.6.15/include/php -I/usr/local/Cellar/php56/5.6.15/include/php/main -I/usr/local/Cellar/php56/5.6.15/include/php/TSRM -I/usr/local/Cellar/php56/5.6.15/include/php/Zend -I/usr/local/Cellar/php56/5.6.15/include/php/ext -I/usr/local/Cellar/php56/5.6.15/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/facedetect.c -o facedetect.lo\r\nmkdir .libs\r\n cc -I. -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect -DPHP_ATOM_INC -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect/include -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect/main -I/Users/loranger/Developer/projects/automask/public/PHP-Facedetect -I/usr/local/Cellar/php56/5.6.15/include/php -I/usr/local/Cellar/php56/5.6.15/include/php/main -I/usr/local/Cellar/php56/5.6.15/include/php/TSRM -I/usr/local/Cellar/php56/5.6.15/include/php/Zend -I/usr/local/Cellar/php56/5.6.15/include/php/ext -I/usr/local/Cellar/php56/5.6.15/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/loranger/Developer/projects/automask/public/PHP-Facedetect/facedetect.c  -fno-common -DPIC -o .libs/facedetect.o\r\n/Users/loranger/Developer/projects/automask/public/PHP-Facedetect/facedetect.c:69:48: error: use of\r\n      undeclared identifier 'CV_VERSION'; did you mean 'CV_MEDIAN'?\r\n        php_info_print_table_row(2, \"OpenCV version\", CV_VERSION);\r\n                                                      ^~~~~~~~~~\r\n                                                      CV_MEDIAN\r\n/usr/local/include/opencv2/imgproc/types_c.h:80:5: note: 'CV_MEDIAN' declared here\r\n    CV_MEDIAN =3,\r\n    ^\r\n1 error generated.\r\nmake: *** [facedetect.lo] Error 1\r\n```\r\n\r\nDid I miss something important ?\r\nDo you have any clue for me ?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/comments/163043740","html_url":"https://github.com/infusion/PHP-Facedetect/issues/16#issuecomment-163043740","issue_url":"https://api.github.com/repos/infusion/PHP-Facedetect/issues/16","id":163043740,"user":{"login":"loranger","id":6014,"avatar_url":"https://avatars.githubusercontent.com/u/6014?v=3","gravatar_id":"","url":"https://api.github.com/users/loranger","html_url":"https://github.com/loranger","followers_url":"https://api.github.com/users/loranger/followers","following_url":"https://api.github.com/users/loranger/following{/other_user}","gists_url":"https://api.github.com/users/loranger/gists{/gist_id}","starred_url":"https://api.github.com/users/loranger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loranger/subscriptions","organizations_url":"https://api.github.com/users/loranger/orgs","repos_url":"https://api.github.com/users/loranger/repos","events_url":"https://api.github.com/users/loranger/events{/privacy}","received_events_url":"https://api.github.com/users/loranger/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T22:42:54Z","updated_at":"2015-12-08T22:42:54Z","body":"I juste tried, and... you already added the include inside the `face detect.c`.\r\nI just successfully compiled the extension for my fresh php7\r\n\r\nEverything works like a charm.\r\n\r\nThanks !"}}