MicroXRCEAgenet Build and Install fails with missing TINY2_SOURCE_DIR in cmake
Environment
- Turtlebot3 Waffle
- Intel i5 NUC
- Ubuntu 18.04
- ROS2 Dashing
MicroXRCEAgent bin not found
I found a ros-crystal-micro-xrce-dds-agent package for apt. There isn't one for dashing. So I tried to build it.
MicroXRCEAgent build failed on dashing
Reference: Micro-XRCE-DDS-Agent build Insturctions See my build log below.
ERROR during cmake: "Could NOT find tinyxml2 (missing: TINYXML2_SOURCE_DIR)" See below for build log.
Reference: Similar error on a BegleBone with ROS1 The solution of installing liblinyxml2-dev on top of everything did not solve this problem.
Question
How do I fix MicroXRCEAgent build and install?
$ cd
$ git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
Cloning into 'Micro-XRCE-DDS-Agent'...
remote: Enumerating objects: 168, done.
remote: Counting objects: 100% (168/168), done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 7098 (delta 104), reused 128 (delta 76), pack-reused 6930
Receiving objects: 100% (7098/7098), 1.79 MiB | 8.83 MiB/s, done.
Resolving deltas: 100% (4071/4071), done.
$ cd Micro-XRCE-DDS-Agent
$ ls
agent.refs Dockerfile microxrce_agent.cpp thirdparty
cmake docs README.md utils
CMakeLists.txt include src valgrind.supp
CTestJenkins.cmake LICENSE test
$ git checkout a495c65faa964ddc068ac6e1249f17f5c9f92787
Note: checking out 'a495c65faa964ddc068ac6e1249f17f5c9f92787'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at a495c65 Merge pull request #54 from eProsima/feature/baudrate
$ mkdir build
$ cd build
$ cmake -DTHIRDPARTY=ON -DCONFIG_UDP_TRANSPORT_MTU=8192 -DCONFIG_SERIAL_TRANSPORT_MTU=8192 ..
-- Setting build type to 'Release' as none was specified.
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- fastcdr library found...
-- Could NOT find tinyxml2 (missing: TINYXML2_SOURCE_DIR)
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- fastrtps library found...
Submodule 'thirdparty/asio' (https://github.com/chriskohlhoff/asio.git) registered for path 'thirdparty/asio'
Cloning into '/home/eepp/Micro-XRCE-DDS-Agent/thirdparty/asio'...
Submodule path 'thirdparty/asio': checked out '230c0d2ae035c5ce1292233fcab03cea0d341264'
-- Found Asio: /home/eepp/Micro-XRCE-DDS-Agent/thirdparty/asio/asio/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eepp/Micro-XRCE-DDS-Agent/build