Ask Your Question
0

invoking catkin_make failed

asked 2016-01-30 08:14:42 -0500

anonymous user

Anonymous

updated 2016-01-30 10:32:35 -0500

gvdhoorn gravatar image
kv@kv:~/catkin_ws$ catkin_make
Base path: /home/kv/catkin_ws
Source space: /home/kv/catkin_ws/src
Build space: /home/kv/catkin_ws/build
Devel space: /home/kv/catkin_ws/devel
Install space: /home/kv/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/kv/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/kv/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/kv/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/kv/catkin_ws/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/kv/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.16
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
-- beginner_tutorials: 1 messages, 1 services
-- Configuring done
CMake Error at beginner_tutorials/CMakeLists.txt:211 (add_executable):
  Cannot find source file:

    src/add_two_ints_client.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


-- Build files have been written to: /home/kv/catkin_ws/build
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Edit:

kv@kv:~/catkin_ws/src$ ls
add_two_ints_client.cpp  beginner_tutorials
add_two_ints_server.cpp  CMakeLists.txt
edit retag flag offensive close merge delete

Comments

So .. what is your question?

gvdhoorn gravatar image gvdhoorn  ( 2016-01-30 08:24:54 -0500 )edit

I'm unable to proceed further with the given error.

anonymous userAnonymous ( 2016-01-30 08:27:13 -0500 )edit

Error: CMake Error at beginner_tutorials/CMakeLists.txt:211 (add_executable): Cannot find source file:

src/add_two_ints_client.cpp

I find that src/ (add_two_ints_client.cpp) is present. Even then I'm getting this error

anonymous userAnonymous ( 2016-01-30 08:33:18 -0500 )edit

Please help me out. I'm stuck here, unable to proceed further

anonymous userAnonymous ( 2016-01-30 08:36:21 -0500 )edit

Please add the output of tree /home/kv/catkin_ws/src to your original question. Use the edit button/link for that.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-30 09:17:35 -0500 )edit

I have added it

anonymous userAnonymous ( 2016-01-30 09:21:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-30 09:53:01 -0500

Steven_Daniluk gravatar image

It seems that your problem is that you have created add_two_ints_client.cpp and add_two_ints_server.cpp in the src folder of your catkin workspace, while they should instead be in an src folder inside beginner_tutorials (i.e. catkin_ws/beginner_tutorials/src).

Moving your scripts in there should allow catkin_make to successfully build.

Also, make sure you have declared your executables in the CMakeList.txt file inside the beginner_tutorials folder. You should have something like:

add_executable(add_two_ints_server src/add_two_ints_server.cpp)
target_link_libraries(add_two_ints_server ${catkin_LIBRARIES})
add_dependencies(add_two_ints_server beginner_tutorials_gencpp)

add_executable(add_two_ints_client src/add_two_ints_client.cpp)
target_link_libraries(add_two_ints_client ${catkin_LIBRARIES})
add_dependencies(add_two_ints_client beginner_tutorials_gencpp)

Hope this helps.

edit flag offensive delete link more

Comments

Thanks a lot. It worked!!

anonymous userAnonymous ( 2016-01-30 10:03:17 -0500 )edit

Please check the answer as accepted if it solves your problem.

joq gravatar image joq  ( 2016-01-30 13:12:24 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-30 08:09:54 -0500

Seen: 2,528 times

Last updated: Jan 30 '16