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

Make vala C code errors non-fatal #229

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Make vala C code errors non-fatal #229

merged 2 commits into from
Mar 1, 2024

Conversation

martinpitt
Copy link
Owner

meson 1.4 stopped hiding valac's warnings [1], which fails compilation
due to our -Werror= settings. There's not much that we can do at this
point, so stop making them non-fatal.

This reverts the gentoo-hacks option from commit 539af0b. Turns
out that this wasn't a compiler change in Gentoo after all, but that
Gentoo backported [2] that meson change at that time.

Many thanks to Dominique Leuenberger @DimStar77 for tracking down the
root cause!

Fixes #228

[1] mesonbuild/meson@5f659af870011e
[2] gentoo/gentoo#34141

Avoid directly accessing `.data()`, use the `.steal()` API instead which
does proper type coercion.

```
umockdev-record.c:418:27: note: expected ‘gchar **’ {aka ‘char **’} but argument is of type ‘void **’
../../source/src/umockdev-record.vala:64:72: error: pointer type mismatch in conditional expression [-Werror]
```
@martinpitt
Copy link
Owner Author

Meh, rawhide and also fedora:latest fail with

error: unknown warning option '-Werror=discarded-qualifiers'; did you mean '-Werror=ignored-qualifiers'? [-Werror,-Wunknown-warning-option]

No, ignored-qualifiers does not work, Gentoo fails with that. So I suppose there needs to be a way to detect whether gcc supports a particular warning?

@martinpitt
Copy link
Owner Author

meson 1.4 stopped hiding valac's warnings [1], which fails compilation
due to our `-Werror=` settings. There's not much that we can do at this
point, so stop making them non-fatal.

This reverts the `gentoo-hacks` option from commit 539af0b. Turns
out that this wasn't a compiler change in Gentoo after all, but that
Gentoo backported [2] that meson change at that time.

Many thanks to Dominique Leuenberger @DimStar77 for tracking down the
root cause!

Fixes #228

[1] mesonbuild/meson@5f659af870011e
[2] gentoo/gentoo#34141
@martinpitt martinpitt merged commit 7977c85 into main Mar 1, 2024
24 of 26 checks passed
@martinpitt martinpitt deleted the warnings branch March 1, 2024 16:05
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

Successfully merging this pull request may close these issues.

Build failing when using meson 1.4.0rc1
1 participant