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

ROS2 building on Windows 10 Could NOT find TinyXML2 (missing: TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR)

asked 2020-05-31 00:43:24 -0600

pulcher gravatar image

I am receiving the following error:

CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find TinyXML2 (missing: TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindTinyXML2.cmake:24 (find_package_handle_standard_args)
  CMakeLists.txt:6 (find_package)

I am tracking this down and have found a couple of interesting things. One of these me to the the Troubleshooting section https://index.ros.org/doc/ros2/Troubleshooting/#windows-troubleshooting, which states:

CMake packages unable to find asio, tinyxml2, tinyxml, eigen, or log4cxx¶ We’ve seen that sometimes the chocolatey packages for asio, tinyxml2, etc. do not add important registry entries and CMake will be unable to find them when building ROS 2. We’ve not yet been able to identify the root cause, but uninstalling the chocolatey packages (with -n if the uninstall fails the first time), and then reinstalling them will fix the issue.

I have tried the above and a ton of other things: Setting ENV vars, changing the *.in files, and some more shots in the dark.

Thought that maybe it was picking up the wrong python, as visual studio has it's own version laying around. As per the instruction, I did install python 3.7.5 in c:\Python37, updated that PATH, and verified with the following:

C:\dev\ros2_eloquent>python --version
Python 3.7.5

Not really sure of what the next step is.

edit retag flag offensive close merge delete

Comments

which ros2 packages are you buiding? I had the same issue but I fixed it. It really depends on the ros2 package's cmake usage of tinyxml2. BTW, the way of installation of your tinyxml2 also matters.

felixf4xu gravatar image felixf4xu  ( 2023-05-19 00:05:42 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-05-31 17:06:40 -0600

flynneva gravatar image

If you're building from source I'd recommend upgrading to Foxy. I've seen this issue before with windows and it was due to incorrect environment variables for me....but you said that you've checked that so maybe an upgrade would help?

edit flag offensive delete link more

Comments

Which ENVs. Not sure I got all of the ones I planned on. I just dumped eloquent and pulled foxy. Got the same error. Pretty sure it is something stupid I thought I didn't, but didn't.

pulcher gravatar image pulcher  ( 2020-06-02 21:14:38 -0600 )edit
0

answered 2020-11-07 05:51:12 -0600

jkp gravatar image

I had the same problem. What worked for me was to remove and reinstall the packages as described in the troubleshooting guide from an administrative powershell. Then I closed the VS command prompt and started it again to make sure the environment was correct and now it seems to be building. At least it got past the package that missed the TinyXML2 libs

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-05-31 00:43:24 -0600

Seen: 1,329 times

Last updated: Nov 07 '20