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 fails when using YCM master branch #819

Closed
S-Dafarra opened this issue Jul 8, 2021 · 5 comments
Closed

CMake fails when using YCM master branch #819

S-Dafarra opened this issue Jul 8, 2021 · 5 comments

Comments

@S-Dafarra
Copy link
Collaborator

Steps to reproduce:

  • git clone https://github.com/robotology/robotology-superbuild
  • cd robotology-superbuild/ && mkdir build && cd build/ && cmake ../
  • cd ../src/YCM/
  • git checkout master
  • cd ../../build
  • cmake .

Then, I get the following error

-- YCM not found. Bootstrapping it.
-- Downloading YCMEPHelper.cmake - Attempt 1 of 3
-- Downloading YCMEPHelper.cmake - SUCCESS
-- Downloading StyleGITHUB.cmake - Attempt 1 of 3
-- Downloading StyleGITHUB.cmake - SUCCESS
-- Performing download step (git clone) for 'YCM'
-- Performing update step for 'YCM'
CMake Error at build/CMakeFiles/YCMEPHelper.cmake:1377 (message):
  Cannot update YCM repository
Call Stack (most recent call first):
  cmake/YCMBootstrap.cmake:114 (ycm_bootstrap)
  CMakeLists.txt:56 (include)


-- Configuring incomplete, errors occurred!
See also "/home/sdafarra/Software/temp/robotology-superbuild/build/CMakeFiles/CMakeOutput.log".
See also "/home/sdafarra/Software/temp/robotology-superbuild/build/CMakeFiles/CMakeError.log".
@traversaro
Copy link
Member

I can't reproduce the issue, I guess it was some kind of temporary problem on YCM master. I will close this issue, but feel free re-open if the problem persists.

@mebbaid
Copy link

mebbaid commented Jul 18, 2022

I am trying to make a docker image, and part of the Dockerfile I do;

RUN git clone https://github.com/robotology/robotology-superbuild.git && \
    cd robotology-superbuild && \
    git checkout v2021.08.1 && \
    mkdir -p build && cd build &&\
    cmake -GNinja \
    -DCMAKE_BUILD_TYPE=Release \
    -DNON_INTERACTIVE_BUILD:BOOL=ON \
    -DROBOTOLOGY_ENABLE_CORE:BOOL=ON \
    -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON \
    -DROBOTOLOGY_USES_GAZEBO:BOOL=ON \
    -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF \
    -DROBOTOLOGY_USES_PYTHON:BOOL=OFF \
    -DROBOTOLOGY_USES_MATLAB:BOOL=OFF \
    -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON .. && \
    cmake --build . && \
    cd ../src/bipedal-locomotion-framework && \
    git checkout 6cfe29fcfdd5c598bb0baa809b91c96139e4bcf1 && \
    cp /home/$USERNAME/ReducedModelControllers/* /src/ReducedModelControllers/* && \
    cd ../icub-models && \
    cp /home/$USERNAME/icub-models.patch . && \
    git apply ./icub-models.patch && \
    cd ../../build/src/bipedal-locomotion-framework && \
    cmake . && cmake --build . --target install && \
    cd ../icub-models && \
    cmake . && cmake --build . --target install && \
    cd /home/${USERNAME}/robotology-superbuild/build && \
    find . -mindepth 1 ! -regex '^./install\(/.*\)?' -delete

For which when i run docker build, I get the same error above; i.e. the output in the terminal is

-- YCM not found. Bootstrapping it.
-- Downloading YCMEPHelper.cmake - Attempt 1 of 3
-- Downloading YCMEPHelper.cmake - SUCCESS
-- Downloading CMakeParseArguments.cmake - Attempt 1 of 3
-- Downloading CMakeParseArguments.cmake - SUCCESS
-- Downloading ExternalProject.cmake - Attempt 1 of 3
-- Downloading ExternalProject.cmake - SUCCESS
-- Downloading StyleGITHUB.cmake - Attempt 1 of 3
-- Downloading StyleGITHUB.cmake - SUCCESS
-- Performing download step (git clone) for 'YCM'
-- Performing update step for 'YCM'
-- Performing configure step for 'YCM'
-- Performing uninstall step for 'YCM'
-- Performing build step for 'YCM'
CMake Error at build/CMakeFiles/YCMEPHelper.cmake:1411 (message):
  Cannot build YCM
Call Stack (most recent call first):
  cmake/YCMBootstrap.cmake:102 (ycm_bootstrap)
  CMakeLists.txt:56 (include)


-- Configuring incomplete, errors occurred!
See also "/home/user/robotology-superbuild/build/CMakeFiles/CMakeOutput.log".

Note that I am trying to build the robotology-superbuild with the release-tag v2021.08.1 in this case.

Any hints on how to proceed forward.

@traversaro
Copy link
Member

@mebbaid Can you please open a new issue? Cannot build YCM is quite the generic error, so it is possible that your error is completly unrelated from the original one of @S-Dafarra, and in general it is tricky to work on closed issues, because you do not know when the "new reply" is addressed or not.

Anyhow, two suggestions:

First Suggestion

You can configure cmake with -DYCM_BOOTSTRAP_VERBOSE:BOOL=ON to get a more verbose error on what is going on.

Second Suggestion

Unfortunatly the YCM bootstrap was intrinsically quite fragile, especially before the improvements in robotology/ycm-cmake-modules#403 and robotology/ycm-cmake-modules#402 . However, you can almost the same behaviour by manually compiling the exact version of YCM before compiling the superbuild (that is 0.13.0, see https://icub-tech-iit.github.io/documentation/sw_versioning_table/2021.08.1/), so that the superbuild will find the installed YCM:

git clone -b v0.13.0 https://github.com/robotology/ycm
cd ycm
mkdir -p build && cd build && cmake -GNinja .. & ninja install

this should either work, or at least provide a more easy error to deal with.

@traversaro
Copy link
Member

Actually v0.13.0 probably will not work due to robotology/ycm-cmake-modules#419 . Probably you can download and extract the offline archive (https://github.com/robotology/ycm/releases/download/v0.13.0/ycm-0.13.0-offline.tar.gz) as a workaround.

@mebbaid
Copy link

mebbaid commented Jul 19, 2022

Indeed that was the issue. Thanks for the help !!

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

3 participants