linux

opencv 4.x 설치 + opencv-php 연동 (수정#1)

mysop 2021. 6. 23. 17:45
반응형

git를 통해 파일을 모두 받습니다.

# git clone https://github.com/php-opencv/php-opencv.git

# git clone https://github.com/opencv/opencv.git

# git clone https://github.com/opencv/opencv_contrib.git

 

다음부터는 #1 출처대로 설치

 

#1 출처 : https://ko.joecomp.com/how-install-opencv-centos-7

 

설치 끝나고 opencv.pc파일까지 연동 확인

 

opencv-php 설치

 

처음에 받은 폴더 안에서

# phpize

# ./configure

# make

# make install

 

만약에 컴파일 에러 발생시 C++11이 연동안되는 문제임


https://blog.and.kr/58

위 링크대로 C++11 설치후 서버에 연동

 

그리고 위 컴파일 확인

 

설치가 다되면

/usr/lib64/php/modules/ 폴더안에

opencv.so 파일 확인

 

# php-fpm -t

[25-Jun-2021 09:59:44] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'opencv' (tried: /usr/lib64/php/modules/opencv (/usr/lib64/php/modules/opencv: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/opencv.so (/usr/lib64/php/modules/opencv.so: undefined symbol: _ZNK2cv3dnn14dnn4_v201906213Net13getLayerNamesEv)) in Unknown on line 0

[25-Jun-2021 09:59:44] NOTICE: configuration file /etc/php-fpm.conf test is successful

 

이런 에러발생시 opencv가 정상적으로 설치되지 않은거임

처음부터 다시 설치 확인 할것....

 

[root@ai php-opencv]# phpize 
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
[root@ai php-opencv]# ./configure 
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /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
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
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... found 4.5.3
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld
checking if the linker (/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/rh/devtoolset-8/root/usr/bin/nm -B
checking the name lister (/opt/rh/devtoolset-8/root/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /opt/rh/devtoolset-8/root/usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -m elf_x86_64
checking if the linker (/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[root@ai php-opencv]# make
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/opencv.cc -o opencv.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/opencv.cc  -fPIC -DPIC -o .libs/opencv.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_mat.cc -o source/opencv2/core/opencv_mat.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_mat.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_mat.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_utility.cc -o source/opencv2/core/opencv_utility.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_utility.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_utility.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_imgcodecs.cc -o source/opencv2/opencv_imgcodecs.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_imgcodecs.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_imgcodecs.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/opencv_exception.cc -o opencv_exception.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/opencv_exception.cc  -fPIC -DPIC -o .libs/opencv_exception.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/hal/opencv_interface.cc -o source/opencv2/core/hal/opencv_interface.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/hal/opencv_interface.cc  -fPIC -DPIC -o source/opencv2/core/hal/.libs/opencv_interface.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_highgui.cc -o source/opencv2/opencv_highgui.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_highgui.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_highgui.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/imgcodecs/opencv_imgcodecs_c.cc -o source/opencv2/imgcodecs/opencv_imgcodecs_c.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/imgcodecs/opencv_imgcodecs_c.cc  -fPIC -DPIC -o source/opencv2/imgcodecs/.libs/opencv_imgcodecs_c.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_type.cc -o source/opencv2/core/opencv_type.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_type.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_type.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_core.cc -o source/opencv2/opencv_core.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_core.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_core.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_imgproc.cc -o source/opencv2/opencv_imgproc.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_imgproc.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_imgproc.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_base.cc -o source/opencv2/core/opencv_base.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_base.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_base.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_persistence.cc -o source/opencv2/core/opencv_persistence.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_persistence.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_persistence.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_objdetect.cc -o source/opencv2/opencv_objdetect.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_objdetect.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_objdetect.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_videoio.cc -o source/opencv2/opencv_videoio.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_videoio.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_videoio.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_face.cc -o source/opencv2/opencv_face.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_face.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_face.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/face/opencv_facerec.cc -o source/opencv2/face/opencv_facerec.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/face/opencv_facerec.cc  -fPIC -DPIC -o source/opencv2/face/.libs/opencv_facerec.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/face/opencv_facemarkLBF.cc -o source/opencv2/face/opencv_facemarkLBF.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/face/opencv_facemarkLBF.cc  -fPIC -DPIC -o source/opencv2/face/.libs/opencv_facemarkLBF.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/core/opencv_cvdef.cc -o source/opencv2/core/opencv_cvdef.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/core/opencv_cvdef.cc  -fPIC -DPIC -o source/opencv2/core/.libs/opencv_cvdef.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/dnn/opencv_dnn.cc -o source/opencv2/dnn/opencv_dnn.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/dnn/opencv_dnn.cc  -fPIC -DPIC -o source/opencv2/dnn/.libs/opencv_dnn.o
/bin/sh /root/php-opencv/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2   -c /root/php-opencv/source/opencv2/opencv_ml.cc -o source/opencv2/opencv_ml.lo 
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/root/php-opencv -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4 -DHAVE_CONFIG_H -g -O2 -c /root/php-opencv/source/opencv2/opencv_ml.cc  -fPIC -DPIC -o source/opencv2/.libs/opencv_ml.o
/bin/sh /root/php-opencv/libtool --mode=link cc -DPHP_ATOM_INC -I/root/php-opencv/include -I/root/php-opencv/main -I/root/php-opencv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/opencv4  -DHAVE_CONFIG_H  -g -O2    -o opencv.la -export-dynamic -avoid-version -prefer-pic -module -rpath /root/php-opencv/modules  opencv.lo source/opencv2/core/opencv_mat.lo source/opencv2/core/opencv_utility.lo source/opencv2/opencv_imgcodecs.lo opencv_exception.lo source/opencv2/core/hal/opencv_interface.lo source/opencv2/opencv_highgui.lo source/opencv2/imgcodecs/opencv_imgcodecs_c.lo source/opencv2/core/opencv_type.lo source/opencv2/opencv_core.lo source/opencv2/opencv_imgproc.lo source/opencv2/core/opencv_base.lo source/opencv2/core/opencv_persistence.lo source/opencv2/opencv_objdetect.lo source/opencv2/opencv_videoio.lo source/opencv2/opencv_face.lo source/opencv2/face/opencv_facerec.lo source/opencv2/face/opencv_facemarkLBF.lo source/opencv2/core/opencv_cvdef.lo source/opencv2/dnn/opencv_dnn.lo source/opencv2/opencv_ml.lo -Wl,-rpath,/usr/local/lib64 -L/usr/local/lib64 -lstdc++ -lopencv_gapi -lopencv_stitching -lopencv_alphamat -lopencv_aruco -lopencv_barcode -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_dnn -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core
libtool: link: cc -shared  -fPIC -DPIC  .libs/opencv.o source/opencv2/core/.libs/opencv_mat.o source/opencv2/core/.libs/opencv_utility.o source/opencv2/.libs/opencv_imgcodecs.o .libs/opencv_exception.o source/opencv2/core/hal/.libs/opencv_interface.o source/opencv2/.libs/opencv_highgui.o source/opencv2/imgcodecs/.libs/opencv_imgcodecs_c.o source/opencv2/core/.libs/opencv_type.o source/opencv2/.libs/opencv_core.o source/opencv2/.libs/opencv_imgproc.o source/opencv2/core/.libs/opencv_base.o source/opencv2/core/.libs/opencv_persistence.o source/opencv2/.libs/opencv_objdetect.o source/opencv2/.libs/opencv_videoio.o source/opencv2/.libs/opencv_face.o source/opencv2/face/.libs/opencv_facerec.o source/opencv2/face/.libs/opencv_facemarkLBF.o source/opencv2/core/.libs/opencv_cvdef.o source/opencv2/dnn/.libs/opencv_dnn.o source/opencv2/.libs/opencv_ml.o   -L/usr/local/lib64 -lstdc++ -lopencv_gapi -lopencv_stitching -lopencv_alphamat -lopencv_aruco -lopencv_barcode -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_dnn -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core  -O2 -Wl,-rpath -Wl,/usr/local/lib64   -Wl,-soname -Wl,opencv.so -o .libs/opencv.so
libtool: link: ( cd ".libs" && rm -f "opencv.la" && ln -s "../opencv.la" "opencv.la" )
/bin/sh /root/php-opencv/libtool --mode=install cp ./opencv.la /root/php-opencv/modules
libtool: install: cp ./.libs/opencv.so /root/php-opencv/modules/opencv.so
libtool: install: cp ./.libs/opencv.lai /root/php-opencv/modules/opencv.la
libtool: finish: PATH="/opt/rh/devtoolset-8/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /root/php-opencv/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /root/php-opencv/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

[root@ai php-opencv]# make install
Installing shared extensions:     /usr/lib64/php/modules/

 

어라.

 

AWS 저사양일경우

make 명령시 주의

 

서버님 요단강 건너감...

728x90
반응형

'linux' 카테고리의 다른 글

CentOS7 gcc8 설치  (0) 2021.06.24
opencv.pc 파일이 생성 안될경우  (0) 2021.06.24
대한민국 시간대 조정 linux  (0) 2021.06.22
php, http Permission denied  (0) 2021.06.22
linux 파일 소유자 일괄 변경  (0) 2021.06.17