Declared meson_version >= 1.1 too low: c_std=gnu23 requires meson 1.4+

Open Beginner friendly
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
c
Domain
build-system

Research direction

Open meson.build and inspect the project() declaration and its meson_version setting. Run meson setup with the declared minimum version to reproduce the current parse error. Done means the minimum is bumped to 1.4 and setup no longer rejects c_std=gnu23.

Written by the indexing model from the issue text.

Description

Summary

meson.build declares meson_version : '>= 1.1', but the project sets c_std=gnu23 in default_options. Meson did not learn the gnu23 value until 1.4. Anyone on the declared minimum version sees a hard parse error at meson setup.

Repro

$ meson --version
1.3.2
$ meson setup build
meson.build:1:0: ERROR: Unknown C std ['gnu23']. Possible values are ['none', 'c89', ..., 'gnu2x', ...].

This is what ships in Ubuntu 24.04's apt (meson 1.3.2), so it bites cleanly on a fresh install.

Suggested fix

Bump the declared minimum:

project('ncc', 'c',
  version : '0.1.0',
  meson_version : '>= 1.4',
  ...)

Encountered while validating PR #1 (Windows portability) on a fresh Ubuntu 24.04 environment. Worked around by upgrading meson via pipx install meson (1.11.1).

Dominant language
C
Stars
0
Forks
1
Avg merge
1d 17h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crashappsec/ncc

All issues in crashappsec/ncc

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.