Skip to content

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 #392

Description

@Debojit-D

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][1])
  • Note that gRPC is a large dependency: ([GitHub][1])
  • CMake IPO flag (CMAKE_INTERPROCEDURAL_OPTIMIZATION) reference: ([GitLab][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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions