goodspb / pdlib

PHP extension for Dlib.
MIT License
72 stars 19 forks source link

Installation issue on PHP8.1 when upgrading Nextcloud on Yunohost. #58

Open Tech-Geek97 opened 1 year ago

Tech-Geek97 commented 1 year ago

Hello,

I am attempting to get pdlib working with PHP8.1 in order to get nextcloud facerecognition working again after an update via yunohost. I have copied my console output of an installation attempt and it seems to install the package for PHP7.4 not 8.1. I have also attempted to copy the compiled file from 7.4 to 8.1 but it just throws an error that it was compiled for the wrong version. The issue seems to occur with ./configure where it starts referencing PHP API version 20190902. I am sure I am missing something as others seem to have this working, but unfortunately the solution is eluding me after many attempts and several hours. Any insight or ideas would be much appreciated.


ryan@backbay:~$ git clone https://github.com/goodspb/pdlib.git
Cloning into 'pdlib'...
remote: Enumerating objects: 265, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 265 (delta 5), reused 7 (delta 3), pack-reused 249
Receiving objects: 100% (265/265), 530.57 KiB | 898.00 KiB/s, done.
Resolving deltas: 100% (161/161), done.
ryan@backbay:~$ cd pdlib/
ryan@backbay:~/pdlib$ phpize8.1
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902
ryan@backbay:~/pdlib$ ./configure --enable-debug
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 pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20190902
checking for PHP installed headers prefix... /usr/include/php/20190902
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... gawk
checking for pdlib support... yes, shared
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... checking for pkg-config... /usr/bin/pkg-config
found
checking for dlib-1... from pkgconfig: dlib version 19.24.99
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/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 /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt 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... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/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++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/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... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/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: patching config.h.in
configure: creating ./config.status

Build configuration for PDlib v1.0.2 done correctly.

  dlib version: 19.24.99

  CXXFLAGS    : -g -O2
  LDFLAGS     :
  LIBDIR:     : -L/usr/local/lib -ldlib
  LIBADD:     : -Wl,-rpath,/usr/local/lib -L/usr/local/lib  -lstdc++ -ldlib

Please submit bug reports at:
  https://github.com/goodspb/pdlib/issues

config.status: creating config.h
config.status: executing libtool commands
ryan@backbay:~/pdlib$ make
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/pdlib.cc -o pdlib.lo  -MMD -MF pdlib.dep -MT pdlib.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/pdlib.cc -MMD -MF pdlib.dep -MT pdlib.lo  -fPIC -DPIC -o .libs/pdlib.o
In file included from /usr/include/sched.h:29,
                 from /usr/include/pthread.h:22,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
                 from /usr/include/c++/10/ext/atomicity.h:35,
                 from /usr/include/c++/10/bits/basic_string.h:39,
                 from /usr/include/c++/10/string:55,
                 from /usr/local/include/dlib/algs.h:97,
                 from /usr/local/include/dlib/matrix/matrix_exp.h:6,
                 from /usr/local/include/dlib/matrix/matrix.h:6,
                 from /usr/local/include/dlib/matrix.h:6,
                 from /usr/local/include/dlib/cuda/tensor.h:8,
                 from /usr/local/include/dlib/dnn.h:12,
                 from /home/ryan/pdlib/src/face_recognition.h:8,
                 from /home/ryan/pdlib/pdlib.cc:33:
/home/ryan/pdlib/pdlib.cc: In function ‘void php_face_recognition_free(zend_object*)’:
/home/ryan/pdlib/pdlib.cc:139:72: warning: ‘offsetof’ within non-standard-layout type ‘face_recognition’ {aka ‘_face_recognition’} is conditionally-supported [-Winvalid-offsetof]
  139 |  face_recognition *fr = (face_recognition*)((char*)object - XtOffsetOf(face_recognition, std));
/home/ryan/pdlib/pdlib.cc:139:61: note: in expansion of macro ‘XtOffsetOf’
  139 |  face_recognition *fr = (face_recognition*)((char*)object - XtOffsetOf(face_recognition, std));
      |                                                             ^~~~~~~~~~
/home/ryan/pdlib/pdlib.cc: In function ‘int zm_startup_pdlib(int, int)’:
/home/ryan/pdlib/pdlib.cc:173:52: warning: ‘offsetof’ within non-standard-layout type ‘face_recognition’ {aka ‘_face_recognition’} is conditionally-supported [-Winvalid-offsetof]
  173 |  face_recognition_obj_handlers.offset = XtOffsetOf(face_recognition, std);
/home/ryan/pdlib/pdlib.cc:173:41: note: in expansion of macro ‘XtOffsetOf’
  173 |  face_recognition_obj_handlers.offset = XtOffsetOf(face_recognition, std);
      |                                         ^~~~~~~~~~
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/chinese_whispers.cc -o src/chinese_whispers.lo  -MMD -MF src/chinese_whispers.dep -MT src/chinese_whispers.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/chinese_whispers.cc -MMD -MF src/chinese_whispers.dep -MT src/chinese_whispers.lo  -fPIC -DPIC -o src/.libs/chinese_whispers.o
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_detection.cc -o src/face_detection.lo  -MMD -MF src/face_detection.dep -MT src/face_detection.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_detection.cc -MMD -MF src/face_detection.dep -MT src/face_detection.lo  -fPIC -DPIC -o src/.libs/face_detection.o
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_landmark_detection.cc -o src/face_landmark_detection.lo  -MMD -MF src/face_landmark_detection.dep -MT src/face_landmark_detection.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_landmark_detection.cc -MMD -MF src/face_landmark_detection.dep -MT src/face_landmark_detection.lo  -fPIC -DPIC -o src/.libs/face_landmark_detection.o
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_recognition.cc -o src/face_recognition.lo  -MMD -MF src/face_recognition.dep -MT src/face_recognition.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/face_recognition.cc -MMD -MF src/face_recognition.dep -MT src/face_recognition.lo  -fPIC -DPIC -o src/.libs/face_recognition.o
In file included from /usr/include/sched.h:29,
                 from /usr/include/pthread.h:22,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/gthr.h:148,
                 from /usr/include/c++/10/ext/atomicity.h:35,
                 from /usr/include/c++/10/bits/basic_string.h:39,
                 from /usr/include/c++/10/string:55,
                 from /usr/local/include/dlib/algs.h:97,
                 from /usr/local/include/dlib/matrix/matrix_exp.h:6,
                 from /usr/local/include/dlib/matrix/matrix.h:6,
                 from /usr/local/include/dlib/matrix.h:6,
                 from /usr/local/include/dlib/cuda/tensor.h:8,
                 from /usr/local/include/dlib/dnn.h:12,
                 from /home/ryan/pdlib/src/face_recognition.h:8,
                 from /home/ryan/pdlib/src/face_recognition.cc:2:
/home/ryan/pdlib/src/face_recognition.cc: In function ‘face_recognition* php_face_recognition_from_obj(zend_object*)’:
/home/ryan/pdlib/src/face_recognition.cc:12:58: warning: ‘offsetof’ within non-standard-layout type ‘face_recognition’ {aka ‘_face_recognition’} is conditionally-supported [-Winvalid-offsetof]
   12 |     return (face_recognition*)((char*)(obj) - XtOffsetOf(face_recognition, std));
/home/ryan/pdlib/src/face_recognition.cc:12:47: note: in expansion of macro ‘XtOffsetOf’
   12 |     return (face_recognition*)((char*)(obj) - XtOffsetOf(face_recognition, std));
      |                                               ^~~~~~~~~~
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/cnn_face_detection.cc -o src/cnn_face_detection.lo  -MMD -MF src/cnn_face_detection.dep -MT src/cnn_face_detection.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/cnn_face_detection.cc -MMD -MF src/cnn_face_detection.dep -MT src/cnn_face_detection.lo  -fPIC -DPIC -o src/.libs/cnn_face_detection.o
/bin/bash /home/ryan/pdlib/libtool --mode=compile g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/vector.cc -o src/vector.lo  -MMD -MF src/vector.dep -MT src/vector.lo
libtool: compile:  g++ -I. -I/home/ryan/pdlib -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /home/ryan/pdlib/src/vector.cc -MMD -MF src/vector.dep -MT src/vector.lo  -fPIC -DPIC -o src/.libs/vector.o
/bin/bash /home/ryan/pdlib/libtool --mode=link g++ -shared -I/home/ryan/pdlib/include -I/home/ryan/pdlib/main -I/home/ryan/pdlib -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2    -o pdlib.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/ryan/pdlib/modules  pdlib.lo src/chinese_whispers.lo src/face_detection.lo src/face_landmark_detection.lo src/face_recognition.lo src/cnn_face_detection.lo src/vector.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lstdc++ -ldlib
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o  .libs/pdlib.o src/.libs/chinese_whispers.o src/.libs/face_detection.o src/.libs/face_landmark_detection.o src/.libs/face_recognition.o src/.libs/cnn_face_detection.o src/.libs/vector.o   -L/usr/local/lib -ldlib -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/10/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/10/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o  -g -O2 -Wl,-rpath -Wl,/usr/local/lib   -Wl,-soname -Wl,pdlib.so -o .libs/pdlib.so
libtool: link: ( cd ".libs" && rm -f "pdlib.la" && ln -s "../pdlib.la" "pdlib.la" )
/bin/bash /home/ryan/pdlib/libtool --mode=install cp ./pdlib.la /home/ryan/pdlib/modules
libtool: install: cp ./.libs/pdlib.so /home/ryan/pdlib/modules/pdlib.so
libtool: install: cp ./.libs/pdlib.lai /home/ryan/pdlib/modules/pdlib.la
libtool: finish: PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/java-17-oracle/bin:/usr/lib/jvm/java-17-oracle/db/bin:/sbin" ldconfig -n /home/ryan/pdlib/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /home/ryan/pdlib/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'.

ryan@backbay:~/pdlib$ make test

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

=====================================================================
PHP         : /usr/bin/php7.4
PHP_SAPI    : cli
PHP_VERSION : 7.4.33
ZEND_VERSION: 3.4.0
PHP_OS      : Linux - Linux DOMAINNAME 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
INI actual  : /home/ryan/pdlib/tmp-php.ini
More .INIs  :
---------------------------------------------------------------------
PHP         : /usr/bin/phpdbg7.4
PHP_SAPI    : phpdbg
PHP_VERSION : 7.4.33
ZEND_VERSION: 3.4.0
PHP_OS      : Linux - Linux DOMAINNAME 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
INI actual  : /home/ryan/pdlib/tmp-php.ini
More .INIs  :
---------------------------------------------------------------------
CWD         : /home/ryan/pdlib
Extra dirs  :
VALGRIND    : Not used
=====================================================================
TIME START 2023-04-04 21:14:18
=====================================================================
PASS Check for pdlib presence [tests/001.phpt]
PASS Basic tests for chinese_whispers [tests/chinese_whispers_basic.phpt]
PASS Edge given in edges array for chinese_whispers functions is associative array [tests/chinese_whispers_edge_associative_array_error.phpt]
PASS Edge elements given in edges array for chinese_whispers functions are not of long type [tests/chinese_whispers_edge_elements_not_long.phpt]
PASS Edge given in edges array for chinese_whispers functions is not having all values to be arrays with 2 elements [tests/chinese_whispers_edge_not_2_element_error.phpt]
PASS Edge given in edges array is not array for chinese_whispers functions [tests/chinese_whispers_edge_not_array_error.phpt]
PASS Args given to chinese_whispers functions is not correct [tests/chinese_whispers_wrong_arg_type_error.phpt]
PASS Testing CnnFaceDetection constructor without arguments [tests/cnn_face_detection_ctor_error.phpt]
PASS Testing CnnFaceDetection constructor with model that do not exist [tests/cnn_face_detection_ctor_model_not_found_error.phpt]
PASS Frontal face detection. [tests/dlib_face_detection.phpt]
PASS Testing FaceLandmarkDetection constructor without arguments [tests/face_landmark_detection_ctor_error.phpt]
PASS Testing FaceRecognition constructor without arguments [tests/face_recognition_ctor_error.phpt]
SKIP Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt] reason: bz2 extension missing
PASS Basic tests for dlib_vector_length [tests/vector_length.phpt]
PASS Just test php extension version [tests/version.phpt]
=====================================================================
TIME END 2023-04-04 21:14:19

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   15
---------------------------------------------------------------------

Number of tests :   15                14
Tests skipped   :    1 (  6.7%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Tests passed    :   14 ( 93.3%) (100.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: n
ryan@backbay:~/pdlib$ sudo make install
Installing shared extensions:     /usr/lib/php/20190902/
ryan@backbay:~/pdlib$ php7.4 -m
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
pdlib
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

ryan@backbay:~/pdlib$ php8.1 -m
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdlib.so' (tried: /usr/lib/php/20210902/pdlib.so (/usr/lib/php/20210902/pdlib.so: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/pdlib.so.so (/usr/lib/php/20210902/pdlib.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

ryan@backbay:~/pdlib$
brccabral commented 11 months ago

I don't have a solution, but I have noticed that from the command line the module is loaded

php8.1 -m
#..
pdlib
#..

The same using fpm

php-fpm8.1 -m
#..
pdlib
#..

But opening a web page the pdlib is not loaded

<?php
$allext = get_loaded_extensions();
foreach ($allext as $key => $value)
{
    echo "$value<br />";
}