You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcpp misdetects Fedora GCC 16.2.1 as GCC 3 with an explicit local toolchain #989
On Fedora 45 x86_64, mcpp 2026.11.20.1 detects the system GCC as version 3 when I explicitly configure /usr as a local GCC toolchain. A generated hello_world project then fails because mcpp thinks the compiler is too old for import std;.
Steps to reproduce
Run mcpp new hello_world on Fedora 45 with gcc-c++-16.2.1-3.fc45.x86_64 installed.
Add the following to hello_world/mcpp.toml:
[toolchain]
default = { path = "/usr", family = "gcc" }
From the project directory, run:
MCPP_SYSROOT=glibc@system mcpp build --offline --cache=off --no-color
Actual behavior
Using toolchain gcc 3 ← /usr
error: gcc 3 (x86_64-redhat-linux) has no C++ modules, which GCC provides from 14: src/main.cpp imports std.
The system compiler reports:
$ /usr/bin/g++ --version
g++ (GCC) 16.2.1 20261029 (Red Hat 16.2.1-3)
$ /usr/bin/g++ -dumpfullversion
16.2.1
$ /usr/bin/g++ -dumpmachine
x86_64-redhat-linux
Expected behavior
mcpp should identify the explicitly selected Fedora compiler as GCC 16.2.1 and proceed with its normal import std checks. Querying GCC with -dumpfullversion may avoid misreading the distribution-specific version banner.
Workaround tested
In a scratch copy, a project-local wrapper returned a short version banner and normalized Fedora’s target name from x86_64-redhat-linux to x86_64-linux-gnu so mcpp would apply the native GNU/Linux sysroot settings. The wrapper forwarded all actual compile and link commands to /usr/bin/g++. With glibc@system and cxx_runtime = "host-coupled", hello_world compiled and ran using Fedora’s compiler and runtime.
Activity
design 2026-11-21: offline, host inputs and toolchain defaults (mcpp#…
Sunrisepeak commentedon Nov 21, 2026
I will fix it
2026.11.21.1: the test and CI design (mtest 0.11), the home's unit ca…
Sunrisepeak commentedon Nov 21, 2026
try use "xlings update mcpp -y" update to latest version. then
mcpp.toml
UsmanTariq2 commentedon Nov 22, 2026
Fixed