I can't catkin_make
system:vmware15.5pro ubuntu18.04.2 ros melodic
Base path: /home/liu/testpkg
Source space: /home/liu/testpkg/src
Build space: /home/liu/testpkg/build
Devel space: /home/liu/testpkg/devel
Install space: /home/liu/testpkg/install
####
#### Running command: "make cmake_check_build_system" in "/home/liu/testpkg/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/liu/testpkg/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/liu/testpkg/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17")
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.20
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - learning_topic
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'learning_topic'
-- ==> add_subdirectory(learning_topic)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:94 (message):
add_message_files() directory not found:
/home/liu/testpkg/src/learning_topic/msg
Call Stack (most recent call first):
learning_topic/CMakeLists.txt:80 (add_message_files)
-- Configuring incomplete, errors occurred!
See also "/home/liu/testpkg/build/CMakeFiles/CMakeOutput.log".
See also "/home/liu/testpkg/build/CMakeFiles/CMakeError.log".
Makefile:530: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
and i found a solution of commenting out the following lines,which didn't work
## add_message_files
## add_service_files
## generate_messages
what should i do?
here is the error log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/liu/testpkg/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_9f8ac/fast"
/usr/bin/make -f CMakeFiles/cmTC_9f8ac.dir/build.make CMakeFiles/cmTC_9f8ac.dir/build
make[1]: 进入目录“/home/liu/testpkg/build/CMakeFiles/CMakeT
mp”
Building C object CMakeFiles/cmTC_9f8ac.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_9f8ac.dir/CheckSymbolExists.c.o -c /home/liu/testpkg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_9f8ac
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_9f8ac.dir/link.txt --verbose=1
/usr/bin/cc -rdynamic CMakeFiles/cmTC_9f8ac.dir/CheckSymbolExists.c.o -o cmTC_9f8ac
CMakeFiles/cmTC_9f8ac.dir/CheckSymbolExists.c.o:在函数‘main’中:
CheckSymbolExists.c:(.text+0x1b):对‘pthread_create’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_9f8ac.dir/build.make:97: recipe for target 'cmTC_9f8ac' fail
ed
make[1]: *** [cmTC_9f8ac] Error 1
make[1]: 离开目录“/home/liu/testpkg/build/CMakeFiles/CMakeTmp”
Makefile:126: recipe for target 'cmTC_9f8ac/fast' failed
make: *** [cmTC_9f8ac/fast] Error 2
File /home/liu/testpkg/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/liu/testpkg/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr ...