Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meson rewrite requires a C compiler to operate and fails if the wrong one is picked #13984

Open
KaruroChori opened this issue Dec 8, 2024 · 0 comments

Comments

@KaruroChori
Copy link

KaruroChori commented Dec 8, 2024

Describe the bug
When using meson rewrite to update the project version, it fails with a message like:

meson.build:1:0: ERROR: None of values ['gnu23'] are supported by the C compiler. Possible values for option "C_std" are ['none', 'c89', 'c99', 'c11', 'c17', 'c18', 'c2x', 'gnu89', 'gnu99', 'gnu11', 'gnu17', 'gnu18', 'gnu2x']

which is true, the project I am testing it on uses gnu23.
However by default meson is taking an old version of gcc as default compiler and not clang-19 which I set in a native-file.
Manually setting CC=clang-19 before running meson rewrite solves the issue.

To Reproduce
It is quite hard to replicate my exact configuration due to the specific requirements, but the bug description contains all the relevant information.

Expected behavior
I would expect a rewrite system for configuration files not to force the presence of a compiler upon the user. That meson file is going to run with a separate command regardless and with all the required context, so if its content is wrong it would just be shown later on.

@KaruroChori KaruroChori changed the title Meson rewrite requires a C compiler to operate Meson rewrite requires a C compiler to operate and fails if the wrong one is picked Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant