0

Rosanswers logo

I put in "make"

CMake Error: The source directory "/home/avian/catkin_ws/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Makefile:500: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1

Then if I put in "catkin_make" and I get this

catkin_make
Base path: /home/avian/catkin_ws/build
The specified source space "/home/avian/catkin_ws/build/src" does not exist

I did edit my CMakeList.txt to

cmake_minimum_required(VERSION 2.8.3) project(beginner_tutorials)

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation )

add_message_files( FILES Num.msg )

add_service_files( FILES AddTwoInts.srv )

generate_messages( DEPENDENCIES std_msgs )

catkin_package( ... CATKIN_DEPENDS message_runtime ... ...)

include_directories( ${catkin_INCLUDE_DIRS} )

include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(talker src/talker.cpp) target_link_libraries(talker ${catkin_LIBRARIES}) add_dependencies(talker beginner_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp) target_link_libraries(listener ${catkin_LIBRARIES}) add_dependencies(listener beginner_tutorials_generate_messages_cpp)

I dont know what to do to fix this.


Originally posted by avirich on ROS Answers with karma: 1 on 2016-07-05

Post score: 0


Original comments

Comment by skr_robo on 2016-07-22:
Are you trying to follow any specific tutorial? If so, can you please share its link?

Why do you require the make command? The catkin_make takes care of it. See this link

1 Answers1

0

Rosanswers logo

Based on the output you get from running catkin_make, it looks like you're running it from inside the catkin workspace's build directory.

catkin_make needs to be run from the catkin workspace root directory, as noted in the guide @skr_robo linked to (http://wiki.ros.org/catkin/commands/catkin_make):

$ cd ~/catkin_ws
$ catkin_make

The first line will take your terminal environment to the catkin workspace's root directory. From there, catkin_make can do it's thing!


Originally posted by mbarulic with karma: 51 on 2018-07-27

This answer was ACCEPTED on the original site

Post score: 0