google-deepmind / mujoco_mpc

Real-time behaviour synthesis with MuJoCo, using Predictive Control
https://github.com/deepmind/mujoco_mpc
Apache License 2.0
952 stars 142 forks source link

Mujoco commit 1afd98e breaks the cmake config #185

Closed nkhosh closed 11 months ago

nkhosh commented 11 months ago

I get the following cmake error since this commit on mujoco:

[cmake] FAILED: sdflib-populate-prefix/src/sdflib-populate-stamp/sdflib-populate-patch ~/mujoco_mpc/build/_deps/sdflib-subbuild/sdflib-populate-prefix/src/sdflib-populate-stamp/sdflib-populate-patch [cmake] cd ~/mujoco_mpc/build/_deps/sdflib-src && git apply --reject --whitespace=fix ~/mujoco_mpc/cmake/sdflib-optional-dependencies.patch && /usr/bin/cmake -E touch ~/mujoco_mpc/build/_deps/sdflib-subbuild/sdflib-populate-prefix/src/sdflib-populate-stamp/sdflib-populate-patch [cmake] error: can't open patch '~/mujoco_mpc/cmake/sdflib-optional-dependencies.patch': No such file or directory [cmake] ninja: build stopped: subcommand failed.

I reverted back to the previous commit on my side so I'm not blocked by this, just reporting.

OSKOOO commented 11 months ago

I ran into the same issue. It seems like the path generated by ${_ARGS_PATCH_COMMAND} in mujoco_mpc/cmake/FindOrFetch.cmake is incorrect. I fixed it manually by navigating to FindOrFetch.cmake and then after line 114 I use:

  if("${_ARGS_LIBRARY_NAME}" STREQUAL "sdflib")
    set(_ARGS_PATCH_COMMAND "git;apply;--reject;--whitespace=fix;${CMAKE_SOURCE_DIR}/build/_deps/mujoco-src/cmake/sdflib-optional-dependencies.patch")
    endif()    
quagla commented 11 months ago

This is now fixed. Thanks for reporting.