goodspb / pdlib

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

Can't compile pdlib #52

Closed edgeofthex closed 1 year ago

edgeofthex commented 2 years ago

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!

zpratikpathak commented 2 years ago

Same Issue

edgeofthex commented 2 years ago

See solution in issue #50

goodspb commented 1 year ago

https://github.com/goodspb/pdlib/releases/tag/v1.1.0