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

CMake error when trying to compile the superbuild with Yarp #121

Closed
gabrielenava opened this issue Sep 24, 2018 · 3 comments
Closed

CMake error when trying to compile the superbuild with Yarp #121

gabrielenava opened this issue Sep 24, 2018 · 3 comments
Labels

Comments

@gabrielenava
Copy link
Collaborator

gabrielenava commented Sep 24, 2018

I downloaded from scratch the robotology-superbuild on my laptop and I tried to compile it. I do not have Yarp installed on my lapotop, it is supposed to be installed together with the superbuild. Nevertheless, when I tried to compile the project I got the following error:

 CMake Error at /home/gnava/Software/github/INSTALL/lib/ICUBcontrib/ICUBcontribConfig.cmake:7 (find_package):
   By not providing "FindYARP.cmake" in CMAKE_MODULE_PATH this project has
   asked CMake to find a package configuration file provided by "YARP", but
   CMake did not find one.

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

     YARPConfig.cmake
     yarp-config.cmake

   Add the installation prefix of "YARP" to CMAKE_PREFIX_PATH or set
   "YARP_DIR" to a directory containing one of the above files.  If "YARP"
   provides a separate development package or SDK, be sure it has been
   installed.
 Call Stack (most recent call first):
   build/install/share/YCM/modules/FindOrBuildPackage.cmake:180 (find_package)
   CMakeLists.txt:111 (find_or_build_package)

Maybe some path got broken recently?

I have Ubuntu 16.04 as OS

Note: I reverted back to this commit: 685a3df and I had no issues.

@traversaro
Copy link
Member

I guess you have an external installation of ICUBcontrib install as CMAKE_INSTALL_PREFIX : /home/gnava/Software/github/INSTALL/, that was configured with a YARP installation that is not anymore installed or not anymore present in the CMAKE_PREFIX_PATH.

@gabrielenava
Copy link
Collaborator Author

I guess you have an external installation of ICUBcontrib install as CMAKE_INSTALL_PREFIX : /home/gnava/Software/github/INSTALL/, that was configured with a YARP installation that is not anymore installed or not anymore present in the CMAKE_PREFIX_PATH.

Yes, I have it. Ok then I will address this on my pc thanks!

@traversaro
Copy link
Member

Exactly, ICUBcontrib is now a project handled in the superbuild, so you either:

  • Install it with the superbuild
    or
  • use it externally, but all its dependencies should also be installed externally (in this case, YARP)

traversaro added a commit that referenced this issue Apr 26, 2020
During the past years, we experienced quite a lot of times that for some reason on a setup 
the superbuild was finding its own installed packages, or finding the one of a similar superbuild 
installed on another setup. As recovering from this kind of errors is tricky for users, and as 
most of robotology-superbuild users do not need to find  the packages installed by the superbuild in 
their system, the YCM_DISABLE_SYSTEM_PACKAGES option was introduced in YCM 
( see robotology/ycm-cmake-modules#332 )  to disable the use of 
any system installed package if the same package can be installed by the superbuild (equivalent of setting 
all the USE_SYSTEM_<project> options to OFF). 

This option is set by default to `OFF` on YCM for backward compatibility, but to avoid all the problems in the superbuild
we set it to `ON` by default. If an expert user want to be able to find system-installed packages (for example because he has a 
system-installed YARP) he just need to set it at `ON`. 

The option is still not supported in the stable released version of YCM, so I will not update the README for now, but 
it will be already effective if a users specifies uses `Unstable` `ROBOTOLOGY_PROJECT_TAGS`, so for example it  will be 
already useful  for the iCubGenova01 setup @randaz81 @xEnVrE .

Related issues: 
* #121
* #174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants