Giter Site home page Giter Site logo

pdlib's Introduction

PDlib - A PHP extension for Dlib

Requirements

  • Dlib 19.13+
  • PHP 7.0+
  • C++14
  • libx11-dev (on Ubuntu: sudo apt-get install libx11-dev)

Recommended

  • BLAS library
    If no BLAS library found - dlib's built in BLAS will be used. However, if you install an optimized BLAS such as OpenBLAS or the Intel MKL your code will run faster. On Ubuntu you can install OpenBLAS by executing: sudo apt-get install libopenblas-dev liblapack-dev

Dependencies

Dlib

Install Dlib as shared library

git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

Installation

git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure --enable-debug
# you may need to indicate the dlib install location
# PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-debug
make
sudo make install

Configure PHP installation

vim youpath/php.ini

Append the content below into php.ini

[pdlib]
extension="pdlib.so"

Tests

For tests, you will need to have bz2 extension installed. On Ubuntu, it boils to:

sudo apt-get install php-bz2

After you successfully compiled everything, just run:

make test

Usage

General Usage

Good starting point can be tests/integration_face_recognition.phpt. Check that first.

Basically, if you just quickly want to get from your image to 128D descriptor of faces in image, here is really minimal example how:

<?php
$img_path = "image.jpg";
$fd = new CnnFaceDetection("detection_cnn_model.dat");
$detected_faces = $fd->detect($img_path);
foreach($detected_faces as $detected_face) {
  $fld = new FaceLandmarkDetection("landmark_model.dat");
  $landmarks = $fld->detect($img_path, $detected_face);
  $fr = new FaceRecognition("recognition_model.dat");
  $descriptor = $fr->computeDescriptor($img_path, $landmarks);
  // Optionally use descriptor later in `dlib_chinese_whispers` function
}

Location from where to get these models can be found on DLib website, as well as in tests/integration_face_recognition.phpt test.

Specific use cases

face detection

If you want to use HOG based approach:

<?php

// face detection
detected_faces = dlib_face_detection("image.jpg");
// $detected_faces is indexed array, where values are assoc arrays with "top", "bottom", "left" and "right" values

If you want to use CNN approach (and CNN model):

<?php
$fd = new CnnFaceDetection("detection_cnn_model.dat");
$detected_faces = $fd->detect("image.jpg");
// $detected_face is indexed array, where values are assoc arrays with "top", "bottom", "left" and "right" values

CNN model can get you slightly better results, but is much, much more demanding (CPU and memory, GPU is also preferred).

face landmark detection

<?php

// face landmark detection
$landmarks = dlib_face_landmark_detection("~/a.jpg");
var_dump($landmarks);

Additionally, you can also use class-based approach:

$rect = array("left"=>value, "top"=>value, "right"=>value, "bottom"=>value);
// You can download a trained facial shape predictor from:
// http://dlib.net/files/shape_predictor_5_face_landmarks.dat.bz2
$fld = new FaceLandmarkDetection("path/to/shape/predictor/model");
$parts = $fld->detect("path/to/image.jpg", $rect);
// $parts is integer array where keys are associative values with "x" and "y" for keys

Note that, if you use class-based approach, you need to feed bounding box rectangle with values obtained from dlib_face_detection. If you use dlib_face_landmark_detection, everything is already done for you (and you are using HOG face detection model).

face recognition (aka getting face descriptor)

<?php

$fr = new FaceRecognition($model_path);
$landmarks = array(
    "rect" => $rect_of_faces_obtained_with_CnnFaceDetection,
    "parts" => $parts_obtained_with_FaceLandmarkDetection);
$descriptor = $fr->computeDescriptor($img_path, $landmarks);
// $descriptor is 128D array

chinese whispers

Provides raw access to dlib's chinese_whispers function. Client need to build and provide edges. Edges are provided as numeric array. Each element of this array should also be numeric array with 2 elements of long type.

Returned value is also numeric array, containing obtained labels.

<?php
// This example will cluster nodes 0 and 1, but would leave 2 out.
// $labels will look like [0,0,1].
$edges = [[0,0], [0,1], [1,1], [2,2]];
$labels = dlib_chinese_whispers($edges);

Features

  • 1.Face Detection
  • 2.Face Landmark Detection
  • 3.Deep Face Recognition
  • 4.Deep Learning Face Detection
  • 5. Raw chinese_whispers

pdlib's People

Contributors

andypost avatar brccabral avatar goodspb avatar matiasdelellis avatar remicollet avatar slavikca avatar stalker314314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pdlib's Issues

dlib_face_landmark_detection need 2 parameters

Hello,

I tried to use HOG to get the face descriptor, but without success.
When I run the code below:

<?php

// face landmark detection
$landmarks = dlib_face_landmark_detection("~/a.jpg");
var_dump($landmarks);

I get the message:
PHP Warning: dlib_face_landmark_detection() expects exactly 2 parameters, 1 given in /var/www/html/pdlib/face_test.php

Could you write an complete example to get the descriptor using HOG?

P.S.: Until now, I was using this Python api https://github.com/ageitgey/face_recognition with a local webservice to get the face descriptors. It usually takes 0.44 seconds. Using PDlib with CNN detection, I take more than 20 seconds to get the 128D descriptors. What am I doing wrong? Is that only a CNN x HOG difference?

Thanks!

error: ‘jitter_image’ is not a member of ‘dlib’; during building

Hi, I'm trying to manually build pdlib 1.0.2 and I got this issue:

/mnt/c/xampp/htdocs/pdlib/src/face_recognition.cc:50:31: error: ‘jitter_image’ is not a member of ‘dlib’; did you mean
rotate_image’?
   50 |         crops.push_back(dlib::jitter_image(img,rnd));
      |                               ^~~~~~~~~~~~
      |                               rotate_image
make: *** [Makefile:200: src/face_recognition.lo] Error 1

I'm using Windows 10 WSL, and I have dlib version 19.6.0

make failing with "make: *** [Makefile:202: pdlib.lo] Error 1"

I'm just trying to install pdlib for nextcloud face recognition on ubunut server 22.04.01 Jammy and have installed Dlib as required.
When i tried to run make I get this:

[...]
/usr/local/include/dlib/matrix/matrix_utilities.h:4485:12: error: copying non-static data member ‘int&& dlib::op_join_rows<dlib::matrix<double, 3, 0>, dlib::matrix_op<dlib::op_uniform_matrix_3<double> > >::is_reference_type’ of ra
/usr/local/include/dlib/matrix/matrix_op.h: In instantiation of ‘dlib::matrix_op<OP>::matrix_op(const OP&) [with OP = dlib::op_join_rows<dlib::matrix<double, 3, 0>, dlib::matrix_op<dlib::op_uniform_matrix_3<double> > >]’:
/usr/local/include/dlib/matrix/matrix_utilities.h:4554:16:   required from ‘const dlib::matrix_op<dlib::op_join_rows<EXP1, EXP2> > dlib::join_rows(const dlib::matrix_exp<EXP>&, const dlib::matrix_exp<src_exp>&) [with EXP1 = dlib::matrix<double, 3, 0>; EXP2 = dlib::matrix_op<dlib::op_uniform_matrix_3<double> >]’
/usr/local/include/dlib/matrix/matrix_la.h:1400:30:   required from ‘void dlib::svd3(const dlib::matrix_exp<EXP>&, dlib::matrix<typename dlib::matrix_exp<EXP>::type, uNR, uNC, MM1, L1>&, dlib::matrix<typename dlib::matrix_exp<EXP>::type, wN, wX, MM2, L1>&, dlib::matrix<typename dlib::matrix_exp<EXP>::type, vN, vN, MM3, L1>&) [with EXP = dlib::matrix<double, 3, 0>; long int uNR = 3; long int uNC = 0; long int wN = 0; long int vN = 0; long int wX = 1; MM1 = dlib::memory_manager_stateless_kernel_1<char>; MM2 = dlib::memory_manager_stateless_kernel_1<char>; MM3 = dlib::memory_manager_stateless_kernel_1<char>; L1 = dlib::row_major_layout; typename dlib::matrix_exp<EXP>::type = double]’
/usr/local/include/dlib/matrix/matrix_la.h:1430:13:   required from ‘const dlib::matrix<typename EXP::type, EXP::NC, EXP::NR, typename EXP::mem_manager_type> dlib::pinv_helper(const dlib::matrix_exp<EXP>&, double) [with EXP = dlib::matrix<double, 3, 0>; typename EXP::mem_manager_type = dlib::memory_manager_stateless_kernel_1<char>; typename EXP::type = double]’
/usr/local/include/dlib/matrix/matrix_la.h:1459:31:   required from ‘const dlib::matrix<typename EXP::type, EXP::NC, EXP::NR, typename EXP::mem_manager_type> dlib::pinv(const dlib::matrix_exp<EXP>&, double) [with EXP = dlib::matrix<double, 3, 0>; typename EXP::mem_manager_type = dlib::memory_manager_stateless_kernel_1<char>; typename EXP::type = double]’
/usr/local/include/dlib/geometry/point_transforms.h:316:44:   required from ‘dlib::point_transform_affine dlib::find_affine_transform(const std::vector<dlib::vector<T, 2> >&, const std::vector<dlib::vector<T, 2> >&) [with T = double]’
/usr/local/include/dlib/geometry/point_transforms.h:645:61:   required from here
/usr/local/include/dlib/matrix/matrix_op.h:59:13: error: use of deleted function ‘dlib::op_join_rows<dlib::matrix<double, 3, 0>, dlib::matrix_op<dlib::op_uniform_matrix_3<double> > >::op_join_rows(const dlib::op_join_rows<dlib::matrix<double, 3, 0>, dlib::matrix_op<dlib::op_uniform_matrix_3<double> > >&)’
   59 |             op(op_)
      |             ^~~~~~~
make: *** [Makefile:202: pdlib.lo] Error 1

Can anyone help out here?

Specify a license, CREDITS, and tag to an initial version.

Hi goodspb,
Thanks for starting the project. 😄

Now that is implemented the minimum we need for the nextcloud facerecognition app (when you merge the pull #6), I want to make packages fedora and debian to reduce the difficulties of access to the project.
I already have the functional fedora package for COPR, but a license is needed .. 😉

Regards,
Matias.

Missing tags during make process?

Hi,

I am currently trying to install pdlib but it seems that i am stuck in one of the last steps..
I have installed dlib and configured the project. Yet when I run "make" I ran in a problem that I could not resolve.

The makefile seems not to specify a '--tag'.
Is this a known issue or just a problem in my setup?

bild

~/dlib/dlib/build/pdlib# make /bin/sh /root/dlib/dlib/build/pdlib/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++11 -I. -I/root/dlib/dlib/build/pdlib -DPHP_ATOM_INC -I/root/dlib/dlib/build/pdlib/include -I/root/dlib/dlib/build/pdlib/main -I/root/dlib/dlib/build/pdlib -I/opt/include/php -I/opt/include/php/main -I/opt/include/php/TSRM -I/opt/include/php/Zend -I/opt/include/php/ext -I/opt/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/dlib/dlib/build/pdlib/pdlib.cc -o pdlib.lo libtool: compile: unable to infer tagged configuration libtool: error: specify a tag with '--tag' Makefile:181: recipe for target 'pdlib.l

Processing photos not finding faces.

Hello,

I am running dlib / pdlib with my GPU on ubuntu 18.04 to scan photos for faces.
I seem to be scanning the photos with no errors, however it is not finding faces,
Looking into my databse I can see the follwoing errors:

Error while calling cudaGetLastError() in file /home/ncadmin/dlib/dlib/cuda/gpu_data.cpp:114. code: 8, reason: invalid device function

Error while calling cudaOccupancyMaxPotentialBlockSize(&num_blocks,&num_threads,K) in file /home/ncadmin/dlib/dlib/cuda/cuda_utils.h:164. code: 8, reason: invalid device function

Building on Alpine fails (configure: error: pkg-config not found)

I'm trying to build pdlib in an Alpine Docker image (including the dlib dependency), but I'm stuck on the ./configure step.

Here is the output:

Cloning into 'pdlib'...
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
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-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/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib
checking for PHP extension directory... /usr/lib/php7/modules
checking for PHP installed headers prefix... /usr/include/php7
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
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... configure: error: pkg-config not found
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
The command '/bin/sh -c git clone https://github.com/goodspb/pdlib.git   ; cd pdlib   ; phpize   ; ./configure --enable-debug   ; make   ; make DESTDIR=/pdlib-install install' returned a non-zero code: 2

And here is the Dockerfile to reproduce:

FROM alpine

RUN apk update && apk add bash vim git

# DLib https://github.com/goodspb/pdlib#dependencies
RUN apk add cmake make gcc libc-dev g++ openblas-dev libx11-dev

RUN git clone https://github.com/davisking/dlib.git \
  ; cd dlib/dlib \
  ; mkdir build \
  ; cd build \
  ; cmake -DBUILD_SHARED_LIBS=ON .. \
  ; make \
  ; make DESTDIR=/dlib-install install \
  ; make install

# https://github.com/goodspb/pdlib#installation
RUN apk add php7-dev

RUN git clone https://github.com/goodspb/pdlib.git \
  ; cd pdlib \
  ; phpize \
  ; ./configure --enable-debug \ # <-- this is the step that fails
  ; make \
  ; make DESTDIR=/pdlib-install install

Any idea what could be going wrong?

can't make pdlib on Ubuntu 16.04 - #error DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code

Tried to follow README
But make fails with this error:

root@ubhome:/home/slavik/face/pdlib# make
/bin/bash /home/slavik/face/pdlib/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/slavik/face/pdlib -DPHP_ATOM_INC -I/home/slavik/face/pdlib/include -I/home/slavik/face/pdlib/main -I/home/slavik/face/pdlib -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -std=c++11   -c /home/slavik/face/pdlib/src/face_detection.cc -o src/face_detection.lo
libtool: compile:  g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/home/slavik/face/pdlib -DPHP_ATOM_INC -I/home/slavik/face/pdlib/include -I/home/slavik/face/pdlib/main -I/home/slavik/face/pdlib -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -std=c++11 -c /home/slavik/face/pdlib/src/face_detection.cc  -fPIC -DPIC -o src/.libs/face_detection.o
In file included from /usr/local/include/dlib/gui_core/xlib.h:4:0,
                 from /usr/local/include/dlib/gui_core.h:14,
                 from /usr/local/include/dlib/gui_widgets/drawable.h:10,
                 from /usr/local/include/dlib/gui_widgets/widgets.h:16,
                 from /usr/local/include/dlib/gui_widgets.h:13,
                 from /home/slavik/face/pdlib/src/face_detection.cc:6:
/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
 #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code.  Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
  ^
/usr/local/include/dlib/gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
 #error "Also make sure you have libx11-dev installed on your system"
  ^

And yes, I have libx11-dev installed on my system.

Any way around that issue?

Or is there pdlib.so I can download (where?) and use?

configure error: dlib-1 not found

I am unable to install pdlib, I followed the instructions mentioned on the readme file and everything seemed fine but ./configure wouldn't generate a make file, here are the logs from the terminal:

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-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 -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... 2.0.2 (ok)
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... configure: error: dlib-1 not found

I can locate dlib under the usr/local/include
What could be the problem ?

pdlib v1.0.1 and v1.0.2 module fails to load with undefined symbol after compiling on FreeBSD

I had to compile dlib with -fPIC to get pdlib to compile at all. Attached full make test output

[root@nextcloud ~/pdlib-1.0.2]# make test

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

PHP Warning: PHP Startup: Unable to load dynamic library 'pdlib.so' (tried: /root/pdlib-1.0.2/modules/pdlib.so (/root/pdlib-1.0.2/modules/pdlib.so: Undefined symbol "_ZTINSt3__113ba
sic_ostreamIcNS_11char_traitsIcEEEE"), /root/pdlib-1.0.2/modules/pdlib.so.so (Cannot open "/root/pdlib-1.0.2/modules/pdlib.so.so")) in Unk

php_test_results_20200812_0703.txt

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

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 [email protected] 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$

make test: "bz2 extension missing" but php-bz2 is installed

When I run make test it skips 1 test with the following message:

SKIP Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt] reason: bz2 extension missing

However the bz2 extension is installed and face recognition in nextcloud is working...

make: *** [Makefile:192: pdlib.lo] Error 1

Can anybody tell me what's the Error 1 means and how to solve it?

There are a lot of "error: use of deleted function".

First I was thinking it's because of the compiler.

g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
in the instructions are requirements for g++ 11 or higher

So I ran sudo apt install build-essential
but it had already the newest version (12.8ubuntu1.1).

Second I thought it's because of the config path
I tried ./configure --enable-debug and PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-debug
My dlib install location is "/root/dlib" but there is no "pkgconfig"

But the same make Error. Here is the make-log:
putty.log

I run Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-126-generic x86_64).

pkg-config not found error show while configuring pdlib in centos 7

Hello

can someone tell me where to change this path of pkgconfig. because still i see the same error of pkg-config not found after i type PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/ in terminal and when i run ./configure command.

If possible please give some idea about this error.

Thank you

Ashampoo_Snap_2020 05 12_15h51m00s_001_

Ubuntu 18.04 "The library pdlib is not available." under php7.2-fpm

So I followed the path of compile and install all required libs and indeed I can see from CLI the library is there.

php -m| grep pd
pdlib

But from PHP7.2-fpm it seems that there is no libraryactivated.

I tried to add extension="pdlib.so" to php/7.2/php.ini & php/7.2/cli/php.ini & php/7.2/fpm/php.ini & php/7.2/mods-available/pdlib.ini

The only part that confirms the library is there is a cli. Please advice how to activate it under PHP7.2-fpm

Unable to configre on Ubuntu 18.04

I installed dlib using the following commands.

git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

And then attempted to install pdlib.

git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure

I ran into the following.

checking for grep that handles long lines and -e... /bin/grep                                                                                                                                              [69/194]
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /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 -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-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/2019
0902/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
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.21.99
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... /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 i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-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                                                                                                                                        [15/194]
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... /bin/dd
checking how to truncate binary pipes... /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) 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
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) 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) 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.21.99

  CXXFLAGS    : -g -O2
  LDFLAGS     :
  LIBDIR:     : -L/usr/local/lib -ldlib -lpthread /usr/lib/i386-linux-gnu/libSM.so /usr/lib/i386-linux-gnu/libICE.so /usr/lib/i386-linux-gnu/libX11.so /usr/lib/i386-linux-gnu/libXext.so /usr/lib/i386-linux-gnu/libgif.so /usr/lib/i386-linux-gnu/libpng.so /usr/lib/i386-linux-gnu/libz.so /usr/lib/i386-linux-gnu/libjpeg.so /usr/lib/i386-linux-gnu/libsqlite3.so
  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

Illegal instruction (core dumped) using cuda docker

pdlib produces a Illegal instruction (core dumped) error message and terminate the execution of the php script. it happends when detect() method is called for CnnFaceDetection.

The stranger thing, when instantiate the class everything goes ok, and nvidia-smi shows a increment of memory usage.

dlib compiled into a nvidia cuda docker. python works well. Test passed and gpu used a gb or ram.

cmake -H/dlib -B/dlib/build -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug

pdlib compiled fine too. But Test fail trying to detect faces.

=====================================================================
TIME START 2020-04-28 08:14:47
=====================================================================
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 Testing FaceLandmarkDetection constructor without arguments [tests/face_landmark_detection_ctor_error.phpt] 
PASS Testing FaceRecognition constructor without arguments [tests/face_recognition_ctor_error.phpt] 
FAIL Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt] 

My script test


 ~ debug: models/mmod_human_face_detector.dat
 ~ Processing Input: input
 ~ Stored temporary file 0-1588030290.8421.jpg in images/0-1588030290.8421.jpg
 
 ! Generating 128D Descriptor 
   . Detecting  Illegal **instruction (core dumped)**

i also configured pdlib using --enable-debug flag, but the same Illegal instruction (core dumped) message appears :(

Can't install pdlib php 7.3 (NextCloud)

First I tried:

apt-get install libx11-dev

apt-get install libopenblas-dev liblapack-dev

git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install


git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure --enable-debug
make
sudo make install

That.... supposedly worked.

I even tried the test: apt-get install php-bz2
make test

14 passes

I'm running NextCloud, I have nano /etc/php/7.3/cli/php.ini and nano /etc/php/7.3/apache2/php.ini

I add
extension="pdlib.so"

  • to the bottom of the php.ini files. No joy

phpenmod pdlib doesn't complain, still NextCloud doesn't show pdlib as installed. But /etc/php/7.3/cli/ and /etc/php/7.3/mods-available have pdlib.ini.....

I am digging around issues here and find this: https://github.com/matiasdelellis/facerecognition/wiki/Installation#install-dlib - it should be more visible.....
So I try:

echo "deb https://repo.delellis.com.ar buster buster" > /etc/apt/sources.list.d/20-pdlib.list
wget -qO - https://repo.delellis.com.ar/repo.gpg.key | sudo apt-key add -
apt update
apt install php7.3-pdlib

No joy. It's just not working.... I can run the test, but NextCloud (I assume uses php7.3 cli) isn't picking up pdlib.....

git clone https://github.com/matiasdelellis/pdlib-min-test-suite.git

make php-test


PHP Warning:  Module 'pdlib' already loaded in Unknown on line 0
PHP Warning:  Module 'pdlib' already loaded in Unknown on line 0
Welcome to pdlib min test suite for Facerecognition app...

First we try to open the models... Done

Processing file: input/Big Bang Theory.jpg
Number of faces detected: 3
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Processing file: input/Big Bang Theory.png
Number of faces detected: 7
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done
Face landmarks... Done
Face descriptor... Done

Missing symbol lookup error _ZN4dlib4cuda17tensor_descriptorC1Ev

php: symbol lookup error: /usr/lib/php/20210902/pdlib.so: undefined symbol: _ZN4dlib4cuda17tensor_descriptorC1Ev

Face Recognition fine with CPU, failing on GPU compile missing token

“First we try to open the models… php: symbol lookup error: /usr/lib/php/20210902/pdlib.so: undefined symbol: _ZN4dlib4cuda17tensor_descriptorC1Ev”

I’m attempting to use an nVidia P1000 Quadro in a Dell T410 PowerEdge.
Dlib compiles fine, with no errors and passes its tests.

This was the latest attempt to use the P1000 for Face Recognition. I attempted to use an earlier nVidia driver, and the 11 Version of CUDA, but the initial apt package put in the 12.x version, which also errored out with the “undefined symbol” error.

Just getting the compile complete took a long time to get correct.

I’m close to abandoning the effort to get GPU Face Recognition going in Nextcloud, returning to CPU recogition.

Thanks for looking,
–Joe.

Dell T410 PowerEdge
128Gb Memory
3Tb Hard Drives
Ubuntu 20.04
Driver Version: 535.54.03
CUDA Version: 12.2
PHP 8.1
Nextcloud Hub 3 (25.0.7)
nginx web engine

Thanks,
--Joe.

Failing just test php extension version

I've installed dlib and pdlib following the installation instructions.
However after installing pdlib i run make test and it returns with 1 fail: Just test php extension version.
The error report is as following:

Error report

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Just test php extension version [tests/version.phpt]
=====================================================================


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

Number of tests :   15                14
Tests skipped   :    1 (  6.7%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (  6.7%) (  7.1%)
Tests passed    :   13 ( 86.7%) ( 92.9%)
---------------------------------------------------------------------
Time taken      :    5 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Just test php extension version [tests/version.phpt]
=====================================================================


================================================================================
/home/p0ps/pdlib/tests/version.phpt
================================================================================
string(5) "1.1.0"
================================================================================
001+ string(5) "1.1.0"
001- string(5) "1.0.2"
================================================================================




================================================================================
BUILD ENVIRONMENT
================================================================================
OS:
Linux - Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64

Autoconf:
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

Bundled Libtool:
libtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

System Libtool:
N/A
Compiler:
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/10/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6) 

Bison:

Libraries:
	linux-vdso.so.1 (0x0000007f88684000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007f880a2000)
	libutil.so.1 => /lib/aarch64-linux-gnu/libutil.so.1 (0x0000007f8808e000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007f87fe3000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007f87fcf000)
	libxml2.so.2 => /lib/aarch64-linux-gnu/libxml2.so.2 (0x0000007f87e1c000)
	libssl.so.1.1 => /lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007f87d7f000)
	libcrypto.so.1.1 => /lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007f87acf000)
	libpcre2-8.so.0 => /lib/aarch64-linux-gnu/libpcre2-8.so.0 (0x0000007f87a38000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007f87a0e000)
	libsodium.so.23 => /lib/aarch64-linux-gnu/libsodium.so.23 (0x0000007f879c4000)
	libargon2.so.1 => /lib/aarch64-linux-gnu/libargon2.so.1 (0x0000007f879ac000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007f87837000)
	/lib/ld-linux-aarch64.so.1 (0x0000007f88654000)
	libicuuc.so.67 => /lib/aarch64-linux-gnu/libicuuc.so.67 (0x0000007f8763f000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007f87609000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007f875d8000)
	libicudata.so.67 => /lib/aarch64-linux-gnu/libicudata.so.67 (0x0000007f85ab1000)
	libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007f858d9000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007f858b5000)



================================================================================
PHPINFO
================================================================================
phpinfo()
PHP Version => 8.2.9

System => Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64
Build Date => Aug 29 2023 10:48:25
Build System => Linux
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/8.2/cli
Loaded Configuration File => /etc/php/8.2/cli/php.ini
Scan this dir for additional .ini files => /etc/php/8.2/cli/conf.d
Additional .ini files parsed => /etc/php/8.2/cli/conf.d/10-opcache.ini,
/etc/php/8.2/cli/conf.d/10-pdo.ini,
/etc/php/8.2/cli/conf.d/20-bz2.ini,
/etc/php/8.2/cli/conf.d/20-calendar.ini,
/etc/php/8.2/cli/conf.d/20-ctype.ini,
/etc/php/8.2/cli/conf.d/20-exif.ini,
/etc/php/8.2/cli/conf.d/20-ffi.ini,
/etc/php/8.2/cli/conf.d/20-fileinfo.ini,
/etc/php/8.2/cli/conf.d/20-ftp.ini,
/etc/php/8.2/cli/conf.d/20-gettext.ini,
/etc/php/8.2/cli/conf.d/20-iconv.ini,
/etc/php/8.2/cli/conf.d/20-phar.ini,
/etc/php/8.2/cli/conf.d/20-posix.ini,
/etc/php/8.2/cli/conf.d/20-readline.ini,
/etc/php/8.2/cli/conf.d/20-shmop.ini,
/etc/php/8.2/cli/conf.d/20-sockets.ini,
/etc/php/8.2/cli/conf.d/20-sysvmsg.ini,
/etc/php/8.2/cli/conf.d/20-sysvsem.ini,
/etc/php/8.2/cli/conf.d/20-sysvshm.ini,
/etc/php/8.2/cli/conf.d/20-tokenizer.ini

PHP API => 20220829
PHP Extension => 20220829
Zend Extension => 420220829
Zend Extension Build => API420220829,NTS
PHP Extension Build => API20220829,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
Zend Max Execution Timers => disabled
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.2.9, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.9, Copyright (c), by Zend Technologies


 _______________________________________________________________________


Configuration

bz2

BZip2 Support => Enabled
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
BZip2 Version => 1.0.8, 13-Jul-2019

calendar

Calendar support => enabled

Core

PHP Version => 8.2.9

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDERR => STDERR
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_log_mode => 0644 => 0644
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
expose_php => On => On
extension_dir => /usr/lib/php/20220829 => /usr/lib/php/20220829
fiber.stack_size => no value => no value
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/php => .:/usr/share/php
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
mail.add_x_header => Off => Off
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
mail.mixed_lf_and_crlf => Off => Off
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
max_multipart_body_parts => -1 => -1
memory_limit => 1G => 1G
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => -1 => -1
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
syslog.facility => LOG_USER => LOG_USER
syslog.filter => no-ctrl => no-ctrl
syslog.ident => php => php
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => -1 => -1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.exception_ignore_args => On => On
zend.exception_string_param_max_len => 0 => 0
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off

ctype

ctype functions => enabled

date

date/time support => enabled
timelib version => 2022.09
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => UTC

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.833333 => 90.833333
date.sunset_zenith => 90.833333 => 90.833333
date.timezone => UTC => UTC

exif

EXIF Support => enabled
Supported EXIF Version => 0220
Supported filetypes => JPEG, TIFF
Multibyte decoding support using mbstring => disabled
Extended EXIF tag formats => Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson

Directive => Local Value => Master Value
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

FFI

FFI support => enabled

Directive => Local Value => Master Value
ffi.enable => preload => preload
ffi.preload => no value => no value

fileinfo

fileinfo support => enabled
libmagic => 540

filter

Input Validation and Filtering => enabled

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

ftp

FTP support => enabled
FTPS support => enabled

gettext

GetText Support => enabled

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat murmur3a murmur3c murmur3f xxh32 xxh64 xxh3 xxh128 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

MHASH support => Enabled
MHASH API Version => Emulated Support

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.31

Directive => Local Value => Master Value
iconv.input_encoding => no value => no value
iconv.internal_encoding => no value => no value
iconv.output_encoding => no value => no value

json

json support => enabled

libxml

libXML support => active
libXML Compiled Version => 2.9.14
libXML Loaded Version => 20914
libXML streams => enabled

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1n  15 Mar 2022
OpenSSL Header Version => OpenSSL 1.1.1n  15 Mar 2022
Openssl default config => /usr/lib/ssl/openssl.cnf

Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value

pcntl

pcntl support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.40 2022-04-14
PCRE Unicode Version => 14.0.0
PCRE JIT Support => enabled
PCRE JIT Target => ARM-64 64bit (little endian + unaligned)

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.jit => On => On
pcre.recursion_limit => 100000 => 100000

pdlib

pdlib support => enabled
pdlib extension version => 1.1.0
dlib library version => 19.24.99
DLIB_USE_CUDA => false
DLIB_USE_BLAS => true
DLIB_USE_LAPACK => true
USE_AVX_INSTRUCTIONS => false
USE_AVX2_INSTRUCTIONS => false
USE_NEON_INSTRUCTIONS => true
USE_SSE2_INSTRUCTIONS => false
USE_SSE4_INSTRUCTIONS => false

PDO

PDO support => enabled
PDO drivers =>  

Phar

Phar: PHP Archive support => enabled
Phar API version => 1.1.1
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
Native OpenSSL support => enabled


Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

posix

POSIX support => enabled

random

Version => 8.2.9

readline

Readline Support => enabled
Readline library => EditLine wrapper

Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \>  => \b \> 

Reflection

Reflection => enabled

session

Session Support => enabled
Registered save handlers => files user 
Registered serializer handlers => php_serialize php php_binary 

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_samesite => no value => no value
session.cookie_secure => Off => Off
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 0 => 0
session.lazy_write => On => On
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php/sessions => /var/lib/php/sessions
session.serialize_handler => php => php
session.sid_bits_per_character => 5 => 5
session.sid_length => 26 => 26
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => Off => Off

shmop

shmop support => enabled

sockets

Sockets Support => enabled

sodium

sodium support => enabled
libsodium headers version => 1.0.18
libsodium library version => 1.0.18

SPL

SPL support => enabled
Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => On => On
assert.bail => Off => Off
assert.callback => no value => no value
assert.exception => On => On
assert.warning => On => On
auto_detect_line_endings => Off => Off
default_socket_timeout => 60 => 60
from => no value => no value
session.trans_sid_hosts => no value => no value
session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
unserialize_max_depth => 4096 => 4096
url_rewriter.hosts => no value => no value
url_rewriter.tags => form= => form=
user_agent => no value => no value

sysvmsg

sysvmsg support => enabled

sysvsem

sysvsem support => enabled

sysvshm

sysvshm support => enabled

tokenizer

Tokenizer Support => enabled

Zend OPcache

Opcode Caching => Disabled
Optimization => Disabled
SHM Cache => Enabled
File Cache => Disabled
JIT => Disabled
Startup Failed => Opcode Caching is disabled for CLI

Directive => Local Value => Master Value
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.file_cache => no value => no value
opcache.file_cache_consistency_checks => On => On
opcache.file_cache_only => Off => Off
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.interned_strings_buffer => 8 => 8
opcache.jit => no value => no value
opcache.jit_bisect_limit => 0 => 0
opcache.jit_blacklist_root_trace => 16 => 16
opcache.jit_blacklist_side_trace => 8 => 8
opcache.jit_buffer_size => 0 => 0
opcache.jit_debug => 0 => 0
opcache.jit_hot_func => 127 => 127
opcache.jit_hot_loop => 64 => 64
opcache.jit_hot_return => 8 => 8
opcache.jit_hot_side_exit => 8 => 8
opcache.jit_max_exit_counters => 8192 => 8192
opcache.jit_max_loop_unrolls => 8 => 8
opcache.jit_max_polymorphic_calls => 2 => 2
opcache.jit_max_recursive_calls => 2 => 2
opcache.jit_max_recursive_returns => 2 => 2
opcache.jit_max_root_traces => 1024 => 1024
opcache.jit_max_side_traces => 128 => 128
opcache.jit_prof_threshold => 0.005 => 0.005
opcache.lockfile_path => /tmp => /tmp
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 10000 => 10000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 128 => 128
opcache.opt_debug_level => 0 => 0
opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF
opcache.preferred_memory_model => no value => no value
opcache.preload => no value => no value
opcache.preload_user => no value => no value
opcache.protect_memory => Off => Off
opcache.record_warnings => Off => Off
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => Off => Off
opcache.save_comments => On => On
opcache.use_cwd => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.validate_timestamps => On => On

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.11
Linked Version => 1.2.11

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
LANGUAGE => en_US.UTF-8
USER => p0ps
SSH_CLIENT => deleted
XDG_SEAT => seat0
TEXTDOMAIN => Linux-PAM
SSH_AGENT_PID => 854
XDG_SESSION_TYPE => x11
SHLVL => 2
TEST_PHP_SRCDIR => /home/p0ps/pdlib
HOME => /home/p0ps
OLDPWD => /home/p0ps
DESKTOP_SESSION => LXDE-pi
SSH_TTY => deleted
XDG_SEAT_PATH => /org/freedesktop/DisplayManager/Seat0
TEST_PHP_CGI_EXECUTABLE =>  
MAKEFLAGS =>  
DBUS_SESSION_BUS_ADDRESS => unix:path=/run/user/1000/bus
COLORTERM => truecolor
MAKE_TERMERR => /dev/pts/0
QT_QPA_PLATFORMTHEME => qt5ct
LOGNAME => p0ps
TEST_PHP_EXECUTABLE => /usr/bin/php8.2
_ => /usr/bin/php8.2
XDG_SESSION_CLASS => user
TERM => xterm-256color
XDG_SESSION_ID => 1
SAL_USE_VCLPLUGIN => gtk3
PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
XDG_SESSION_PATH => /org/freedesktop/DisplayManager/Session0
XDG_MENU_PREFIX => lxde-pi-
MAKELEVEL => 1
XDG_RUNTIME_DIR => /run/user/1000
DISPLAY => :0
LANG => en_US.UTF-8
XDG_CURRENT_DESKTOP => LXDE
XDG_CONFIG_HOME => /home/p0ps/.config
XDG_SESSION_DESKTOP => lightdm-xsession
XAUTHORITY => /home/p0ps/.Xauthority
LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SSH_AUTH_SOCK => deleted
XDG_GREETER_DATA_DIR => /var/lib/lightdm/data/p0ps
TEST_PHPDBG_EXECUTABLE =>  
SHELL => /bin/bash
MAKE_TERMOUT => /dev/pts/0
NO_AT_BRIDGE => 1
GDMSESSION => lightdm-xsession
_LXSESSION_PID => 793
GPG_AGENT_INFO => /run/user/1000/gnupg/S.gpg-agent:0:1
XDG_VTNR => 7
PWD => /home/p0ps/pdlib
LC_ALL => en_US.UTF-8
XDG_CONFIG_DIRS => /etc/xdg
XDG_DATA_DIRS => /usr/share/fkms:/usr/local/share:/usr/share/raspi-ui-overrides:/usr/share:/usr/share/gdm:/var/lib/menu-xdg
SSH_CONNECTION => deleted
CC => cc
MFLAGS =>  
VTE_VERSION => 6203

PHP Variables

Variable => Value
$_SERVER['LANGUAGE'] => en_US.UTF-8
$_SERVER['USER'] => p0ps
$_SERVER['SSH_CLIENT'] => deleted
$_SERVER['XDG_SEAT'] => seat0
$_SERVER['TEXTDOMAIN'] => Linux-PAM
$_SERVER['SSH_AGENT_PID'] => 854
$_SERVER['XDG_SESSION_TYPE'] => x11
$_SERVER['SHLVL'] => 2
$_SERVER['TEST_PHP_SRCDIR'] => /home/p0ps/pdlib
$_SERVER['HOME'] => /home/p0ps
$_SERVER['OLDPWD'] => /home/p0ps
$_SERVER['DESKTOP_SESSION'] => LXDE-pi
$_SERVER['SSH_TTY'] => deleted
$_SERVER['XDG_SEAT_PATH'] => /org/freedesktop/DisplayManager/Seat0
$_SERVER['TEST_PHP_CGI_EXECUTABLE'] => 
$_SERVER['MAKEFLAGS'] => 
$_SERVER['DBUS_SESSION_BUS_ADDRESS'] => unix:path=/run/user/1000/bus
$_SERVER['COLORTERM'] => truecolor
$_SERVER['MAKE_TERMERR'] => /dev/pts/0
$_SERVER['QT_QPA_PLATFORMTHEME'] => qt5ct
$_SERVER['LOGNAME'] => p0ps
$_SERVER['TEST_PHP_EXECUTABLE'] => /usr/bin/php8.2
$_SERVER['_'] => /usr/bin/php8.2
$_SERVER['XDG_SESSION_CLASS'] => user
$_SERVER['TERM'] => xterm-256color
$_SERVER['XDG_SESSION_ID'] => 1
$_SERVER['SAL_USE_VCLPLUGIN'] => gtk3
$_SERVER['PATH'] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
$_SERVER['XDG_SESSION_PATH'] => /org/freedesktop/DisplayManager/Session0
$_SERVER['XDG_MENU_PREFIX'] => lxde-pi-
$_SERVER['MAKELEVEL'] => 1
$_SERVER['XDG_RUNTIME_DIR'] => /run/user/1000
$_SERVER['DISPLAY'] => :0
$_SERVER['LANG'] => en_US.UTF-8
$_SERVER['XDG_CURRENT_DESKTOP'] => LXDE
$_SERVER['XDG_CONFIG_HOME'] => /home/p0ps/.config
$_SERVER['XDG_SESSION_DESKTOP'] => lightdm-xsession
$_SERVER['XAUTHORITY'] => /home/p0ps/.Xauthority
$_SERVER['LS_COLORS'] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
$_SERVER['SSH_AUTH_SOCK'] => deleted
$_SERVER['XDG_GREETER_DATA_DIR'] => /var/lib/lightdm/data/p0ps
$_SERVER['TEST_PHPDBG_EXECUTABLE'] => 
$_SERVER['SHELL'] => /bin/bash
$_SERVER['MAKE_TERMOUT'] => /dev/pts/0
$_SERVER['NO_AT_BRIDGE'] => 1
$_SERVER['GDMSESSION'] => lightdm-xsession
$_SERVER['_LXSESSION_PID'] => 793
$_SERVER['GPG_AGENT_INFO'] => /run/user/1000/gnupg/S.gpg-agent:0:1
$_SERVER['XDG_VTNR'] => 7
$_SERVER['PWD'] => /home/p0ps/pdlib
$_SERVER['LC_ALL'] => en_US.UTF-8
$_SERVER['XDG_CONFIG_DIRS'] => /etc/xdg
$_SERVER['XDG_DATA_DIRS'] => /usr/share/fkms:/usr/local/share:/usr/share/raspi-ui-overrides:/usr/share:/usr/share/gdm:/var/lib/menu-xdg
$_SERVER['SSH_CONNECTION'] => deleted
$_SERVER['CC'] => cc
$_SERVER['MFLAGS'] => 
$_SERVER['VTE_VERSION'] => 6203
$_SERVER['PHP_SELF'] => 
$_SERVER['SCRIPT_NAME'] => 
$_SERVER['SCRIPT_FILENAME'] => 
$_SERVER['PATH_TRANSLATED'] => 
$_SERVER['DOCUMENT_ROOT'] => 
$_SERVER['REQUEST_TIME_FLOAT'] => 1694464019.7699
$_SERVER['REQUEST_TIME'] => 1694464019
$_SERVER['argv'] => Array
(
)

$_SERVER['argc'] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact [email protected].

Unable to compile PDlib due to 'ld: error: unable to find library -lstdc++' and 'Error code 1' on FreeBSD

System: FreeBSD system 13.2-RELEASE-p8 FreeBSD 13.2-RELEASE-p8 GENERIC amd64
Issue: Unable to compile PDlib due to 'ld: error: unable to find library -lstdc++' and 'Error code 1'
Expected behaviour: PDlib compiles on FreeBSD

Context:
Installing Dlib, following this procedure works: https://github.com/matiasdelellis/facerecognition/wiki/PDlib-Installation

Next step, installing PDlib is met with an error during the 'make' command, when following: https://github.com/matiasdelellis/facerecognition/wiki/PDlib-Installation

git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure
make ==> issue arises here 'Error code 1' and 'ld: error: unable to find library -lstdc++', see below
sudo make install

Possibly because FreeBSD uses clang, not gcc. I have tried multiple work arounds, even removing lstdc from the makefile, but unfortunately this results in crashes when trying to load the .so in PHP.

Maybe it is possible to include clang or allow for a more generic way of compiling?

>make
/bin/sh /home/test/compile/dlib/dlib/build/pdlib/libtool --mode=link c++ -shared -I/home/test/compile/dlib/dlib/build/pdlib/include -I/home/test/compile/dlib/dlib/build/pdlib/main -I/home/test/compile/dlib/dlib/build/pdlib -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -o ./pdlib.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/test/compile/dlib/dlib/build/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 c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/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 -lstdc++ -ldlib -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,pdlib.so -o ./.libs/pdlib.so ld: error: unable to find library -lstdc++ c++: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1

Stop.
make: stopped in /home/test/compile/dlib/dlib/build/pdlib

FreeBSD -> checking for dlib-1... configure: error: dlib-1 not found

Hi,

I tried using:

pkg install dlib

New packages to be INSTALLED:
        dlib: 0.19.0

and also with the instruction:

git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install

And I always get the dlib-1 not found.

Tried to list it from pkg-config:

root@CiteDesNuages:/dlib/pdlib # pkg-config --list-all | grep dlib
gdlib                          gd - GD graphics library
root@CiteDesNuages:/dlib/pdlib #

What am I doing wrong?

autoheader: error: AC_CONFIG_HEADERS not found in configure.ac

I've followed the dependency and installation instructions but when I get to phpize I get the following errors:

/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found
/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found
/usr/bin/phpize: 1: /usr/bin/phpize: /usr/bin/sed: not found
Configuring for:
PHP Api Version:        
Zend Module Api No:     
Zend Extension Api No:  
/usr/bin/phpize: 165: /usr/bin/phpize: /usr/bin/sed: not found
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac

The issue is that configure.ac is empty, but I'm not sure why. I've tried this start to finish with PHP7.4 and PHP8.0, same result.

Raspberry OS Buster, Linux 5.10.63-v8+ #1496 SMP PREEMPT Wed Dec 1 15:59:46 GMT 2021 aarch64 GNU/Linux

Ubuntu 16.04 - "make test" 5 failures

Following the README and #12 (installed libx11-dev) the makes of dlib and pdlb seem to have worked ok. But I'm getting 5 failures in "make test"

=====================================================================
PHP         : /usr/bin/php7.0
PHP_SAPI    : cli
PHP_VERSION : 7.0.33-0ubuntu0.16.04.4
ZEND_VERSION: 3.0.0
PHP_OS      : Linux - Linux Ubuntu-1604-xenial-64-minimal 4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019 x86_64
INI actual  : /root/makestuff/pdlib/tmp-php.ini
More .INIs  :
CWD         : /root/makestuff/pdlib
Extra dirs  :
VALGRIND    : Not used
=====================================================================
.
.
.
.

FAILED TEST SUMMARY
---------------------------------------------------------------------
Args given to chinese_whispers functions is not correct [tests/chinese_whispers_wrong_arg_type_error.phpt]
Testing CnnFaceDetection constructor without arguments [tests/cnn_face_detection_ctor_error.phpt]
Testing FaceLandmarkDetection constructor without arguments [tests/face_landmark_detection_ctor_error.phpt]
Testing FaceRecognition constructor without arguments [tests/face_recognition_ctor_error.phpt]
Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt]

I have added:
[pdlib] extension="pdlib.so"

to:

/etc/php/7.0/cli/php.ini

and logged out / in via ssh... but still get these 5 errors...

I updated to php7.2 but get the same errors:

=====================================================================
PHP         : /usr/bin/php7.2
PHP_SAPI    : cli
PHP_VERSION : 7.2.19-1+ubuntu16.04.1+deb.sury.org+1
ZEND_VERSION: 3.2.0
PHP_OS      : Linux - Linux Ubuntu-1604-xenial-64-minimal 4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019 x86_64
INI actual  : /root/makestuff/pdlib/tmp-php.ini
More .INIs  :
CWD         : /root/makestuff/pdlib
Extra dirs  :
VALGRIND    : Not used
=====================================================================
.
.
.
.
FAILED TEST SUMMARY
---------------------------------------------------------------------
Args given to chinese_whispers functions is not correct [tests/chinese_whispers_wrong_arg_type_error.phpt]
Testing CnnFaceDetection constructor without arguments [tests/cnn_face_detection_ctor_error.phpt]
Testing FaceLandmarkDetection constructor without arguments [tests/face_landmark_detection_ctor_error.phpt]
Testing FaceRecognition constructor without arguments [tests/face_recognition_ctor_error.phpt]
Full test for face recognition - download models, detect faces, landmark detection and face recognition. [tests/integration_face_recognition.phpt]

How do I uninstall pdlib ?

I have successfully installed pdlib and now I just want to uninstall it, I tried sudo make uninstall but there's apparently no uninstall rule.

pkg-config not found

I am having trouble installing pdlib on my NextCloud system which is installed on my Freenas platform. Freenas uses the FreeBSD distro.

When I got to run "./configure --enable-debug", I get the error: "error:pkg-config not found"

I know with FreeBSD they are using "pkgconf" but I have run "pkg-config" and can confirm it is in /usr/local/bin/pkg-config. I even set the variable PKG_CONFIG to help it find it with no luck. Any help would be appreciated.

Php 8.2 support

I tried to compile and install for nextcloud on Php8.2 and it didn't work properly. Please add support as the latest nextcloud betas allow using php8.2

Building not working in Ubuntu 20.04

After PHP-Upgrade from 7.4 to 8.1 I need to rebuild the pblib for the Nextcloud Face Recognition.

Unfortunately, following exactly the install document, I'm getting a ton of errors trying to compile pdlib:

In file included from /usr/local/include/dlib/math.h:6,
                 from /usr/local/include/dlib/matrix/matrix_fft.h:10,
                 from /usr/local/include/dlib/matrix/matrix_conv.h:8,
                 from /usr/local/include/dlib/matrix.h:13,
                 from /usr/local/include/dlib/cuda/tensor.h:8,
                 from /usr/local/include/dlib/dnn.h:12,
                 from /root/pdlib/src/face_recognition.h:8,
                 from /root/pdlib/pdlib.cc:33:
/usr/local/include/dlib/math/bessel.h:11:5: error: ‘cyl_bessel_i’ function uses ‘auto’ type specifier without trailing return type
   11 |     auto cyl_bessel_i(R1 nu, R2 x)
      |     ^~~~
/usr/local/include/dlib/math/bessel.h:11:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/math/bessel.h: In function ‘auto dlib::cyl_bessel_i(R1, R2)’:
/usr/local/include/dlib/math/bessel.h:20:24: error: ‘common_type_t’ in namespace ‘std’ does not name a template type; did you mean ‘common_type’?
   20 |         using R = std::common_type_t<R1,R2>;
      |                        ^~~~~~~~~~~~~
      |                        common_type
/usr/local/include/dlib/math/bessel.h:21:38: error: ‘R’ was not declared in this scope
   21 |         return detail::cyl_bessel_i((R)nu, (R)x);
      |                                      ^
/usr/local/include/dlib/math/bessel.h:21:47: error: expected ‘)’ before ‘x’
   21 |         return detail::cyl_bessel_i((R)nu, (R)x);
      |                                    ~          ^
      |                                               )
/usr/local/include/dlib/math/bessel.h: At global scope:
/usr/local/include/dlib/math/bessel.h:25:5: error: ‘cyl_bessel_j’ function uses ‘auto’ type specifier without trailing return type
   25 |     auto cyl_bessel_j(R1 nu, R2 x)
      |     ^~~~
/usr/local/include/dlib/math/bessel.h:25:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/math/bessel.h: In function ‘auto dlib::cyl_bessel_j(R1, R2)’:
/usr/local/include/dlib/math/bessel.h:34:24: error: ‘common_type_t’ in namespace ‘std’ does not name a template type; did you mean ‘common_type’?
   34 |         using R = std::common_type_t<R1,R2>;
      |                        ^~~~~~~~~~~~~
      |                        common_type
/usr/local/include/dlib/math/bessel.h:35:38: error: ‘R’ was not declared in this scope
   35 |         return detail::cyl_bessel_j((R)nu, (R)x);
      |                                      ^
/usr/local/include/dlib/math/bessel.h:35:47: error: expected ‘)’ before ‘x’
   35 |         return detail::cyl_bessel_j((R)nu, (R)x);
      |                                    ~          ^
      |                                               )
In file included from /usr/local/include/dlib/math.h:7,
                 from /usr/local/include/dlib/matrix/matrix_fft.h:10,
                 from /usr/local/include/dlib/matrix/matrix_conv.h:8,
                 from /usr/local/include/dlib/matrix.h:13,
                 from /usr/local/include/dlib/cuda/tensor.h:8,
                 from /usr/local/include/dlib/dnn.h:12,
                 from /root/pdlib/src/face_recognition.h:8,
                 from /root/pdlib/pdlib.cc:33:
/usr/local/include/dlib/math/windows.h: In function ‘double dlib::kaiser(double, double, dlib::beta_t)’:
/usr/local/include/dlib/math/windows.h:77:48: error: void value not ignored as it ought to be
   77 |             const double a = dlib::cyl_bessel_i(0, beta.v*std::sqrt(1-r*r));
      |                              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/dlib/math/windows.h:78:48: error: void value not ignored as it ought to be
   78 |             const double b = dlib::cyl_bessel_i(0, beta.v);
      |                              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/local/include/dlib/matrix/matrix_conv.h:8,
                 from /usr/local/include/dlib/matrix.h:13,
                 from /usr/local/include/dlib/cuda/tensor.h:8,
                 from /usr/local/include/dlib/dnn.h:12,
                 from /root/pdlib/src/face_recognition.h:8,
                 from /root/pdlib/pdlib.cc:33:
/usr/local/include/dlib/matrix/matrix_fft.h: At global scope:
/usr/local/include/dlib/matrix/matrix_fft.h:274:13: error: ‘operator()’ function uses ‘auto’ type specifier without trailing return type
  274 |             auto operator()(const MAT& mat) const { return dlib::fft(mat); }
      |             ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:274:13: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:277:13: error: ‘operator()’ function uses ‘auto’ type specifier without trailing return type
  277 |             auto operator()(const MAT& mat) const { return dlib::fft(dlib::complex_matrix(mat)); }
      |             ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:277:13: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:285:13: error: ‘operator()’ function uses ‘auto’ type specifier without trailing return type
  285 |             auto operator()(const MAT& mat) const { return dlib::fftr(mat); }
      |             ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:285:13: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:293:13: error: ‘operator()’ function uses ‘auto’ type specifier without trailing return type
  293 |             auto operator()(const MAT& mat) const { return dlib::ifft(mat); }
      |             ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:293:13: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:299:13: error: ‘operator()’ function uses ‘auto’ type specifier without trailing return type
  299 |             auto operator()(const MAT& mat) const { return dlib::ifftr(mat); }
      |             ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:299:13: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:307:9: error: ‘stft_impl’ function uses ‘auto’ type specifier without trailing return type
  307 |         auto stft_impl (
      |         ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:307:9: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:359:9: error: ‘istft_impl’ function uses ‘auto’ type specifier without trailing return type
  359 |         auto istft_impl (
      |         ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:359:9: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:401:12: error: ‘make_hann’ function uses ‘auto’ type specifier without trailing return type
  401 |     inline auto make_hann()
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:401:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:406:12: error: ‘make_blackman’ function uses ‘auto’ type specifier without trailing return type
  406 |     inline auto make_blackman()
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:406:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:411:12: error: ‘make_blackman_nuttall’ function uses ‘auto’ type specifier without trailing return type
  411 |     inline auto make_blackman_nuttall()
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:411:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:416:12: error: ‘make_blackman_harris’ function uses ‘auto’ type specifier without trailing return type
  416 |     inline auto make_blackman_harris()
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:416:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:421:12: error: ‘make_blackman_harris7’ function uses ‘auto’ type specifier without trailing return type
  421 |     inline auto make_blackman_harris7()
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:421:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:426:12: error: ‘make_kaiser’ function uses ‘auto’ type specifier without trailing return type
  426 |     inline auto make_kaiser(beta_t beta)
      |            ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:426:12: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:434:5: error: ‘stft’ function uses ‘auto’ type specifier without trailing return type
  434 |     auto stft (
      |     ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:434:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:448:5: error: ‘stft’ function uses ‘auto’ type specifier without trailing return type
  448 |     auto stft (
      |     ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:448:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:462:5: error: ‘istft’ function uses ‘auto’ type specifier without trailing return type
  462 |     auto istft (
      |     ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:462:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:476:5: error: ‘stftr’ function uses ‘auto’ type specifier without trailing return type
  476 |     auto stftr (
      |     ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:476:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:490:5: error: ‘stftr’ function uses ‘auto’ type specifier without trailing return type
  490 |     auto stftr (
      |     ^~~~
/usr/local/include/dlib/matrix/matrix_fft.h:490:5: note: deduced return type only available with ‘-std=c++14’ or ‘-std=gnu++14’
/usr/local/include/dlib/matrix/matrix_fft.h:504:5: error: ‘istftr’ function uses ‘auto’ type specifier without trailing return type
  504 |     auto istftr (
      |     ^~~~

Any idea how to solve this?

Release 1.0.1 ?

Hi,

Tagged version 1.0 seems quite old (Aug 2018)

Is there any plan to release a bugfix 1.0.1 soon as there is lot of commits in master since.

FYI, I plan to build RPM of the library and this extension in my PHP dedicated repository, for Fedora / RHEL and CentOS, and for all PHP versions available.

https://rpms.remirepo.net/

Alpinelinux build for ppc64le arch fails

Just commited package and got fail to build for ppc64le arch alpinelinux/aports#12174 (comment) (build logs will live some time)

The error itself is

/home/buildozer/aports/testing/php7-pdlib/src/pdlib-1.0/src/face_recognition.cc:37:23:   required from here
/usr/include/dlib/dnn/core.h:1025:37: error: cannot convert 'bool' to '__vector(4) __bool int' in initialization
 1025 |             this_layer_setup_called(false),
      |                                     ^~~~~
      |                                     |
      |                                     bool
/usr/include/dlib/dnn/core.h:1026:37: error: cannot convert 'bool' to '__vector(4) __bool int' in initialization
 1026 |             gradient_input_is_stale(true),
      |                                     ^~~~
      |                                     |
      |                                     bool
/usr/include/dlib/dnn/core.h:1027:52: error: cannot convert 'bool' to '__vector(4) __bool int' in initialization
 1027 |             get_output_and_gradient_input_disabled(false),
      |                                                    ^~~~~
      |                                                    |
      |                                                    bool
In file included from /usr/include/dlib/sequence.h:7,
                 from /usr/include/dlib/optimization/optimization_search_strategies.h:11,
                 from /usr/include/dlib/optimization/optimization.h:9,
                 from /usr/include/dlib/optimization.h:6,
                 from /usr/include/dlib/statistics/vector_normalizer_frobmetric.h:8,
                 from /usr/include/dlib/statistics.h:13,
                 from /usr/include/dlib/image_transforms/assign_image.h:8,
                 from /usr/include/dlib/image_transforms/spatial_filtering.h:15,
                 from /usr/include/dlib/image_processing/scan_image.h:13,
                 from /usr/include/dlib/image_processing.h:11,
                 from /usr/include/dlib/dnn/input.h:10,
                 from /usr/include/dlib/dnn.h:13,
                 from /home/buildozer/aports/testing/php7-pdlib/src/pdlib-1.0/src/face_recognition.h:8,
                 from /home/buildozer/aports/testing/php7-pdlib/src/pdlib-1.0/src/face_recognition.cc:2:
/usr/include/dlib/sequence/sequence_kernel_2.h: In instantiation of 'void dlib::sequence_kernel_2<T, mem_manager>::reset() const [with T = dlib::lbfgs_search_strategy::data_helper; mem_manager = dlib::memory_manager_stateless_kernel_1<char>]':
/usr/include/dlib/sequence/sequence_kernel_2.h:496:10:   required from here
/usr/include/dlib/sequence/sequence_kernel_2.h:500:19: error: cannot convert 'bool' to '__vector(4) __bool int' in assignment
  500 |         at_start_ = true;
      |         ~~~~~~~~~~^~~~~~
/usr/include/dlib/sequence/sequence_kernel_2.h: In instantiation of 'unsigned int dlib::sequence_kernel_2<T, mem_manager>::current_element_valid() const [with T = dlib::lbfgs_search_strategy::data_helper; mem_manager = dlib::memory_manager_stateless_kernel_1<char>]':
/usr/include/dlib/sequence/sequence_kernel_2.h:510:10:   required from here
/usr/include/dlib/sequence/sequence_kernel_2.h:514:41: error: cannot convert 'bool' to '__vector(4) __bool int' in return
  514 |         return (current_enumeration_node!=0);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                         |
      |                                         bool
/usr/include/dlib/sequence/sequence_kernel_2.h: In instantiation of 'unsigned int dlib::sequence_kernel_2<T, mem_manager>::move_next() const [with T = dlib::lbfgs_search_strategy::data_helper; mem_manager = dlib::memory_manager_stateless_kernel_1<char>]':
/usr/include/dlib/sequence/sequence_kernel_2.h:549:10:   required from here
/usr/include/dlib/sequence/sequence_kernel_2.h:573:19: error: cannot convert 'bool' to '__vector(4) __bool int' in assignment
  573 |         at_start_ = false;
      |         ~~~~~~~~~~^~~~~~~
/usr/include/dlib/sequence/sequence_kernel_2.h:574:41: error: cannot convert 'bool' to '__vector(4) __bool int' in return
  574 |         return (current_enumeration_node!=0);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      |                                         |
      |                                         bool
make: *** [Makefile:202: src/face_recognition.lo] Error 1

error: pkg-config not found

Hallo @goodspb ,
I try to install the pdlib for @matiasdelellis Facerecognition app.

During ./configure --enable-debug I get checking for pkg-config... configure: error: pkg-config not found. After a search I found the config in /usr/share/bash-completion/completions/pkg-config.

Could you recommend me sth. to fix the problem? (make and sudo make install isn't working without fixing, I tried)

segmentation fault in php-fpm

Issue:
When i add the extension into the php.ini, php-fpm is not starting anymore returning segmentation fault.

Background:
After seting the env variable for the pkg config (necessary for me to compile dlib, see https://discuss.getsol.us/d/5423-compiled-library-not-found/2) and installing lang/gcc before running ./configure (otherwise i got a library lstdc++ not found during make) i finally got it compiled.
But if i add it to the php.ini the php-fpm service fails with segmentation fault.

System:
Nextcloud plugin (12.1-RELEASE-p10) running on trueNas (TrueNAS-12.0-RELEASE) as jail (container).
php version: 7.4.12

Can't compile pdlib

Hello,

I'm running debian bullseye. Following the instructions in the wiki, I was able to compile dlib, but pdlib won't compile. I'm trying to compile with g++ version 10.2.1.1 . When I first ran make I got the following message:

"Dlib requires C++14 support. Give your compiler the -std=c++14 option to enable it."

I added the option to configure thusly: ./configure --enable-debug CFLAGS=-std=c++14

the present error I'm getting follows:

make

/bin/bash /usr/local/src/pdlib/libtool --mode=compile g++ -I. -I/usr/local/src/pdlib -I/usr/local/src/pdlib/include -I/usr/local/src/pdlib/main -I/usr/local/src/pdlib -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -std=c++14 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++11 -DZEND_COMPILE_DL_EXT=1 -c /usr/local/src/pdlib/pdlib.cc -o pdlib.lo -MMD -MF pdlib.dep -MT pdlib.lo
libtool: compile: g++ -I. -I/usr/local/src/pdlib -I/usr/local/src/pdlib/include -I/usr/local/src/pdlib/main -I/usr/local/src/pdlib -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -std=c++14 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++11 -DZEND_COMPILE_DL_EXT=1 -c /usr/local/src/pdlib/pdlib.cc -MMD -MF pdlib.dep -MT pdlib.lo -fPIC -DPIC -o .libs/pdlib.o
In file included 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 /usr/local/src/pdlib/src/face_recognition.h:8,
from /usr/local/src/pdlib/pdlib.cc:33:
/usr/local/include/dlib/algs.h:17:10: error: #error "Dlib requires C++14 support. Give your compiler the -std=c++14 option to enable it."
17 | #error "Dlib requires C++14 support. Give your compiler the -std=c++14 option to enable it."
| ^~~~~
^Cmake: *** [Makefile:208: pdlib.lo] Error 1

I think I just need to add that compiler flag correctly. Can anyone help? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.