Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARP_managerConfig.cmake requires FindTinyXML.cmake to be in CMAKE_MODULE_PATH, but YARP does not install it #1736

Closed
traversaro opened this issue Jun 7, 2018 · 9 comments
Labels
Component: CMake Fixed in: YARP v3.0.1 Issue Type: Bug Involves some intervention from a system administrator Resolution: Fixed

Comments

@traversaro
Copy link
Member

Describe the bug
If you have find_package(YARP COMPONENTS manager REQUIRED) using a YARP installed with YCM, you get the following error:

CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:65 (find_package):
  By not providing "FindTinyXML.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TinyXML", but
  CMake did not find one.

  Could not find a package configuration file provided by "TinyXML" with any
  of the following names:

    TinyXMLConfig.cmake
    tinyxml-config.cmake

  Add the installation prefix of "TinyXML" to CMAKE_PREFIX_PATH or set
  "TinyXML_DIR" to a directory containing one of the above files.  If
  "TinyXML" provides a separate development package or SDK, be sure it has
  been installed.

To Reproduce
Configure a downstream project with find_package(YARP COMPONENTS manager REQUIRED) in its CMakeLists.txt , do not have find_package(YCM) in the same downstream project and make sure that YARP was configured/installed using an external YCM

Expected behavior
find_package(YARP COMPONENTS manager REQUIRED) should work fine.

Configuration (please complete the following information):

  • OS: Ubuntu 16.04
  • yarp version: e0b0607
  • cmake: 3.5

Proposed solution
If YARP is configured using an external YCM (and so it is not installing YCM CMake modules) a find_dependency(YCM) should be added in YARPConfig.cmake .

@traversaro
Copy link
Member Author

@drdanz If you agree on the proposed solution, I can proceed in providing a PR.

@traversaro
Copy link
Member Author

Apparently I was wrong, and the same problem occurs if YARP is generated without YCM: https://travis-ci.org/robotology/icub-tests/jobs/389236808#L5408 .

@traversaro traversaro changed the title YARP_managerConfig.cmake requires FindTinyXML.cmake to be in CMAKE_MODULE_PATH, but if YARP is configured with YCM it is not YARP_managerConfig.cmake requires FindTinyXML.cmake to be in CMAKE_MODULE_PATH, but YARP does not install it Jun 7, 2018
@traversaro
Copy link
Member Author

Good old issue related to this: robotology-legacy/codyco-superbuild#15 .

@PeterBowman
Copy link
Member

I'm unable to reproduce this at e709b46 (and robotology/ycm-cmake-modules@9e2c204). YCM is found on system by

find_package(YCM ${YCM_REQUIRED_VERSION} QUIET)

This call loads YCM module paths into CMAKE_MODULE_PATH via YCMConfig.cmake and then enables YARP_manager to locate the FindTinyXML.cmake file.

@PeterBowman
Copy link
Member

I see this error when I uninstall YCM, though. Could you have installed YCM master by chance, and are you sure that YARP is in fact using an external YCM? YARP requires YCM 0.7.0 since quite recently (84e1d35) and discards 0.6.0 in the call referenced in my previous comment.

PeterBowman added a commit to PeterBowman/yarp that referenced this issue Jun 10, 2018
This is a follow up to robotology#1733 for non-static YARP builds, which
were prone to cause similar errors in downstreams (see robotology#1736) due
to internal dependencies (e.g. TinyXML) not being found.
@PeterBowman
Copy link
Member

Please check #1739 against your sample project.

PeterBowman added a commit to PeterBowman/yarp that referenced this issue Jun 11, 2018
This is a follow up to robotology#1733 for non-static YARP builds, which
were prone to cause similar errors in downstreams (see robotology#1736) due
to internal dependencies (e.g. TinyXML) not being found.
PeterBowman added a commit to PeterBowman/yarp that referenced this issue Jun 13, 2018
This is a follow up to robotology#1733 for non-static YARP builds, which
were prone to cause similar errors in downstreams (see robotology#1736) due
to internal dependencies (e.g. TinyXML) not being found.
@drdanz
Copy link
Member

drdanz commented Jun 25, 2018

@traversaro is this still an issue with latest master?

@drdanz drdanz added Issue Type: Bug Involves some intervention from a system administrator Component: CMake Severity: Release Blocker labels Jun 25, 2018
@traversaro
Copy link
Member Author

Given that robot-testing and icub-tests seem to be working fine in devel (I think @diegoferigo checked this) I think this issue can be closed.

@PeterBowman
Copy link
Member

I just ran into this on YARP 3.9, but the issue disappeared after cleaning the build folder and reconfiguring from scratch. I noticed the presence of a build/YARP_priv_tinyxml/ directory (it was not re-generated after the cleanup), and that the YARP_manager and YARP_robotinterface components had a find_dependency(YARP_priv_TinyXML) line in their xxxConfig.cmake file. Obviously, the names don't match, note the different letter casing: tinyxml vs TinyXML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CMake Fixed in: YARP v3.0.1 Issue Type: Bug Involves some intervention from a system administrator Resolution: Fixed
Projects
None yet
Development

No branches or pull requests

4 participants