Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile mavros #24

Closed
mhkabir opened this issue Jun 6, 2014 · 5 comments
Closed

Cannot compile mavros #24

mhkabir opened this issue Jun 6, 2014 · 5 comments

Comments

@mhkabir
Copy link
Member

mhkabir commented Jun 6, 2014

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

@vooon
Copy link
Member

vooon commented Jun 6, 2014

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++?

@mhkabir
Copy link
Member Author

mhkabir commented Jun 7, 2014

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 .

@mhkabir
Copy link
Member Author

mhkabir commented Jun 7, 2014

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

@vooon
Copy link
Member

vooon commented Jun 7, 2014

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/thread/thread.hpp>
 #include <boost/thread/recursive_mutex.hpp>

+#include <set>
 #include <mavros/mavconn_mavlink.h>

 namespace mavconn {

@mhkabir
Copy link
Member Author

mhkabir commented Jun 7, 2014

Awesome thanks!!

The diff works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants