Ask Your Question
0

Catkin_make error no rule to make target libg2o needed by rgbdslam [closed]

asked 2018-03-24 18:58:28 -0600

skynet gravatar image

updated 2018-04-01 16:13:28 -0600

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 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by skynet
close date 2018-04-01 17:10:12.038139

Comments

same issue on the github

hamid gravatar imagehamid ( 2018-03-24 23:45:23 -0600 )edit

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'

Dox gravatar imageDox ( 2018-03-28 20:15:57 -0600 )edit

Did you use the install script?

skynet gravatar imageskynet ( 2018-03-29 10:57:21 -0600 )edit

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

skynet gravatar imageskynet ( 2018-03-29 12:26:53 -0600 )edit

Yes, I used the installation script. I followed the steps posted on github but still couldn't resolve it...

Dox gravatar imageDox ( 2018-03-29 14:49:56 -0600 )edit

I'm curious what your catkin_make error is because I have a line

-- Found g2o headers in: /home/astrobotics/ros_code/src/g2ofork
-- Found libg2o: /home/astrobotics/ros_code/src/g2ofork/lib/libg2o_csparse_extension.so;

which is where i originally tried to install g2o so its directory is like cashed

skynet gravatar imageskynet ( 2018-03-29 15:38:54 -0600 )edit

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

    /usr/bin/ld: cannot find -lsiftgpu
    collect2: error: ld returned 1 exit status
   ...
   Makefile:138: recipe for target 'all' failed
Dox gravatar imageDox ( 2018-03-29 16:22:10 -0600 )edit

im running into the same problem now, did you sovle it?

greg gravatar imagegreg ( 2018-03-29 22:24:05 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-30 15:09:20 -0600

skynet gravatar image

updated 2018-03-30 15:11:17 -0600

I moved the Code/Build file that new workspace "rgbdslam_catkin_ws" that the script generated (mind you that worked for me) and put it in my workspace I have been using for my project. I edited the build/CMakeCache.txt and replaced the

    //Path to a library.
  G2O_CORE_LIB:FILEPATH=G2O_CORE_LIB_GTEST_LIBRARY-NOTFOUND

with the actual directory to g2o

 //Path to a library.
G2O_CORE_LIB:FILEPATH=/home/astrobotics/g2ofork/install/lib/libg2o_core.so

just make sure you have g2ofork outside of your workspace

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-03-24 18:58:28 -0600

Seen: 1,094 times

Last updated: Apr 01 '18