dlib_for_arm
dlib_for_arm copied to clipboard
error: use of undeclared identifier 'LOGD'
object_detector.h line 445
@truedat101 I was hitting this error, too. It appears it's because this was originally develop on Android. I was able to successfully compile by commenting any instances of LOGD
.
@mflor35 I'll post something later which lets us redefine LOGD and LOGE if not defined ANDROID . Essentially you just want to do either a noop or define it as a logging to stdout or stderr respectively.
Folks, In my 3rd time to compile this version of dlib, (i was having LOGD problems in 2 times before) i got the error below. There's something about LOGD or someone got the same error?
#EDIT I run the code like:
cd dlib/python_examples/build/
cmake --mfpu=neon ../../tools/python
cmake --build . --config Release
#/EDIT
[ 98%] Building CXX object CMakeFiles/dlib_.dir/src/gui.cpp.o
[100%] Linking CXX shared library dlib.so
CMakeFiles/dlib_.dir/src/sequence_segmenter.cpp.o: In function `dlib::currentTimeInMilliseconds()':
sequence_segmenter.cpp:(.text+0x8e8): multiple definition of `dlib::currentTimeInMilliseconds()'
CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here
CMakeFiles/dlib_.dir/src/object_detection.cpp.o: In function `dlib::currentTimeInMilliseconds()':
object_detection.cpp:(.text+0xba8): multiple definition of `dlib::currentTimeInMilliseconds()'
CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here
CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o: In function `dlib::currentTimeInMilliseconds()':
shape_predictor.cpp:(.text+0x6f4): multiple definition of `dlib::currentTimeInMilliseconds()'
CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here
CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here
CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here
CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o: In function `dlib::currentTimeInMilliseconds()':
correlation_tracker.cpp:(.text+0x764): multiple definition of `dlib::currentTimeInMilliseconds()'
CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here
CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here
CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here
CMakeFiles/dlib_.dir/src/gui.cpp.o: In function `dlib::currentTimeInMilliseconds()':
gui.cpp:(.text+0xc0): multiple definition of `dlib::currentTimeInMilliseconds()'
CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here
CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here
CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time'
CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here
collect2: error: ld returned 1 exit status
CMakeFiles/dlib_.dir/build.make:521: recipe for target 'dlib.so' failed
make[2]: *** [dlib.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dlib_.dir/all' failed
make[1]: *** [CMakeFiles/dlib_.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
hi, @mflor35 @truedat101 you guys check the performance? Is it better?
@BarbaL simply commetn all the lines where LOGD used and build
@sergeychilingaryan I did it. I'll double check anyway.
@gicheonkang for our specific application it did improve performance by 1 - 2 FPS. The most noticeable difference was multithreading when detecting the face.
@BarbaL I attempted to build the C++ Samples with this version but I also ran into similar issues. I ended up giving up and simply compile the library without any of them.
Folks, my take is that this project should be done in such a way that all it (1) Forks directly from the original source on github (2) doesn't include android specific APIs like LOGD/LOGE that break on non-android platforms (3) makes good use of preprocessor directives to ensure optimizations for ARM or even Android are done only for those platforms and the code remains as a whole portable. The fact that @mflor35 got some better results on ARM is encouraging (we've tested this now on 2 different platforms on arm/linux) and we should think about pushing these changes back upstream. I'm considering setting up a fork of the original upstream source which takes in the tuning from this repository, and then send a pull request back to the authors of dlib (proper credit given to fastfastball for efforts on the original work).
I am also seeing the same error message with @BarbaL when compiling on RPi 3. I commented some LOGD calls already.
@fastfastball any update?
Where can I find currentTimeInMilliseconds()
and total_fe_time
and total_pyr_time
?
Folks, In my 3rd time to compile this version of dlib, (i was having LOGD problems in 2 times before) i got the error below. There's something about LOGD or someone got the same error?
#EDIT I run the code like:
cd dlib/python_examples/build/ cmake --mfpu=neon ../../tools/python cmake --build . --config Release
#/EDIT
[ 98%] Building CXX object CMakeFiles/dlib_.dir/src/gui.cpp.o [100%] Linking CXX shared library dlib.so CMakeFiles/dlib_.dir/src/sequence_segmenter.cpp.o: In function `dlib::currentTimeInMilliseconds()': sequence_segmenter.cpp:(.text+0x8e8): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/object_detection.cpp.o: In function `dlib::currentTimeInMilliseconds()': object_detection.cpp:(.text+0xba8): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o: In function `dlib::currentTimeInMilliseconds()': shape_predictor.cpp:(.text+0x6f4): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o: In function `dlib::currentTimeInMilliseconds()': correlation_tracker.cpp:(.text+0x764): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o: In function `dlib::currentTimeInMilliseconds()': gui.cpp:(.text+0xc0): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here collect2: error: ld returned 1 exit status CMakeFiles/dlib_.dir/build.make:521: recipe for target 'dlib.so' failed make[2]: *** [dlib.so] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dlib_.dir/all' failed make[1]: *** [CMakeFiles/dlib_.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
@EsterfanoLopes hi~ I got same error,how to deal it?
Folks, In my 3rd time to compile this version of dlib, (i was having LOGD problems in 2 times before) i got the error below. There's something about LOGD or someone got the same error? #EDIT I run the code like:
cd dlib/python_examples/build/ cmake --mfpu=neon ../../tools/python cmake --build . --config Release
#/EDIT
[ 98%] Building CXX object CMakeFiles/dlib_.dir/src/gui.cpp.o [100%] Linking CXX shared library dlib.so CMakeFiles/dlib_.dir/src/sequence_segmenter.cpp.o: In function `dlib::currentTimeInMilliseconds()': sequence_segmenter.cpp:(.text+0x8e8): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/object_detection.cpp.o: In function `dlib::currentTimeInMilliseconds()': object_detection.cpp:(.text+0xba8): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o: In function `dlib::currentTimeInMilliseconds()': shape_predictor.cpp:(.text+0x6f4): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o: In function `dlib::currentTimeInMilliseconds()': correlation_tracker.cpp:(.text+0x764): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o: In function `dlib::currentTimeInMilliseconds()': gui.cpp:(.text+0xc0): multiple definition of `dlib::currentTimeInMilliseconds()' CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o:svm_c_trainer.cpp:(.text+0x454): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x10): multiple definition of `dlib::impl::total_fe_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x10): first defined here CMakeFiles/dlib_.dir/src/gui.cpp.o:(.bss+0x18): multiple definition of `dlib::impl::total_pyr_time' CMakeFiles/dlib_.dir/src/object_detection.cpp.o:(.bss+0x18): first defined here collect2: error: ld returned 1 exit status CMakeFiles/dlib_.dir/build.make:521: recipe for target 'dlib.so' failed make[2]: *** [dlib.so] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dlib_.dir/all' failed make[1]: *** [CMakeFiles/dlib_.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
@EsterfanoLopes hi~ I got same error,how to deal it?
It was a long time ago, i can't remember. I'm sorry.