Skip to content

Support project-local bootstrap tools and offline builds from mcpp.toml #990

Open

Description

@UsmanTariq2

I’m using mcpp 2026.11.20.1 on Fedora 45 x86_64. I want one project to use Fedora’s GCC and glibc, plus newer GNU Binutils and Linux userspace headers stored inside the project. This is useful when a distribution or the xlings index hasn’t packaged a version the project needs.

The build itself works. My hello_world project builds and runs with Fedora GCC 16.2.1, project-local Binutils 2.47, and Linux headers 7.3.5. The tests pass for offline mode using local source dependencies and we have a working build

What requires a workaround
mcpp.toml can already select the compiler, headers, and sysroot. However, mcpp build --offline still checks the global mcpp home for its bootstrap tools. With an empty global package store, it fails before compiling:
error: patchelf missing: ~/.mcpp/registry/data/xpkgs/xim-x-patchelf/0.18.0/bin/patchelf

I worked around this by creating a project-local mcpp home, linking Fedora’s Ninja and a locally downloaded patchelf into the paths mcpp expects, and running:
MCPP_HOME="$PWD/.mcpp/local-home" mcpp build --offline

I use a small shell script to set those options each time. mcpp self init --home can remember a home across invocations, but that selection applies to the installation as a whole. I want this setup to apply to one project.
Requested behavior

Could mcpp provide a supported way for a project to declare local bootstrap tools and disable automatic downloads? Like without the launch command parameters. This seems like a parameter that should be settable in config file or something idk

The goal is to make a local-only build reproducible from the project configuration, without a launcher script or manually placing links in xlings’ internal package layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions