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

Critical bug in using ycm_ep_helper with a non-bootstrapped (i.e. found via find_package) YCM #469

Open
traversaro opened this issue Dec 18, 2024 · 4 comments

Comments

@traversaro
Copy link
Member

@MSECode in icub-tech-iit/docker-deployment-images#35 (comment) found a critical bug. If one consumes ycm via find_package and then calls ycm_ep_helper, an error occurs.

conda create -n testrobsub cmake pkg-config cxx-compiler make ninja ycm-cmake-modules
conda activate testrobsub
git clone https://github.com/robotology/robotology-superbuild/
cd robotology-superbuild/
cmake -Bbuild -S.

it fails with:

(testrobsub2) traversaro@IITBMP014LW012:~/testrobsub2/robotology-superbuild$ cmake -Bbuild -S.
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/traversaro/miniforge3/envs/testrobsub2/bin/x86_64-conda-linux-gnu-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/traversaro/miniforge3/envs/testrobsub2/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- YCM found in /home/traversaro/miniforge3/envs/testrobsub2/share/YCM.
CMake Error: File /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/YCMEPHelper/gitsafeclone.txt.in does not exist.
CMake Error at /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/YCMEPHelper.cmake:883 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/YCMEPHelper.cmake:1242 (_ycm_ep_write_gitclone_script)
  cmake/BuildYCM.cmake:8 (ycm_ep_helper)
  /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/BuildYARP.cmake:8 (find_or_build_package)
  /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/RobotologySuperbuildLogic.cmake:68 (find_or_build_package)
  CMakeLists.txt:67 (include)


CMake Error: File /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/YCMEPHelper/RepositoryInfo.txt.in does not exist.
CMake Error at /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/YCMEPHelper.cmake:1272 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  cmake/BuildYCM.cmake:8 (ycm_ep_helper)
  /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/BuildYARP.cmake:8 (find_or_build_package)
  /home/traversaro/miniforge3/envs/testrobsub2/share/YCM/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/RobotologySuperbuildLogic.cmake:68 (find_or_build_package)
  CMakeLists.txt:67 (include)

@traversaro
Copy link
Member Author

The error went unnoticed as most users of the superbuild (i.e. the robotology-superbuild) use YCM via bootstrap/FetchContent.

@traversaro traversaro transferred this issue from robotology/robotology-superbuild Dec 18, 2024
@traversaro
Copy link
Member Author

As a first step in handling the issue, in #468 I added a test in the CI that tries to run the configuration of the robotology-superbuild as part of the CI, so that a problem like that can be detected as early as possible.

@traversaro
Copy link
Member Author

The regression is probably in #457, so it affects YCM versions from 0.16.7 to 0.18.0 only when used with CMake >= 3.22 .

@traversaro
Copy link
Member Author

A fix and test to prevent similar failures to happen in the future are provided in #468 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant