Open traversaro opened 5 years ago
A possible workaround is to manually search the required component dependency before the component actually required:
find_package(YARP 3.0 COMPONENTS math manager REQUIRED)
It is possible that the PRIVATE_DEPENDENCIES argument logic in https://github.com/robotology/yarp/blob/master/src/libYARP_manager/CMakeLists.txt#L129 is broken?
I did not check, but I guess the issue could be due to the fact that I use YCM 0.10 .
If the project is icub-tests, it is fixed in the robottestingframework-2
branch. The manager component is not used. The manager component is built and installed only if the yarpmanager or yarpmanager-console are built, are you sure they are compiled in the superbuild?
Yes, they are compiled. Adding the math component works fine, so the manager seems to be installed.
I encountered the same error, maybe this (pretty long) log might help. Just reach the end where it fails.
Here the related CMake configuration.
@diegoferigo sorry, I forgot to forward merge https://github.com/robotology/icub-tests/pull/46 to devel.
Should have been fixed (in icub-tests) by https://github.com/robotology/icub-tests/commit/b05df9753ccd1963c83cb0066cb8064e8f5ad673 .
Yes, it seems fixed, great! Thank you
Should have been fixed (in icub-tests) by robotology/icub-tests@b05df97 .
Shall we close this issue?
I think we should still test and eventually fix this
I tested now with YARP 3.4.3 and the issue is still there, if I configure:
cmake_minimum_required(VERSION 3.12)
project (hello)
find_package(YARP 3.0 COMPONENTS manager REQUIRED)
It fails with:
(yarp1989) traversaro@IITICUBLAP102:~/yarp1989_test/build$ cmake .
CMake Error at /home/traversaro/miniforge3/envs/yarp1989/lib/cmake/YARP/YARPConfig.cmake:162 (find_package):
Found package configuration file:
/home/traversaro/miniforge3/envs/yarp1989/lib/cmake/YARP_manager/YARP_managerConfig.cmake
but it set YARP_manager_FOUND to FALSE so package "YARP_manager" is
considered to be NOT FOUND. Reason given by package:
The following imported targets are referenced, but are missing:
YARP::YARP_sig YARP::YARP_math
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/traversaro/yarp1989_test/build/CMakeFiles/CMakeOutput.log".
the workaround is simply to list the transitive dependencies, i.e. this works fine:
cmake_minimum_required(VERSION 3.12)
project (hello)
find_package(YARP 3.0 COMPONENTS math sig manager REQUIRED)
@Nicogene not sure why you assigned this to me back in time (probably you assumed that it was fixed), but I think I can remove myself from the assignee list.
This issue has the same origin of https://github.com/robotology/yarp/issues/2861#issuecomment-1165438123 . In a nutshell, the problem is that libYARP_manager
is hardcoded to be a static library.
Describe the bug A project that contains:
fails to configure with the latest YARP master branch, with the following error:
To Reproduce For an example project, try to configure the current icub-tests master branch against YARP master branch.
Expected behavior The configuration should work correctly.
Configuration (please complete the following information):
Additional context Related robotology-superbuild issue: https://github.com/robotology/robotology-superbuild/issues/192 .