php-opencv icon indicating copy to clipboard operation
php-opencv copied to clipboard

Problems installing on Mac OSX 10.13.3

Open ghost opened this issue 7 years ago • 3 comments

I have followed the steps to install but when i reach ./configure there is not a configuration file in there, any ideas why im having this issue?

PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS ) OpenCV Version 3.4.1

MacBook:PhpOpenCV elvistillalive$ git clone https://github.com/hihozhou/php-opencv.git
Cloning into 'php-opencv'...
remote: Counting objects: 1527, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 1527 (delta 0), reused 1 (delta 0), pack-reused 1525
Receiving objects: 100% (1527/1527), 858.66 KiB | 430.00 KiB/s, done.
Resolving deltas: 100% (991/991), done.

MacBook:PhpOpenCV elvistillalive$ cd php-opencv
MacBook:php-opencv elvistillalive$ 

MacBook:php-opencv elvistillalive$ phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
autom4te: need GNU m4 1.4 or later: /opt/local/bin/gm4

MacBook:php-opencv elvistillalive$ ./configure --with-php-config=/private/etc/php.ini
-bash: ./configure: No such file or directory

MacBook:php-opencv elvistillalive$ ls -l
total 1648
-rw-r--r--   1 elvistillalive  staff       6 Jun 25 16:32 CREDITS
-rw-r--r--   1 elvistillalive  staff       0 Jun 25 16:32 EXPERIMENTAL
-rw-r--r--   1 elvistillalive  staff   11358 Jun 25 16:32 LICENSE
-rw-r--r--   1 elvistillalive  staff    7236 Jun 25 16:33 Makefile.global
-rw-r--r--   1 elvistillalive  staff    3236 Jun 25 16:32 README.md
-rw-r--r--   1 elvistillalive  staff   82506 Jun 25 16:33 acinclude.m4
-rw-r--r--   1 elvistillalive  staff  312883 Jun 25 16:33 aclocal.m4
drwxr-xr-x   7 elvistillalive  staff     224 Jun 25 16:33 build
-rwxr-xr-x   1 elvistillalive  staff   42938 Jun 25 16:33 config.guess
-rw-r--r--   1 elvistillalive  staff    3047 Jun 25 16:32 config.m4
-rwxr-xr-x   1 elvistillalive  staff   35987 Jun 25 16:33 config.sub
-rw-r--r--   1 elvistillalive  staff     356 Jun 25 16:32 config.w32
-rw-r--r--   1 elvistillalive  staff    4698 Jun 25 16:33 configure.in
-rw-r--r--   1 elvistillalive  staff       0 Jun 25 16:33 install-sh
-rw-r--r--   1 elvistillalive  staff  199728 Jun 25 16:33 ltmain.sh
-rw-r--r--   1 elvistillalive  staff       0 Jun 25 16:33 missing
-rw-r--r--   1 elvistillalive  staff       0 Jun 25 16:33 mkinstalldirs
-rw-r--r--   1 elvistillalive  staff   11674 Jun 25 16:32 opencv.cc
-rw-r--r--   1 elvistillalive  staff     502 Jun 25 16:32 opencv.php
-rw-r--r--   1 elvistillalive  staff    1500 Jun 25 16:32 opencv_exception.cc
-rw-r--r--   1 elvistillalive  staff    1262 Jun 25 16:32 opencv_exception.h
-rw-r--r--   1 elvistillalive  staff    2628 Jun 25 16:32 php_opencv.h
-rw-r--r--   1 elvistillalive  staff   82148 Jun 25 16:33 run-tests.php
drwxr-xr-x   3 elvistillalive  staff      96 Jun 25 16:32 source
drwxr-xr-x  22 elvistillalive  staff     704 Jun 25 16:32 tests
drwxr-xr-x   3 elvistillalive  staff      96 Jun 25 16:32 travis

ghost avatar Jun 25 '18 22:06 ghost

Most likely you need to install autoconf, automake, m4. For example:

brew install autoconf automake m4

Or you can use docker: docker run -it --name php-opencv morozovsk/php-opencv

morozovsk avatar Jun 28 '18 14:06 morozovsk

I have similar issues when do phpize phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version:
Zend Module Api No:
Zend Extension Api No:

But when I research online Mac doesn't allow copy or do anything inside /usr/include it has to be in /usr/local/include so is that anyway to fix this issue

chantrea avatar Nov 27 '18 19:11 chantrea

@chantrea Use a command, but the specific path changes according to the individual's actual situation

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include /usr/include

hihozhou avatar Nov 29 '18 04:11 hihozhou