google-deepmind / google-deepmind/mujoco_mpc
Build fails on Ubuntu 22.04 (Jammy) with both `clang-12` and `g++-12` — missing GCC toolchain + ICEs in Abseil when IPO/LTO is enabled
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I’m trying to build **mujoco_mpc** on Ubuntu 22.04 in a Conda env (`mj`, Python 3.10). The README mentions MJPC is tested on Ubuntu 20.04 with `clang-12` and provides a `clang-12` toolchain example. On 22.04, I consistently hit:
1. **C toolchain “cannot find crtbegin.o / -lgcc”** when configuring with `clang-12` (appears related to GCC toolchain detection when running under Conda CMake), and
2. After working around that, **internal compiler errors / segfaults** while compiling Abseil (and other deps) with C++20 when interprocedural optimization / LTO is on (ThinLTO with clang, auto LTO with GCC).
Links for context:
* README install matrix & `clang-12` toolchain example (Ubuntu 20.04): ([[GitHub](https://github.com/google-deepmind/mujoco_mpc)][1])
* Note that gRPC is a large dependency: ([[GitHub](https://github.com/google-deepmind/mujoco_mpc)][1])
* CMake IPO flag (`CMAKE_INTERPROCEDURAL_OPTIMIZATION`) reference: ([[GitLab](https://gitlab.kitware.com/cmake/cmake/-/blob/9fe70fd76412f41ab2bec24ba42b081b48691961/Help/variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst?utm_source=chatgpt.com)][2])
### Environment
* **OS:** Ubuntu 22.04.4 LTS (Jammy)
* **Compiler(s):**
* `clang-12` (Ubuntu clang version 12.0.1-19ubuntu3)
* `gcc/g++-12` (12.3.0-1ubuntu1~22.04.2)
* **CMake:** 3.31.8 (from Conda, visible as `/home/.../miniconda3/envs/mj/share/cmake-3.31`)
* **Ninja:** from Conda
* **Conda env:** `mj` (Python 3.10.18)
* **Packages installed via APT (subset):** `build-essential`, `libstdc++-12-dev`, `libgcc-12-dev`, `g++-12`, `clang-12`, `libc6-dev`
Contributor guide
Assessment
This issue has not been assessed yet.