SITL build errors on master with macOS Mojave and Gazebo8

#1

Currently on Gazebo 8.6 and Mojave 10.14.2

Seems some of the errors are related to optical flow. Is there a way to build for SITL without optical flow?

I get the following:

➜  Firmware git:(master) make posix gazebo_solo
ninja: Entering directory `/Users/dlw/Workspace/PX4/Firmware/build/px4_sitl_default'
[3/7] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   chrono
--   date_time
--   atomic
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   thread
--   signals
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Boost version: 1.68.0
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgrePaging.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgrePaging.dylib
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreTerrain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreTerrain.dylib
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreProperty.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreProperty.dylib
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreRTShaderSystem.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreRTShaderSystem.dylib
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreVolume.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreVolume.dylib
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreOverlay.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/lib/libOgreOverlay.dylib
-- Looking for ignition-msgs - found
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
Gazebo version: 8.6
-- Using C++17 compiler
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dlw/Workspace/PX4/Firmware/build/px4_sitl_default/build_gazebo
[4/7] Performing build step for 'sitl_gazebo'
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build
cd /Users/dlw/Workspace/PX4/Firmware/build/px4_sitl_default/build_gazebo && /usr/local/Cellar/cmake/3.13.3/bin/cmake --build . && /usr/local/Cellar/cmake/3.13.3/bin/cmake -E touch /Users/dlw/Workspace/PX4/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/53] Building CXX object CMakeFiles/mav_msgs.dir/CommandMotorSpeed.pb.cc.o
[2/53] Building CXX object CMakeFiles/sensor_msgs.dir/Groundtruth.pb.cc.o
[3/53] Building CXX object CMakeFiles/sensor_msgs.dir/Float.pb.cc.o
[4/53] Building CXX object CMakeFiles/sensor_msgs.dir/SITLGps.pb.cc.o
[5/53] Building CXX object CMakeFiles/sensor_msgs.dir/Range.pb.cc.o
[6/53] Building CXX object CMakeFiles/gazebo_lidar_plugin.dir/src/gazebo_lidar_plugin.cpp.o
[7/53] Building CXX object CMakeFiles/gazebo_gimbal_controller_plugin.dir/src/gazebo_gimbal_controller_plugin.cpp.o
[8/53] Building CXX object CMakeFiles/gazebo_sonar_plugin.dir/src/gazebo_sonar_plugin.cpp.o
[9/53] Building CXX object CMakeFiles/gazebo_multirotor_base_plugin.dir/src/gazebo_multirotor_base_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_multirotor_base_plugin.cpp:21:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_multirotor_base_plugin.h:29:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
1 warning generated.
[10/53] Building CXX object CMakeFiles/gazebo_vision_plugin.dir/src/gazebo_vision_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_vision_plugin.cpp:41:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_vision_plugin.h:46:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
1 warning generated.
[11/53] Building CXX object CMakeFiles/gazebo_uuv_plugin.dir/src/gazebo_uuv_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_uuv_plugin.cpp:25:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_uuv_plugin.h:23:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
1 warning generated.
[12/53] Building CXX object CMakeFiles/mav_msgs.dir/MotorSpeed.pb.cc.o
[13/53] Building CXX object CMakeFiles/gazebo_motor_model.dir/src/gazebo_motor_model.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_motor_model.cpp:22:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_motor_model.h:38:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
1 warning generated.
[14/53] Linking CXX shared library libmav_msgs.dylib
[15/53] Building CXX object CMakeFiles/gazebo_irlock_plugin.dir/src/gazebo_irlock_plugin.cpp.o
[16/53] Building CXX object CMakeFiles/sensor_msgs.dir/OpticalFlow.pb.cc.o
[17/53] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[18/53] Building CXX object CMakeFiles/sensor_msgs.dir/IRLock.pb.cc.o
[19/53] Linking CXX shared library libsensor_msgs.dylib
[20/53] Building CXX object CMakeFiles/std_msgs.dir/Int32.pb.cc.o
[21/53] Linking CXX shared library libstd_msgs.dylib
[22/53] Building CXX object CMakeFiles/gazebo_mavlink_interface.dir/src/gazebo_mavlink_interface.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:22:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_mavlink_interface.h:57:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:22:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_mavlink_interface.h:68:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/mavlink.h:32:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/common.h:30:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/../protocol.h:75:
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/../mavlink_helpers.h:247:25: warning: taking address of packed member 'checksum' of class or structure '__mavlink_message' may result in an unaligned pointer value [-Waddress-of-packed-member]
        crc_accumulate_buffer(&msg->checksum, _MAV_PAYLOAD(msg), msg->len);
                               ^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/../mavlink_helpers.h:248:29: warning: taking address of packed member 'checksum' of class or structure '__mavlink_message' may result in an unaligned pointer value [-Waddress-of-packed-member]
        crc_accumulate(crc_extra, &msg->checksum);
                                   ^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/../mavlink_helpers.h:471:12: warning: taking address of packed member 'checksum' of class or structure '__mavlink_message' may result in an unaligned pointer value [-Waddress-of-packed-member]
        crc_init(&msg->checksum);
                  ^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/../mavlink_helpers.h:476:21: warning: taking address of packed member 'checksum' of class or structure '__mavlink_message' may result in an unaligned pointer value [-Waddress-of-packed-member]
        crc_accumulate(c, &msg->checksum);
                           ^~~~~~~~~~~~~
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:22:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_mavlink_interface.h:57:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_mavlink_interface.cpp:350:3: note: in instantiation of function template specialization 'gazebo::model_param<int>' requested here
  model_param(worldName, model_->GetName(), "mavlink_udp_port", mavlink_udp_port_);
  ^
6 warnings generated.
[23/53] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[24/53] Linking CXX shared library libnav_msgs.dylib
[25/53] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o
[26/53] Linking CXX shared library libphysics_msgs.dylib
[27/53] Linking CXX shared library libgazebo_multirotor_base_plugin.dylib
[28/53] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
FAILED: OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++  -DLIBBULLET_VERSION=2.88 -DLIBBULLET_VERSION_GT_282 -DOpticalFlow_EXPORTS -I/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/OpticalFlow_INCLUDE_DIRS -I/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -I/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/include -isystem /usr/local/Cellar/gazebo8/8.6.0_5/include -isystem /usr/local/Cellar/gazebo8/8.6.0_5/include/gazebo-8 -isystem /usr/local/Cellar/bullet/2.88/include/bullet -isystem /usr/local/Cellar/bullet/2.88/include -isystem /usr/local/include/simbody -isystem /usr/local/include -isystem /usr/local/Cellar/sdformat5/5.3.0_4/include/sdformat-5.3 -isystem /usr/local/include/ignition/math3 -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE/Terrain -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE/Paging -isystem /usr/local/Cellar/ignition-transport3/3.1.0_2/include/ignition/transport3 -isystem /usr/local/Cellar/zeromq/4.3.1_1/include -isystem /usr/local/Cellar/ossp-uuid/1.6.2_2/include/ossp -isystem /usr/local/include/ignition/msgs0 -isystem /usr/local/include/opencv4 -fpic -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -fPIC -MD -MT OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o -MF OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o.d -o OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o -c /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/src/flow_opencv.cpp
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/src/flow_opencv.cpp:41:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include/flow_opencv.hpp:44:
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:52:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:52:
/usr/local/include/opencv4/opencv2/core/cvdef.h:656:4: error: "OpenCV 4.x+ requires enabled C++11 support"
#  error "OpenCV 4.x+ requires enabled C++11 support"
   ^
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/src/flow_opencv.cpp:41:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include/flow_opencv.hpp:44:
In file included from /usr/local/include/opencv4/opencv2/opencv.hpp:52:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:57:
/usr/local/include/opencv4/opencv2/core/matx.hpp:143:15: error: no template named 'initializer_list' in namespace 'std'
    Matx(std::initializer_list<_Tp>); //!< initialize from an initializer list                                               ~~~~~^
/usr/local/include/opencv4/opencv2/core/mat.hpp:2222: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=]
20 errors generated.
[29/53] Building CXX object OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o
FAILED: OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++  -DLIBBULLET_VERSION=2.88 -DLIBBULLET_VERSION_GT_282 -I/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/include -isystem /usr/local/Cellar/gazebo8/8.6.0_5/include -isystem /usr/local/Cellar/gazebo8/8.6.0_5/include/gazebo-8 -isystem /usr/local/Cellar/bullet/2.88/include/bullet -isystem /usr/local/Cellar/bullet/2.88/include -isystem /usr/local/include/simbody -isystem /usr/local/include -isystem /usr/local/Cellar/sdformat5/5.3.0_4/include/sdformat-5.3 -isystem /usr/local/include/ignition/math3 -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE/Terrain -isystem /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_7/include/OGRE/Paging -isystem /usr/local/Cellar/ignition-transport3/3.1.0_2/include/ignition/transport3 -isystem /usr/local/Cellar/zeromq/4.3.1_1/include -isystem /usr/local/Cellar/ossp-uuid/1.6.2_2/include/ossp -isystem /usr/local/include/ignition/msgs0 -isystem /usr/local/include/opencv4 -fpic -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -MD -MT OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o -MF OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o.d -o OpticalFlow/klt_feature_tracker/CMakeFiles/klt_feature_tracker.dir/src/trackFeatures.cpp.o -c /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/src/trackFeatures.cpp
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/src/trackFeatures.cpp:40:
In file included from /usr/local/include/opencv4/opencv2/core/core.hpp:48:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:52:
/usr/local/include/opencv4/opencv2/core/cvdef.h:656:4: error: "OpenCV 4.x+ requires enabled C++11 support"
#  error "OpenCV 4.x+ requires enabled C++11 support"
   ^
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/src/trackFeatures.cpp:40:
In file included from /usr/local/include/opencv4/opencv2/core/core.hpp:48:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:57:
/usr/local/include/opencv4/opencv2/core/matx.hpp:143:15: error: no template named 'initializer_list' in namespace 'std'
    Matx(std::initializer_list<_Tp>); //!< initialize from an initializer list
         ~~~~~^
/usr/local/include/opencv4/opencv2/core/matx.hpp:361:14: error: no template named 'initializer_list' in namespace 'std'
    Vec(std::initializer_list<_Tp>);
        ~~~~~^

In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/src/trackFeatures.cpp:40:
In file included from /usr/local/include/opencv4/opencv2/core/core.hpp:48:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:58:
/usr/local/include/opencv4/opencv2/core/types.hpp:2418:24: error: no matching constructor for initialization of 'Matx<double, 4, 1>'
    Matx<double, 4, 1> c(a, b, Matx_MatMulOp());
                       ^ ~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/opencv4/opencv2/core/matx.hpp:203:28: note: candidate constructor not viable: no known conversion from 'const Matx<[2 * ...], 4>' to 'const Matx<[2 * ...], 1 aka 1>' for 1st argument
    template<typename _T2> Matx(const Matx<_Tp, m, n>& a, _T2 alpha, Matx_ScaleOp);
                           ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:122:5: note: candidate constructor not viable: no known conversion from 'const Matx<double, 4, 4>' to 'double' for 1st argument
    Matx(_Tp v0, _Tp v1, _Tp v2); //!< 1x3 or 3x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:201:5: note: candidate constructor not viable: no known conversion from 'const Matx<[2 * ...], 4>' to 'const Matx<[2 * ...], 1 aka 1>' for 1st argument
    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_AddOp);
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:202:5: note: candidate constructor not viable: no known conversion from 'const Matx<[2 * ...], 4>' to 'const Matx<[2 * ...], 1 aka 1>' for 1st argument
    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_SubOp);
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:204:5: note: candidate constructor not viable: no known conversion from 'const Matx<[2 * ...], 4>' to 'const Matx<[2 * ...], 1 aka 1>' for 1st argument
    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_MulOp);
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:205:5: note: candidate constructor not viable: no known conversion from 'const Matx<[2 * ...], 4>' to 'const Matx<[2 * ...], 1 aka 1>' for 1st argument
    Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_DivOp);
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:206:21: note: candidate template ignored: could not match 'Matx' against 'Scalar_'
    template<int l> Matx(const Matx<_Tp, m, l>& a, const Matx<_Tp, l, n>& b, Matx_MatMulOp);
                    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:121:5: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1); //!< 1x2 or 2x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:207:5: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
    Matx(const Matx<_Tp, n, m>& a, Matx_TOp);
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:123:5: note: candidate constructor not viable: requires 4 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3); //!< 1x4, 2x2 or 4x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:120:14: note: candidate constructor not viable: requires single argument 'v0', but 3 arguments were provided
    explicit Matx(_Tp v0); //!< 1x1 matrix
             ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:141:14: note: candidate constructor not viable: requires single argument 'vals', but 3 arguments were provided
    explicit Matx(const _Tp* vals); //!< initialize from a plain array
             ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:99:44: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
template<typename _Tp, int m, int n> class Matx
                                           ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:124:5: note: candidate constructor not viable: requires 5 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4); //!< 1x5 or 5x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:118:5: note: candidate constructor not viable: requires 0 arguments, but 3 were provided
    Matx();
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:125:5: note: candidate constructor not viable: requires 6 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5); //!< 1x6, 2x3, 3x2 or 6x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:126:5: note: candidate constructor not viable: requires 7 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6); //!< 1x7 or 7x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:127:5: note: candidate constructor not viable: requires 8 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7); //!< 1x8, 2x4, 4x2 or 8x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:128:5: note: candidate constructor not viable: requires 9 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8); //!< 1x9, 3x3 or 9x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:129:5: note: candidate constructor not viable: requires 10 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3, _Tp v4, _Tp v5, _Tp v6, _Tp v7, _Tp v8, _Tp v9); //!< 1x10, 2x5 or 5x2 or 10x1 matrix
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:130:5: note: candidate constructor not viable: requires 12 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3,
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:133:5: note: candidate constructor not viable: requires 14 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3,
    ^
/usr/local/include/opencv4/opencv2/core/matx.hpp:137:5: note: candidate constructor not viable: requires 16 arguments, but 3 were provided
    Matx(_Tp v0, _Tp v1, _Tp v2, _Tp v3,
    ^
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/external/OpticalFlow/external/klt_feature_tracker/src/trackFeatures.cpp:40:
In file included from /usr/local/include/opencv4/opencv2/core/core.hpp:48:
In file included from /usr/local/include/opencv4/opencv2/core.hpp:59:
/usr/local/include/opencv4/opencv2/core/mat.hpp:1007:29: error: no template named 'initializer_list' in namespace 'std'
    explicit Mat(const std::initializer_list<_Tp> list);
                       ~~~~~^
/usr/local/include/opencv4/opencv2/core/mat.hpp:1011: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/include/opencv4/opencv2/core/mat.hpp:1011: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/include/opencv4/opencv2/core/mat.hpp:2222: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=]
20 errors generated.
[30/53] Linking CXX shared library libgazebo_mavlink_interface.dylib
[31/53] Building CXX object CMakeFiles/gazebo_imu_plugin.dir/src/gazebo_imu_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_imu_plugin.cpp:21:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_imu_plugin.h:33:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
    for( e_model; e_model; e_model=e_model->NextSiblingElement("model") )
         ^~~~~~~
1 warning generated.
[32/53] Building CXX object CMakeFiles/gazebo_gps_plugin.dir/src/gazebo_gps_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_gps_plugin.cpp:27:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_gps_plugin.h:37:

1 warning generated.
[35/53] Building CXX object CMakeFiles/gazebo_wind_plugin.dir/src/gazebo_wind_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_wind_plugin.cpp:23:
/Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/common.h:68:10: warning: expression result unused [-Wunused-value]
for( e_model; e_model; e_model=e_model->NextSiblingElement(“model”) )
^~~~~~~
1 warning generated.
[36/53] Building CXX object CMakeFiles/gazebo_geotagged_images_plugin.dir/src/gazebo_geotagged_images_plugin.cpp.o
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/src/gazebo_geotagged_images_plugin.cpp:18:
In file included from /Users/dlw/Workspace/PX4/Firmware/Tools/sitl_gazebo/include/gazebo_geotagged_images_plugin.h:21:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/mavlink.h:32:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/common.h:30:
In file included from /Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/…/protocol.h:75:
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/…/mavlink_helpers.h:247:25: warning: taking address of packed member ‘checksum’ of class or structure ‘__mavlink_message’ may result in an unaligned pointer value [-Waddress-of-packed-member]
crc_accumulate_buffer(&msg->checksum, _MAV_PAYLOAD(msg), msg->len);
^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/…/mavlink_helpers.h:248:29: warning: taking address of packed member ‘checksum’ of class or structure ‘__mavlink_message’ may result in an unaligned pointer value [-Waddress-of-packed-member]
crc_accumulate(crc_extra, &msg->checksum);
^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/…/mavlink_helpers.h:471:12: warning: taking address of packed member ‘checksum’ of class or structure ‘__mavlink_message’ may result in an unaligned pointer value [-Waddress-of-packed-member]
crc_init(&msg->checksum);
^~~~~~~~~~~~~
/Users/dlw/Workspace/PX4/Firmware/mavlink/include/mavlink/v2.0/common/…/mavlink_helpers.h:476:21: warning: taking address of packed member ‘checksum’ of class or structure ‘__mavlink_message’ may result in an unaligned pointer value [-Waddress-of-packed-member]
crc_accumulate(c, &msg->checksum);
^~~~~~~~~~~~~
4 warnings generated.
[37/53] Building CXX object CMakeFiles/gazebo_opticalflow_plugin.dir/src/gazebo_opticalflow_plugin.cpp.o
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
make: *** [px4_sitl_default] Error 1

#2

I’m having the same issue with the current master branch and 10.14.3. I believe the Gazebo version is now 9.6. I wanted optical flow so I used make px4_sitl gazebo_iris_opt_flow which produced the error above. I then tried just make px4_sitl gazebo and it produced the same result.

#3

Thanks for sharing that here - let me investigate with a fresh install.

2 Likes
#4

Any update on this, I am having the same problem

#5

I have a same issue. Any update of this problem?

#6

I’m on current master and gazebo9 and everything is currently working great.

Now, to just never, ever type “brew upgrade”