Ask Your Question
0

cakin_make returns the error '/usr/bin/ld: cannot find -lRTIMULib'

asked 2018-02-12 18:12:31 -0600

TheMilkman gravatar image

updated 2018-02-18 17:00:37 -0600

I'm attempting to catkin_make the imu package from this link But I'm getting the error:

/usr/bin/ld: cannot find -lRTIMULib

From as far as I can tell the library is include and linked in the CMake.txt

Does the location of the library file matter? It's currently in ~/catkin_ws/src/i2c_imu-master/src

Thanks for any help, the CMake.txt is as follows:

cmake_minimum_required(VERSION 2.8.3)
project(i2c_imu)

find_package(catkin REQUIRED COMPONENTS
  sensor_msgs
  roscpp
  tf
  angles
)

find_library(RTIMULib libRTIMULib.so)
message(STATUS "RTIMULib: ${RTIMULib }")

catkin_package(
CATKIN_DEPENDS sensor_msgs roscpp tf angles
)

include_directories(
${catkin_INCLUDE_DIRS}
)

add_executable(i2c_imu_node src/i2c_imu_node.cpp)

target_link_libraries(i2c_imu_node
RTIMULib
${catkin_LIBRARIES}
)

EDIT: The output of catkin_make after adding message(STATUS "RTIMULib: ${RTIMULib }") after find_library(RTIMULib ..): in the CMakeList.txt.

Base path: /home/nvidia/catkin_ws
Source space: /home/nvidia/catkin_ws/src
Build space: /home/nvidia/catkin_ws/build
Devel space: /home/nvidia/catkin_ws/devel
Install space: /home/nvidia/catkin_ws/install
####
#### Running command: "cmake /home/nvidia/catkin_ws/src -
DCATKIN_DEVEL_PREFIX=/home/nvidia/catkin_ws/devel -
DCMAKE_INSTALL_PREFIX=/home/nvidia/catkin_ws/install -G Unix Makefiles" in "/home/nvidia/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/nvidia/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/nvidia/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/nvidia/catkin_ws/devel;/opt/ros/kinetic
-- 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/nvidia/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.7.8
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - i2c_imu
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'i2c_imu'
-- ==> add_subdirectory(i2c_imu-master)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at i2c_imu-master/CMakeLists.txt:19 (message):
  Syntax error in cmake code at

    /home/nvidia/catkin_ws/src/i2c_imu-master/CMakeLists.txt:19

  when parsing string

    RTIMULib: ${{RTIMULib }}

  syntax error, unexpected cal_SYMBOL, expecting }} (22)


-- Configuring incomplete, errors occurred!
See also "/home/nvidia/catkin_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/nvidia/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
edit retag flag offensive close merge delete

Comments

Can you add the following line to the CMakeLists.txt and add whatever gets printed to your OP? Add this afterfind_library(RTIMULib ..):

message(STATUS "RTIMULib: ${RTIMULib}")
gvdhoorn gravatar imagegvdhoorn ( 2018-02-13 02:12:32 -0600 )edit

Thanks for your reply! The question has been updated with the information you asked for

TheMilkman gravatar imageTheMilkman ( 2018-02-18 17:01:54 -0600 )edit

You have a space in there after the variable name. CMake might not like that.

And as @ahendrix writes: you probably need to install the library. The message(STATUS ..) was just to see whether the library is actually found or not.

gvdhoorn gravatar imagegvdhoorn ( 2018-02-19 01:50:22 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-18 19:22:07 -0600

ahendrix gravatar image

It looks like that ROS package is just a wrapper for an IMU library, RTIMULib2. You should probably install that library.

edit flag offensive delete link more

Comments

Thanks @ahendrix! You're 100% right

TheMilkman gravatar imageTheMilkman ( 2018-03-11 17:48:27 -0600 )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: 2018-02-12 18:12:31 -0600

Seen: 432 times

Last updated: Feb 18 '18