weixin_39606137
2020-12-26 10:57 阅读 1

Cannot compile mavros

I tried building mavros with catkin on ROS Hydro + Ubuntu 13.04 on an Odroid U3.

Catkin build fails at 86% :

[ 84%] [ 85%] [ 86%] Building CXX object mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_interface.cpp.o Building CXX object mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_serial.cpp.o Building CXX object mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_udp.cpp.o In file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_serial.h:25:0, from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_serial.cpp:23: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a typeIn file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_udp.h:25:0, from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_udp.cpp:23: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a type

In file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:23:0: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a type /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:32:1: error: 'set' in namespace 'std' does not name a type /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp: In static member function 'static int mavconn::MAVConnInterface::new_channel()': /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:47:7: error: 'allocated_channels' was not declared in this scope /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp: In static member function 'static void mavconn::MAVConnInterface::delete_channel(int)': /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:63:2: error: 'allocated_channels' was not declared in this scope make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_interface.cpp.o] Error 1 make[2]: * Waiting for unfinished jobs.... make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_serial.cpp.o] Error 1 make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_udp.cpp.o] Error 1 make[1]: * [mavros/CMakeFiles/mavconn.dir/all] Error 2 make: * [all] Error 2 Invoking "make" failed

该提问来源于开源项目:mavlink/mavros

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

5条回答 默认 最新

  • weixin_39553653 weixin_39553653 2020-12-26 10:57

    Now I rebuilds ROS for wandboard (IMX6Q). I will check on ROS Indigo and Ubuntu 14.04 LTS (recommend to upgrade the OS).

    Revision v0.2.0-2-gc08b38b worked on ROS Hydro & Ubuntu 13.10 (since that time libmavconn not changed).

    Very strange that errors on std::set, what version of g++?

    点赞 评论 复制链接分享
  • weixin_39606137 weixin_39606137 2020-12-26 10:57

    I have g++ 4.7. At the moment I cannot upgrade Ubuntu higher than 13.04 on my odroid. Also I can only use ros Hydro for now.

    I'll try re compiling on the older commit you tell me and report back .

    点赞 评论 复制链接分享
  • weixin_39606137 weixin_39606137 2020-12-26 10:57

    Nope, the older commit errors in exactly the same place:

    In file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_serial.h:25:0, from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_serial.cpp:23: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a type In file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:23:0: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a type /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:32:1: error: 'set' in namespace 'std' does not name a type /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp: In static member function 'static int mavconn::MAVConnInterface::new_channel()': /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:47:7: error: 'allocated_channels' was not declared in this scope /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp: In static member function 'static void mavconn::MAVConnInterface::delete_channel(int)': /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_interface.cpp:63:2: error: 'allocated_channels' was not declared in this scope In file included from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_udp.h:25:0, from /home/odroid/catkin_ws/src/mavros/src/mavconn/mavconn_udp.cpp:23: /home/odroid/catkin_ws/src/mavros/include/mavros/mavconn_interface.h:77:9: error: 'set' in namespace 'std' does not name a type make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_interface.cpp.o] Error 1 make[2]: * Waiting for unfinished jobs.... make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_serial.cpp.o] Error 1 make[2]: * [mavros/CMakeFiles/mavconn.dir/src/mavconn/mavconn_udp.cpp.o] Error 1 make[1]: *** [mavros/CMakeFiles/mavconn.dir/all] Error 2

    点赞 评论 复制链接分享
  • weixin_39553653 weixin_39553653 2020-12-26 10:57

    I just finished build ROS Indigo. Checked mavros: builds and works without problems.

    You clearly has a problem with the compiler, since std::set is not defined.

    Try this patch:

    
    diff --git a/include/mavros/mavconn_interface.h b/include/mavros/mavconn_interface.h
    index b3ddeff..7020c4b 100644
    --- a/include/mavros/mavconn_interface.h
    +++ b/include/mavros/mavconn_interface.h
    @@ -31,6 +31,7 @@
     #include <boost>
     #include <boost>
    
    +#include <set>
     #include <mavros>
    
     namespace mavconn {
    </mavros></set></boost></boost>
    点赞 评论 复制链接分享
  • weixin_39606137 weixin_39606137 2020-12-26 10:57

    Awesome thanks!!

    The diff works perfectly.

    点赞 评论 复制链接分享

相关推荐