Bug 404853

Summary: digikam-6.0.0 faces engine fails to compile on PowerPC
Product: [Applications] digikam Reporter: Rex Dieter <rdieter>
Component: Portability-RuntimeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: awilfox, caulier.gilles, metzpinguin
Priority: NOR    
Version: 6.0.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:

Description Rex Dieter 2019-02-26 18:35:46 UTC
On fedora 30 using gcc9,

../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_face.h:175:88:   required from here
../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:1088:22: error: conversion from 'const double' to 'const simd4f' is ambiguous
 1088 |         const simd4f _tb_frac = tb_frac;
      |                      ^~~~~~~~
In file included from ../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:46,
                 from ../core/libs/facesengine/facedb/facedb.cpp:44:
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:128:16: note: candidate: 'simd4f::simd4f(float)'
  128 |         inline simd4f(float f) : x{f,f,f,f} { }
      |                ^~~~~~
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:121:16: note: candidate: 'simd4f::simd4f(int)'
  121 |         inline simd4f(const vector float& v) : x{v} { }
      |                ^~~~~~
In file included from ../core/libs/facesengine/facedb/facedb.cpp:44:
../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:1089:22: error: conversion from 'double' to 'const simd4f' is ambiguous
 1089 |         const simd4f _inv_tb_frac = 1-tb_frac;
      |                      ^~~~~~~~~~~~
In file included from ../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:46,
                 from ../core/libs/facesengine/facedb/facedb.cpp:44:
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:128:16: note: candidate: 'simd4f::simd4f(float)'
  128 |         inline simd4f(float f) : x{f,f,f,f} { }
      |                ^~~~~~
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:121:16: note: candidate: 'simd4f::simd4f(int)'
  121 |         inline simd4f(const vector float& v) : x{v} { }
      |                ^~~~~~
In file included from ../core/libs/facesengine/facedb/facedb.cpp:44:
../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:1090:22: error: conversion from 'double' to 'const simd4f' is ambiguous
 1090 |         const simd4f _x_scale = 4*x_scale;
      |                      ^~~~~~~~
In file included from ../core/libs/facesengine/recognition/dlib-dnn/dnnface/image_transforms/interpolation.h:46,
                 from ../core/libs/facesengine/facedb/facedb.cpp:44:
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:128:16: note: candidate: 'simd4f::simd4f(float)'
  128 |         inline simd4f(float f) : x{f,f,f,f} { }
      |                ^~~~~~
../core/libs/facesengine/recognition/dlib-dnn/dnnface/dnn_base/simd4f.h:121:16: note: candidate: 'simd4f::simd4f(int)'
  121 |         inline simd4f(const vector float& v) : x{v} { }
      |                ^~~~~~


Full logs,
https://koji.fedoraproject.org/koji/taskinfo?taskID=33066535

(interesting piece is build.log link)
Comment 1 Maik Qualmann 2019-03-19 07:40:29 UTC
*** Bug 405625 has been marked as a duplicate of this bug. ***
Comment 2 caulier.gilles 2019-03-19 08:12:27 UTC
Maik,

Typically, the current DNN code will be dropped in the future in favor to OpenCV DNN. No need to spare time on this topic...

Gilles
Comment 3 A. Wilcox (awilfox) 2019-03-20 22:12:18 UTC
So, does that mean we should turn off faces engine for our package builds until the OpenCV code comes?
Comment 4 caulier.gilles 2019-03-21 10:12:18 UTC
There is no option in digiKam cmake scripts to disable whole face engine.

The alternative is to add a cmake option to disable the DNN part which stll experimental.

Note : we will have a student planed while this summer to port the DLib DNN to OpenCV DNN. So typically this code will disappear, but later this summer.

Gilles Caulier
Comment 5 caulier.gilles 2019-03-21 16:30:58 UTC
Git commit 6a3da298103797d01fa0cb049cccaff39bd1583e by Gilles Caulier.
Committed on 21/03/2019 at 16:29.
Pushed by cgilles into branch 'master'.

add new optional configuration option to enable Faces Engine DNN support
Related: bug 405625

M  +2    -0    Mainpage.dox
M  +4    -1    NEWS
M  +1    -0    bootstrap.linux
M  +1    -0    bootstrap.macports
M  +1    -0    bootstrap.mxe
M  +1    -0    bootstrap.tarball
M  +8    -5    core/CMakeLists.txt
M  +6    -3    core/app/utils/digikam_config.h.cmake.in
M  +20   -11   core/libs/facesengine/CMakeLists.txt
M  +34   -22   core/libs/facesengine/facedb/facedb.cpp
M  +6    -0    core/libs/facesengine/facedb/facedb.h
M  +55   -8    core/libs/facesengine/recognitiondatabase.cpp
M  +1    -1    core/libs/facesengine/recognitiondatabase.h
M  +3    -0    core/utilities/facemanagement/facescandialog.cpp

https://commits.kde.org/digikam/6a3da298103797d01fa0cb049cccaff39bd1583e
Comment 6 caulier.gilles 2019-12-23 09:17:12 UTC
With 7.0.0, Dlib code have been dropped from digiKam face engine in favor of OpenCV Neural Network API.

Gilles Caulier