catkin_make Error: Could NOT find TinyXML2 (missing: TinyXML2_LIBRARY TinyXML2_INCLUDE_DIR)
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 ...
We're going to need to see your
CMakeLists.txt
.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!