Catkin_make error no rule to make target libg2o needed by rgbdslam [closed]
I am running ROS kinetic on Ubuntu 16.04 on an intel NUC. I used the install.sh to make a g2ofork and to put rgbdslam into my catkin workspace. I am currently trying to run catkin_make but I am receiving the error below.
Scanning dependencies of target rgbdslam
[ 85%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/moc_openni_listener.cpp.o
[ 86%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/moc_graph_manager.cpp.o
[ 86%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/main.cpp.o
[ 87%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/openni_listener.cpp.o
[ 87%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/node.cpp.o
[ 87%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/misc.cpp.o
[ 87%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/landmark.cpp.o
[ 88%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/loop_closing.cpp.o
[ 88%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o
[ 89%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/graph_mgr_io.cpp.o
[ 89%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/graph_manager2.cpp.o
[ 89%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/graph_mgr_odom.cpp.o
[ 89%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/transformation_estimation.cpp.o
make[2]: *** No rule to make target '/home/astrobotics/ros_code/src/g2ofork/lib/libg2o_csparse_extension.so', needed by '/home/astrobotics/ros_code/devel/lib/rgbdslam/rgbdslam'. Stop.
make[2]: *** Waiting for unfinished jobs....
[ 90%] Building CXX object rgbdslam/CMakeFiles/rgbdslam.dir/src/covariance_estimation.cpp.o
CMakeFiles/Makefile2:8253: recipe for target 'rgbdslam/CMakeFiles/rgbdslam.dir/all' failed
make[1]: *** [rgbdslam/CMakeFiles/rgbdslam.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j2" failed
-------------edit--------------------- I have added both of these to my package.xml
<run_depend>libg2o</run_depend>
<build_depend>libg2o</build_depend>
and this is my CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0003 NEW)
#########################################################
### USER CONFIG #########################################
#########################################################
set(USE_SIFT_GPU 1 CACHE BOOL "build with support for siftgpu")
if (${USE_SIFT_GPU})
message(STATUS "SiftGPU library will be used")
else (${USE_SIFT_GPU})
message(STATUS "SiftGPU library will not be used")
endif (${USE_SIFT_GPU})
#SIFT_GPU_MODE is now set via parameter server option "siftgpu_with_cuda"
#set(ENV{SIFT_GPU_MODE} 2) #CUDA = 1, GLSL = 2
set(ENV{SIFT_GPU_CUDA_PATH} /usr/local/cuda CACHE PATH "where cuda is installed")
#These settings are unsupported legacy
set(USE_GICP_BIN 0)
set(USE_GICP_CODE 0)
set(USE_PCL_ICP 0)
set(USE_GL2PS 0) #For printing the 3D Window to PostScript - requires installation of additional library: libgl2ps-dev
IF ("${ROS_PARALLEL_JOBS}" EQUAL "")
set(ROS_PARALLEL_JOBS 1)
endif ("${ROS_PARALLEL_JOBS}" EQUAL "")
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#SET(CMAKE_CXX_FLAGS "-O3 -fPIC -std=c++0x")
#For annotated profiling with perf:
#SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC -std=c++0x")
#SET(CMAKE_CXX_FLAGS "-ggdb -O3 -fPIC")
SET(CMAKE_BUILD_TYPE RELEASE)
#add_compile_options(-std=c++11)
IF (${USE_GL2PS})
add_definitions(-DGL2PS)
ENDIF (${USE_GL2PS})
#is used for compiling the libraries
set(USE_GICP 0)
IF (${USE_GICP_BIN} OR ${USE_GICP_CODE})
set(USE_GICP 1 ...
same issue on the github
Also stuck at catkin_make part. The only difference for me is:
No rule to make target '/opt/ros/kinetic/lib/libg2o_solver_cholmod.so'
Did you use the install script?
I found that if I made a completely know catkin workspace with the script it works but as soon as i try making it in a previously setup workspace it does this
Yes, I used the installation script. I followed the steps posted on github but still couldn't resolve it...
I'm curious what your catkin_make error is because I have a line
which is where i originally tried to install g2o so its directory is like cashed
After modifying FindG2o.cmake I also added C++11 support. Then I run rosdep install rgbdslam so that g2o is installed. Currently catkin_make returns
im running into the same problem now, did you sovle it?