ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

catkin_make Error: Could NOT find TinyXML2 (missing: TinyXML2_LIBRARY TinyXML2_INCLUDE_DIR)

asked 2017-12-10 23:40:50 -0600

updated 2017-12-11 02:18:10 -0600

Hi everyone! I get this error when I try to compile my packages with catkin_make on a BeagleBone board (ARM). I have these packages installed (aptitude search tinyxml): libtinyxml-dev, libtinyxml2-2v5, libtinyxml2.6.2v5

Any suggestion would be appreciated. Here is the log:

root@beaglebone:~/RBE-2002# catkin_make
Base path: /root/RBE-2002
Source space: /root/RBE-2002/src
Build space: /root/RBE-2002/build
Devel space: /root/RBE-2002/devel
Install space: /root/RBE-2002/install
####
#### Running command: "cmake /root/RBE-2002/src -DCATKIN_DEVEL_PREFIX=/root/RBE-2002/devel -DCMAKE_INSTALL_PREFIX=/root/RBE-2002/install -G Unix Makefiles" in "/root/RBE-2002/build"
####
-- Using CATKIN_DEVEL_PREFIX: /root/RBE-2002/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /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: /root/RBE-2002/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.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 29 packages in topological order:
-- ~~  - class_loader
-- ~~  - ros_control (metapackage)
-- ~~  - ros_controllers (metapackage)
-- ~~  - pluginlib
-- ~~  - rqt_joint_trajectory_controller
-- ~~  - controller_manager_msgs
-- ~~  - four_wheel_steering_msgs
-- ~~  - hardware_interface
-- ~~  - combined_robot_hw
-- ~~  - controller_interface
-- ~~  - force_torque_sensor_controller
-- ~~  - forward_command_controller
-- ~~  - effort_controllers
-- ~~  - imu_sensor_controller
-- ~~  - position_controllers
-- ~~  - controller_manager
-- ~~  - diff_drive_controller
-- ~~  - gripper_action_controller
-- ~~  - joint_limits_interface
-- ~~  - joint_state_controller
-- ~~  - joint_trajectory_controller
-- ~~  - rqt_controller_manager
-- ~~  - sweep_ros
-- ~~  - controller_manager_tests
-- ~~  - combined_robot_hw_tests
-- ~~  - transmission_interface
-- ~~  - turtlebotmini
-- ~~  - urdf_geometry_parser
-- ~~  - velocity_controllers
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'class_loader'
-- ==> add_subdirectory(class_loader)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Searching for Poco library...
--   Found Poco!
-- components found: Foundation.
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- +++ processing catkin metapackage: 'ros_control'
-- ==> add_subdirectory(ros_control/ros_control)
-- +++ processing catkin metapackage: 'ros_controllers'
-- ==> add_subdirectory(ros_controllers/ros_controllers)
-- +++ processing catkin package: 'pluginlib'
-- ==> add_subdirectory(pluginlib)
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   filesystem
--   system
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
 Could NOT find TinyXML2 (missing: TinyXML2_LIBRARY TinyXML2_INCLUDE_DIR)
Call Stack (most recent call first):
 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
 /opt/ros/kinetic/share/cmake_modules/cmake/Modules/FindTinyXML2.cmake:65 (find_package_handle_standard_args)
 pluginlib/CMakeLists.txt:6 (find_package)

-- Configuring incomplete, errors occurred!
See also "/root/RBE-2002/build/CMakeFiles/CMakeOutput.log".
See also "/root/RBE-2002/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

CMakeLists.txt of PluginLib:

cmake_minimum_required(VERSION 2.8.3)
project(pluginlib)

find_package(catkin REQUIRED COMPONENTS class_loader rosconsole roslib cmake_modules)
find_package(Boost REQUIRED COMPONENTS filesystem system)
find_package(TinyXML2 REQUIRED)

catkin_python_setup()

catkin_package(
  INCLUDE_DIRS include
  CATKIN_DEPENDS class_loader rosconsole roslib
  DEPENDS Boost TinyXML2
)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TinyXML2_INCLUDE_DIRS})

add_executable(plugin_tool src/plugin_tool.cpp)
target_link_libraries(plugin_tool ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${TinyXML2_LIBRARIES})

install(TARGETS plugin_tool
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})

install(DIRECTORY include/pluginlib/
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(FILES share/pluginlib/typed_class_loader_template.cpp
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(PROGRAMS scripts/plugin_macro_update
  DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

if(CATKIN_ENABLE_TESTING)
  add_library(test_plugins EXCLUDE_FROM_ALL SHARED test/test_plugins.cpp)

  catkin_add_gtest(${PROJECT_NAME}_utest test/utest.cpp)
  if(TARGET ${PROJECT_NAME}_utest)
    target_link_libraries(${PROJECT_NAME}_utest ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
    add_dependencies(${PROJECT_NAME}_utest test_plugins)
  endif()

  include(CheckCXXCompilerFlag)
  check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
  if(COMPILER_SUPPORTS_CXX11)
    catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp)
    if(TARGET ${PROJECT_NAME}_unique_ptr_test)
      target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
      set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++11 LINK_FLAGS -std=c++11)
      add_dependencies(${PROJECT_NAME ...
(more)
edit retag flag offensive close merge delete

Comments

1

We're going to need to see your CMakeLists.txt.

gvdhoorn gravatar image gvdhoorn  ( 2017-12-11 01:04:30 -0600 )edit

The error comes when compiling the pluginlib package However, this is a standard ROS library, so the CMakeLists.txt theoretically should be fine. I will post it in my post anyways!

alextac98 gravatar image alextac98  ( 2017-12-11 02:17:05 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-12-11 03:18:29 -0600

I finally got it to work! Essenially, I installed the libtinyxml2-dev on top of everything. This apparently added the header files ROS was looking for. It now works fine!

This is what I get when searching with apt on my BeagleBone

user@beaglebone:~/RBE-2002# apt search tinyxml
Sorting... Done
Full Text Search... Done
libtinyxml-dev/oldstable,now 2.6.2-2 armhf [installed]
  TinyXml library - header and static library

libtinyxml-doc/oldstable 2.6.2-2 all
  TinyXml library - documentation files

libtinyxml2-2/oldstable,now 2.2.0-1 armhf [installed]
  C++ XML parsing library

libtinyxml2-dev/oldstable,now 2.2.0-1 armhf [installed]
  TinyXML2 library - header and static library

libtinyxml2.6.2/oldstable,now 2.6.2-2 armhf [installed]
  C++ XML parsing library

libtinyxml2.6.2-dbg/oldstable 2.6.2-2 armhf
  TinyXml library - debug files
edit flag offensive delete link more

Comments

I installed the libtinyxml2-dev on top of everything. This apparently added the header files ROS was looking for.

how did you install dependencies in the first place? Shouldn't rosdep install .. have installed the dev lib for you?

gvdhoorn gravatar image gvdhoorn  ( 2017-12-11 05:16:19 -0600 )edit

Honestly don't remember if I tried that, but a possible problem would be that the BeagleBone is running on an ARM processor, and I had to compile ROS for it specifically.

alextac98 gravatar image alextac98  ( 2018-10-25 18:39:03 -0600 )edit
1

yes correct...all I had to do was sudo apt-get install libtinyxml2-dev ..and it worked

suab123 gravatar image suab123  ( 2019-08-11 12:45:57 -0600 )edit
0

answered 2022-11-21 12:33:09 -0600

ENategh gravatar image

sudo apt install libtinyxml2-dev

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-10 23:40:50 -0600

Seen: 11,314 times

Last updated: Dec 11 '17