Ask Your Question

cmake_check_build_system' failed

asked 2016-07-05 10:35:20 -0500

avirich gravatar image

updated 2016-07-05 14:27:06 -0500

gvdhoorn gravatar image

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

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.

edit retag flag offensive close merge delete


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

skr_robo gravatar image skr_robo  ( 2016-07-22 13:16:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-27 14:57:49 -0500

mbarulic gravatar image

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 ( ):

$ 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!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-07-05 10:35:20 -0500

Seen: 10,619 times

Last updated: Jul 27 '18