简体   繁体   中英

Error in ceres when trying to install opencv-python on Mac m1

I am trying to install opencv-python on the Mac m1.

I have followed the instructions here:

https://sayak.dev/install-opencv-m1/

However I am getting an error in a c++ library when running the make -j8 command:

/opt/homebrew/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?

What do I need to do to fix this error?

In one of the files which is showing an error it looks like this:

// Checks, whether the given parameter block sizes are valid. Valid means every
// dimension is bigger than zero.
constexpr bool IsValidParameterDimensionSequence(std::integer_sequence<int>) {
  return true;
}

It seems like valid C++ but not really sure why its breaking

I think the error was in the CMakeLists.txt in the opencv repo.

I had to edit this file and set(CMAKE_CXX_STANDARD 14) to get it to work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM