opencv: meson build fails on macOS
I got the following error when building on mac using gst-build.
Add the c++11 flag to meson.build
.
Environment
- macOS Catalina 10.15.7
- apple clang version 12.0.0 (clang-1200.0.32.29)
- gst-build v1.19.1
- opencv 4.5.0_5 (installed from brew)
Error Log
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:194:59: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
_InputArray(const std::vector<std::vector<bool> >&) = delete; // not supported
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:319:44: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
_OutputArray(std::vector<bool>& vec) = delete; // not supported
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:321:54: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
_OutputArray(std::vector<std::vector<bool> >&) = delete; // not supported
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:393:49: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
_InputOutputArray(std::vector<bool>& vec) = delete; // not supported
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:1011:29: error: no template named 'initializer_list' in namespace 'std'
explicit Mat(const std::initializer_list<_Tp> list);
~~~~~^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:1010:37: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
template<typename _Tp, typename = typename std::enable_if<std::is_arithmetic<_Tp>::value>::type>
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:1015:52: error: no template named 'initializer_list' in namespace 'std'
template<typename _Tp> explicit Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list);
~~~~~^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:1015:92: error: no template named 'initializer_list' in namespace 'std'
template<typename _Tp> explicit Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list);
~~~~~^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2071:12: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
Mat(Mat&& m);
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2072:25: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
Mat& operator = (Mat&& m);
^
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2226:15: error: no template named 'initializer_list' in namespace 'std'
Mat_(std::initializer_list<_Tp> values);
~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
35 warnings and 20 errors generated.
[598/3881] Compiling C object subprojects/gst-plugins-bad/gst-libs/gst/play/libgstplay-1.0.0.dylib.p/gstplay.c.o
ninja: build stopped: subcommand failed.