build issues
when I build the code using the code "cmake .. -DCMAKE_BUILD_TYPE:STRING=Release -G Ninja -DCMAKE_C_COMPILER:STRING=clang-12 -DCMAKE_CXX_COMPILER:STRING=clang++-12 -DMJPC_BUILD_GRPC_SERVICE:BOOL=ON"
It failed with the error :
CMake Error at mujoco-subbuild/mujoco-populate-prefix/tmp/mujoco-populate-gitclone.cmake:31 (message): Failed to clone repository: 'https://github.com/google-deepmind/mujoco.git'
FAILED: mujoco-populate-prefix/src/mujoco-populate-stamp/mujoco-populate-download /home/ss/mujoco_mpc/build/_deps/mujoco-subbuild/mujoco-populate-prefix/src/mujoco-populate-stamp/mujoco-populate-download cd /home/ss/mujoco_mpc/build/_deps && /usr/bin/cmake -P /home/ss/mujoco_mpc/build/_deps/mujoco-subbuild/mujoco-populate-prefix/tmp/mujoco-populate-gitclone.cmake && /usr/bin/cmake -E touch /home/ss/mujoco_mpc/build/_deps/mujoco-subbuild/mujoco-populate-prefix/src/mujoco-populate-stamp/mujoco-populate-download ninja: build stopped: subcommand failed.
CMake Error at /usr/share/cmake-3.22/Modules/FetchContent.cmake:1087 (message): Build step for mujoco failed: 1 Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216:EVAL:2 (__FetchContent_directPopulate) /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216 (cmake_language) cmake/FindOrFetch.cmake:126 (FetchContent_Populate) CMakeLists.txt:73 (findorfetch)
How can i solve it? (btw. the system is ubuntu 22.04)
Please see build.yml for the configurations that are tested for MJPC. Currently, Ubuntu 20.04 is tested.
If the build fails, try deleting the mujoco_mpc/build directory and rebuilding.
Based on the error provided, it looks like findorfetch failed to clone the MuJoCo repository. During the build process a number of packages will be cloned (see CMakeLists.txt) so it is important to have a reliable internet connection.