mujoco_mpc icon indicating copy to clipboard operation
mujoco_mpc copied to clipboard

MJPC on Ubuntu

Open vikashplus opened this issue 1 year ago • 10 comments

I'm facing compilation issues with MJPC on Ubuntu. I followed the build instructions mentioned here. Here are all the options that I tried

I'm curious if the Ubuntu build is supported at the moment. The error logs are build-related, quite long, and different for different settings. Please let me know if it will help to add the logs here.

vikashplus avatar Feb 07 '24 00:02 vikashplus

Update: So the secret sauce so far is dba4bd8d51b2233e637e00e1625593890bf4abaf and Clang 12.0.0

sudo apt install clang-12

vikashplus avatar Feb 07 '24 00:02 vikashplus

Would you like to send a PR to update the documentation?

yuvaltassa avatar Feb 07 '24 08:02 yuvaltassa

It's a workaround for now. @thowell is getting his Ubuntu machine soon. Expect a PR once we have a watertight solution that will work more broadly.

vikashplus avatar Feb 07 '24 15:02 vikashplus

I just did a fresh install of Ubuntu 23.10 and didn't run into any build problems with MJPC when following the instructions on the README. I used clang 16.0.6.

thowell avatar Feb 10 '24 16:02 thowell

I am on Ubuntu 20.04

A few thoughts

  • Seems like there is a dependency on a compiler.
  • Should we clarify which compiler to use?
  • Should we add compiler install instructions to read me?

sudo apt-get install clang-12

vikashplus avatar Feb 10 '24 16:02 vikashplus

Tested with a fresh install of Ubuntu 22.04 with clang-12 and that worked as well. I will update the README to include this step and to look at the build.yml if troubleshooting an install.

thowell avatar Feb 12 '24 01:02 thowell

@vikashplus should we add any additional instructions? #286

thowell avatar Feb 12 '24 01:02 thowell

Clang 12 is the primary thing for the setup I tested for. Let's merge for now. I'll update you if I learn anything new.

vikashplus avatar Feb 12 '24 04:02 vikashplus

I think we should put a note on the main page to use Clang12, Clang12++.

I did the following to get things to compile on ubuntu 20. with gcc, it errors around 70%

mkdir build
cd build
sudo apt-get install clang-12
CXX=clang12++ CC=clang12 cmake ..
make -j 5

richardrl avatar Mar 09 '24 04:03 richardrl

@vikashplus please see #324

thowell avatar May 19 '24 17:05 thowell