Kagami/go-face

Installing error

Closed this issue · 8 comments

Hi,

I dont have much experience in golang so maybe it could be a strange question. I am getting following error when I try to install package using
go get github/.com/Kagami/go-face
command.

 github.com/Kagami/go-face
../../Kagami/go-face/facerec.cc:105:7: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
  std::shared_mutex samples_mutex_;
       ^
../../Kagami/go-face/facerec.cc: In member function ‘void FaceRec::SetSamples(std::vector<dlib::matrix<float, 0l, 1l> >&&, std::unordered_map<int, int>&&)’:
../../Kagami/go-face/facerec.cc:91:20: error: ‘shared_mutex’ is not a member of ‘std’
   std::unique_lock<std::shared_mutex> lock(samples_mutex_);
                    ^
../../Kagami/go-face/facerec.cc:91:20: error: ‘shared_mutex’ is not a member of ‘std’
../../Kagami/go-face/facerec.cc:91:37: error: template argument 1 is invalid
   std::unique_lock<std::shared_mutex> lock(samples_mutex_);
                                     ^
../../Kagami/go-face/facerec.cc:91:44: error: ‘samples_mutex_’ was not declared in this scope
   std::unique_lock<std::shared_mutex> lock(samples_mutex_);
                                            ^
../../Kagami/go-face/facerec.cc:91:39: warning: unused variable ‘lock’ [-Wunused-variable]
   std::unique_lock<std::shared_mutex> lock(samples_mutex_);
                                       ^
../../Kagami/go-face/facerec.cc: In member function ‘int FaceRec::Classify(const descriptor&)’:
../../Kagami/go-face/facerec.cc:97:20: error: ‘shared_mutex’ is not a member of ‘std’
   std::shared_lock<std::shared_mutex> lock(samples_mutex_);
                    ^
../../Kagami/go-face/facerec.cc:97:20: error: ‘shared_mutex’ is not a member of ‘std’
../../Kagami/go-face/facerec.cc:97:37: error: template argument 1 is invalid
   std::shared_lock<std::shared_mutex> lock(samples_mutex_);
                                     ^
../../Kagami/go-face/facerec.cc:97:44: error: ‘samples_mutex_’ was not declared in this scope
   std::shared_lock<std::shared_mutex> lock(samples_mutex_);
                                            ^
../../Kagami/go-face/facerec.cc:97:39: warning: unused variable ‘lock’ [-Wunused-variable]
   std::shared_lock<std::shared_mutex> lock(samples_mutex_);
                                       ^

Any idea?

What version of compiler do you use? For GCC it should be 7+

Hi,

I have similar problem.
go get github.com/Kagami/go-face
command.

# github.com/Kagami/go-face
In file included from /usr/include/dlib/matrix.h:6:0,
                 from /usr/include/dlib/graph_utils/function_objects.h:7,
                 from /usr/include/dlib/graph_utils.h:8,
                 from classify.cc:1:
/usr/include/dlib/matrix/matrix.h:1608:38: error: ISO C++1z does not allow dynamic exception specifications
             ~literal_assign_helper() throw (std::exception)

gcc --version
command

gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
Copyright (C) 2017 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.

Hm, maybe it's actually 7.3+. It builds on travis with gcc 7.3.0 without issues.

After gcc 7.3 have install, i get this error now :

go get github.com/Kagami/go-face
command.

# github.com/Kagami/go-face
In file included from /usr/include/dlib/matrix/matrix_conv.h:8:0,
                 from /usr/include/dlib/matrix.h:13,
                 from /usr/include/dlib/graph_utils/function_objects.h:7,
                 from /usr/include/dlib/graph_utils.h:8,
                 from classify.cc:1:
/usr/include/dlib/matrix/matrix_fft.h:12:10: fatal error: mkl_dfti.h: No such file or directory
 #include <mkl_dfti.h>
          ^~~~~~~~~~~~
compilation terminated.

How did you install dlib package? From the PPA?

From the PPA yes

Hi again, sorry for late response. I use virtualbox for my development environment and some packages on this box can be too old. I checked gcc version as you mentioned and it was 5.4.0. I've upgraded to 7.3.0 and the error message gone away.

Thanks.

Thanks.

@pacpacpacpacpacpac could you please create separate issue for that? I don't think it's related.