Test matrix of C-spec versions in CI#16564
Open
jakelishman wants to merge 2 commits into
Open
Conversation
Collaborator
|
One or more of the following people are relevant to this code:
|
jakelishman
force-pushed
the
c/ci-version-matrix
branch
2 times, most recently
from
July 10, 2026 14:52
7345a65 to
5cbd452
Compare
Our `CMakeLists.txt` file was previously leaving this undefined, and so using the defaults of whatever build tool came along. This could mean that newer toolchains would build in different modes, and thus see different behaviours. Here, we set the test defaults to match exactly Qiskit's minimum C compiler requirements without extensions. This recently occurred for Qiskit v2.5, where the bump to `cbindgen==0.29.3`[^1] changed the behaviour of fixed-width `enum` exports to use the new C23 / C++-like `enum X : <ty>` syntax, gated on the reported language-spec[^2]. Recent `gcc` (15+) default to `-std=gnu23`, so packagers for recent Linux distros saw new build failures in the C test suite that were uncaught by CI[^3]. A follow-up commit can modify our CI to explicitly test a range of C language versions. [^1]: 3e8d124: Bump cbindgen from 0.29.2 to 0.29.3 (Qiskit#16300) [^2]: mozilla/cbindgen@b16c1d2025: Use C++ fixed-type enumeration syntax under C23 (or higher) as well [^3]: Qiskit#16555
We run most C tests with the defaults set in CMake (which should reflect our minimum version required), but we still want coverage of other common versions people might build against, especially since our header files have conditional defines based on version.
jakelishman
force-pushed
the
c/ci-version-matrix
branch
from
July 10, 2026 15:54
5cbd452 to
e30ab94
Compare
Member
Author
|
cc @iyanmv: between this PR and its logical parents #16562 and #16561, hopefully this should address the packaging concerns, and do our best to avoid later regressions in them. I was able to reproduce several similar failures to what you were seeing on an Arch box without these PRs, and checked that it's now fixed. The default for |
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.
We run most C tests with the defaults set in CMake (which should reflect our minimum version required), but we still want coverage of other common versions people might build against, especially since our header files have conditional defines based on version.
Built on #16562.
AI/LLM disclosure