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

ubuntu xenial: Invalid arguments to find_dependency #84

Open
gavanderhoorn opened this issue May 22, 2020 · 5 comments
Open

ubuntu xenial: Invalid arguments to find_dependency #84

gavanderhoorn opened this issue May 22, 2020 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@gavanderhoorn
Copy link
Member

When attempting to build an application which depends on abb_librws with CMake, the build is aborted with the following error:

CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:45 (message):
  Invalid arguments to find_dependency
Call Stack (most recent call first):
  /home/user/ros_ws/devel/share/abb_librws/abb_librwsConfig.cmake:10 (find_dependency)
  CMakeLists.txt:39 (find_package)

This happens on an up-to-date Ubuntu Xenial, with CMake 3.5.1.

@gavanderhoorn gavanderhoorn added the bug Something isn't working label May 22, 2020
@gavanderhoorn
Copy link
Member Author

It looks like the cause is this line:

# Find dependencies
find_dependency(Poco 1.4.3 REQUIRED COMPONENTS Foundation Net Util XML)

CMake 3.5.1 does not support REQUIRED nor COMPONENTS in find_dependency(..).

@gavanderhoorn
Copy link
Member Author

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

@gavanderhoorn
Copy link
Member Author

@jontje: we may want to introduce a dummy package into the CI setup which exercises the CMake infrastructure installed as part of the install(..) of abb_librws. That would've let us know about this problem before merging #69.

@jontje
Copy link
Contributor

jontje commented May 22, 2020

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

For example use find_package instead? Are there any pros/cons?

@traversaro
Copy link
Contributor

Not sure we can actually do anything about this, other than not using find_dependency(..) here.

For example use find_package instead? Are there any pros/cons?

find_dependency just gives a fancier error message if a dep is not found, i.e. saying something similar to "abb_librws is not found because it was unable to find Poco" instead of just "Poco not found", so using find_package here is perfectly ok.

@gavanderhoorn gavanderhoorn added the good first issue Good for newcomers label Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

3 participants