skasperski / navigation_2d

ROS nodes to navigate a mobile robot in a planar environment
GNU General Public License v3.0
124 stars 65 forks source link

build error because of missing head file #1

Closed lguodongustc closed 10 years ago

lguodongustc commented 10 years ago

/home/wolf/catkin_ws/src/navigation_2d/nav2d_operator/include/nav2d_operator/RobotOperator.h:14:32: fatal error: nav2doperator/cmd.h: No such file or directory compilation terminated. make[2]: [navigation_2d/nav2doperator/CMakeFiles/RobotOperator.dir/src/RobotOperator.cpp.o] Error 1 make[1]: ** [navigation_2d/nav2d_operator/CMakeFiles/RobotOperator.dir/all] Error 2 make: * [all] Error 2 make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2! Invoking "make" failed

skasperski commented 10 years ago

Hi, could you provide some more information on how to reproduce the error? The file cmd.h is created during message generation and thus should be found by catkin.

lguodongustc commented 10 years ago

Thanks for your reply. The error happens when I build the package as the ROS wiki nav2d page by executing the command: "catkin_make -DCMAKE_BUILD_TYPE=Release" I have SOLVED the problem by removing the compilation option. Could you please tell me what's meaning about the compilation option and do you know the possible reason?

skasperski commented 10 years ago

By setting the CMAKE_BUILD_TYPE to Release, you tell the compiler to do some optimization during compilation and remove all debug information. This usually results in a much better performance. I have currently no idea what could be the reason for this, I can build it both with and without the Release-Option. I will try a clean checkout and rebuild later and see if I can somehow reproduce this error.

PS: If I remember correctly, the default build type is RelWithDebInfo, which should also do fairly well.