Facerecognition in Nextcloud - need help

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
Hi guys,

is anybody of you using facerecognition ?
I'm not sure how to get pdlib in the Jail. Actually i'm unable to set a modell via OCC.
I think this is the last step to get it working....

Can anybody help?

1705655649514.png
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
pkg install git ...
 

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
pkg install git ...
thanks a lot so far.
i have also installed "cmake", build dlib an now i stuck at this....

./configure --enable-debug

and i didn't have any idea how to do.

1705670406177.png


1705670236212.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You are missing autoconf, so phpize fails, so no configure.sh is created ...

pkg install autoconf
 

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
You are missing autoconf, so phpize fails, so no configure.sh is created ...

pkg install autoconf
you are such a "pro". I should have meet you earlier in life.
I hope you are not scared about my english, i do my best.

next problem came up at "make" ...

1705671318164.png


root@Cloud:/pdlib # make /bin/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/pdlib.cc -o pdlib.lo -MMD -MF pdlib.dep -MT pdlib.lo mkdir .libs c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/pdlib.cc -MMD -MF pdlib.dep -MT pdlib.lo -fPIC -DPIC -o .libs/pdlib.o /pdlib/pdlib.cc:139:61: warning: offset of on non-standard-layout type 'face_recognition' (aka '_face_recognition') [-Winvalid-offsetof] face_recognition *fr = (face_recognition*)((char*)object - XtOffsetOf(face_recognition, std)); ^ ~~~ /usr/local/include/php/Zend/zend_portability.h:345:36: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) offsetof(s_type, field) ^ ~~~~~ /usr/include/stddef.h:75:31: note: expanded from macro 'offsetof' #define offsetof(type, field) __offsetof(type, field) ^ ~~~~~ /usr/include/sys/cdefs.h:468:34: note: expanded from macro '__offsetof' #define __offsetof(type, field) __builtin_offsetof(type, field) ^ ~~~~~ /pdlib/pdlib.cc:173:41: warning: offset of on non-standard-layout type 'face_recognition' (aka '_face_recognition') [-Winvalid-offsetof] face_recognition_obj_handlers.offset = XtOffsetOf(face_recognition, std); ^ ~~~ /usr/local/include/php/Zend/zend_portability.h:345:36: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) offsetof(s_type, field) ^ ~~~~~ /usr/include/stddef.h:75:31: note: expanded from macro 'offsetof' #define offsetof(type, field) __offsetof(type, field) ^ ~~~~~ /usr/include/sys/cdefs.h:468:34: note: expanded from macro '__offsetof' #define __offsetof(type, field) __builtin_offsetof(type, field) ^ ~~~~~ 2 warnings generated. /bin/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/chinese_whispers.cc -o src/chinese_whispers.lo -MMD -MF src/chinese_whispers.dep -MT src/chinese_whispers.lo mkdir src/.libs c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/face_detection.cc -o src/face_detection.lo -MMD -MF src/face_detection.dep -MT src/face_detection.lo c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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 c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/face_recognition.cc -o src/face_recognition.lo -MMD -MF src/face_recognition.dep -MT src/face_recognition.lo c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/face_recognition.cc -MMD -MF src/face_recognition.dep -MT src/face_recognition.lo -fPIC -DPIC -o src/.libs/face_recognition.o /pdlib/src/face_recognition.cc:12:47: warning: offset of on non-standard-layout type 'face_recognition' (aka '_face_recognition') [-Winvalid-offsetof] return (face_recognition*)((char*)(obj) - XtOffsetOf(face_recognition, std)); ^ ~~~ /usr/local/include/php/Zend/zend_portability.h:345:36: note: expanded from macro 'XtOffsetOf' # define XtOffsetOf(s_type, field) offsetof(s_type, field) ^ ~~~~~ /usr/include/stddef.h:75:31: note: expanded from macro 'offsetof' #define offsetof(type, field) __offsetof(type, field) ^ ~~~~~ /usr/include/sys/cdefs.h:468:34: note: expanded from macro '__offsetof' #define __offsetof(type, field) __builtin_offsetof(type, field) ^ ~~~~~ 1 warning generated. /bin/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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 c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /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/sh /pdlib/libtool --mode=compile c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/vector.cc -o src/vector.lo -MMD -MF src/vector.dep -MT src/vector.lo c++ -I. -I/pdlib -I/pdlib/include -I/pdlib/main -I/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 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++14 -DZEND_COMPILE_DL_EXT=1 -c /pdlib/src/vector.cc -MMD -MF src/vector.dep -MT src/vector.lo -fPIC -DPIC -o src/.libs/vector.o /bin/sh /pdlib/libtool --mode=link c++ -shared -I/pdlib/include -I/pdlib/main -I/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 /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 -lpthread 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 -lpthread -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 /pdlib
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If I am not mistaken, the library is named libc++ on FreeBSD, not libstdc++. So you would need to replace -lstdc++ with -lc++. But I'm guessing.
 

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
which file is affected?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Makefile? Or pass some parameter to configure.sh ... honestly don't know. And I don't have the time to perform an entire installation myself, sorry.
 

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
Last edited:

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
ok, now i can execute "make". It compiles, but 'make test' throw an Error 139. 'make install' finish with dialog 'Installing shared extensions: /usr/local/lib/php/20210902/'

I did the change in the Makefile with your hint. It's exactly what you said.
replace
-lstdc++ with -lc++

if i than do the
su -m www -c 'php /usr/local/www/nextcloud/occ face:setup -m 4'
the Exception message is the same then before....
You do not meet the dependencies to install the model 4 (DlibCnnHog5)
Summary: This Model depend on Model 1 and must install it.
Please read the documentation for this model to continue: https://github.com/matiasdelellis/facerecognition/wiki/Models#model-4
Segmentation fault
 

mastersteve1

Dabbler
Joined
Oct 9, 2017
Messages
21
good evening,

after rebuilding the Libary's i got it work to install the Models.
Now i stuck with initial Scan. I get this, when i start 'occ face:background_job'

Code:
PHP Warning:  Module "pdlib" is already loaded in Unknown on line 0
1/8 - Executing task CheckRequirementsTask (Check all requirements)
    Your system does not meet the minimum of memory requirements.
Face recognition application requires at least 1 GB of system memory.
See https://github.com/matiasdelellis/facerecognition/wiki/Performance-analysis-of-DLib%E2%80%99s-CNN-face-detection for more details

Fill an issue here if that doesn't help: https://github.com/matiasdelellis/facerecognition/issues
Task CheckRequirementsTask signalled we should not continue, bailing out
Segmentation fault


1706912820723.png
 
Top