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

Unable to use tinyxml2 library on armhf stretch; tags: melodic raspbian-stretch armhf tinyxml2 rospack

asked 2018-11-25 15:44:20 -0500

TFitz gravatar image

I am running melodic ROS on raspberry pi and OS is debian stretch with kernel 4.14.71-v7+ My package.xml file for rospack states it is version 2.5.2.

When I tried to use rospack find it came back with the following error

terminate called after throwing an instance of 'rospack::Exception' what(): error parsing manifest of package class_loader at /home/debian/ros_catkin_ws/install_isolated/share/class_loader/package.xml Aborted

As advised in rospack issue #77 the error was due to libtinyxml2 being version 4.0.1-1. It appears that there was no quick solution for armhf architecture but I followed the suggestions and

  1. included a buster mirror
  2. sudo apt-get update | sudo apt-get remove libtinyxml2 -y | sudo apt-get install libtinyxml2-dev -y The last command also installs libtinysml2-6a
  3. dpkg -l libtinyxml2-6a returns version 6.2.0+dfsg-3
  4. I go to my ROS root directory and
  5. ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic and everything is rebuilt.
  6. I run rospack list and now it says.

rospack: error while loading shared libraries: libtinyxml2.so.4: cannot open shared object file: No such file or directory

  1. I thought I'd be clever and make a symbolic link in the /usr/lib/arm-linux-gnueabihf from libtinyxml2.so.4 to libtinyxml2.so.6 (which does exist) but rospack list returns a Segmentation Fault.

I'm out of ideas, please help

edit retag flag offensive close merge delete

Comments

1

I don't use any of this myself, but I've seen people "just" build libtinyxml from source on their devices.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-26 02:53:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-26 08:09:08 -0500

TFitz gravatar image

updated 2018-11-26 19:31:50 -0500

Ok so I am answering my own question...

mkdir ~/any/directory/tinyxml2
cd ~/any/directory/tinyxml2
git clone https://github.com/leethomason/tinyxml2.git
cd ./tinyxml2
make -j1
nano ~/ros_catkin_ws/src/rospack/CMakeLists.txt

find include_directories and replace ${TinyXML2_INCLUDE_DIRS} with ~/any/directory/tinyxml2/tinyxml2/

cd ~/ros_catkin_ws
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/melodic

Then rospack is starting to behave itself on armhf!

*instead of nano you can use any text editor to make the edit in CMakeLists.txt

edit flag offensive delete link more

Comments

1
cd ./tinyxml2
catkin_make -j1

tinyxml is not a ROS pkg. Are you sure you used catkin_make?

gvdhoorn gravatar image gvdhoorn  ( 2018-11-26 09:06:40 -0500 )edit

You're right. I used make. Thanks

TFitz gravatar image TFitz  ( 2018-11-26 19:33:03 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-25 15:44:20 -0500

Seen: 1,080 times

Last updated: Nov 26 '18