ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

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

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

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):
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, 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

2 Answers

Sort by » oldest newest most voted

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

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

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

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


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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 587 times

Last updated: Nov 07 '20