Stabilize CodeQL by pinning default compiler aliases to gcc-14 - #213
Merged
Conversation
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Copilot
AI
changed the title
Force CodeQL to use gcc-14 default compiler aliases
Stabilize CodeQL by pinning default compiler aliases to gcc-14
Aug 14, 2026
Copilot created this pull request from a session on behalf of
clauspruefer
August 14, 2026 08:46
View session
clauspruefer
approved these changes
Aug 14, 2026
clauspruefer
left a comment
Member
There was a problem hiding this comment.
If that does not work, we will get a problem.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the CodeQL Analyze (c-cpp) workflow by ensuring the generic compiler entrypoints (cc/c++) are pinned to the intended gcc-14/g++-14 toolchain, preventing GitHub runner image drift from changing the effective compiler used during CodeQL builds.
Changes:
- Add
update-alternativesentries and explicit--setcalls for/usr/bin/ccand/usr/bin/c++to point togcc-14/g++-14. - Update the build step to use
CC=cc,CXX=c++, and configure CMake with-DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++. - Expand diagnostic output to show
whichand version output forgcc,g++,cc, andc++.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Analyze (c-cpp)job was still resolving the build through the runner’s generic compiler entrypoints, which allowed image drift to bypass the intendedgcc-14/g++-14toolchain. That made the CodeQL build unstable and led to recurring failures on#include <generator>despite the project compiling correctly on known-good environments.Root cause
gcc-14/g++-14, but did not force the generic aliasesccandc++.c++, so the effective compiler could change with the runner image.What changed
gcc -> gcc-14g++ -> g++-14cc -> gcc-14c++ -> g++-14cc/c++instead of naminggcc-14/g++-14directly, so the workflow follows the exact compiler path CodeQL uses in practice.Why this is more stable
cc/c++happen to point to after a GitHub runner image update.Workflow shape