martinpitt / umockdev

Mock hardware devices for creating unit tests and bug reporting
https://launchpad.net/umockdev
GNU Lesser General Public License v2.1
314 stars 58 forks source link

Build failing when using meson 1.4.0rc1 #228

Closed DimStar77 closed 8 months ago

DimStar77 commented 9 months ago

In order to test the impact of Meson 1.4.0 , I upgraded a test repository of openSUSE Tumbleweed to this new version,

Out of the builds, umockdev is failing (seems its failing similar to what that HACK commit addresses, which was done in Gentoo? Did Gentoo update to a 1.4 pre-release of meson?)

I get plenty of these errors:

[   12s] umockdev-record.p/src/umockdev-record.c:1141:22: error: unused variable ‘_line_collection_size_’ [-Werror=unused-variable]
[   12s]  1141 |                 gint _line_collection_size_ = 0;
[   12s]       |                      ^~~~~~~~~~~~~~~~~~~~~~

Simply going back to meson 1.3.2 makes umockdev build pass (CC @jpakkane / meson release maintainer)

(full build log can be found at https://build.opensuse.org/build/GNOME:Next/openSUSE_Factory/x86_64/umockdev/_log )

DimStar77 commented 9 months ago

git bisected this on the meson side to https://github.com/mesonbuild/meson/commit/5f659af870011e74299d1455a65c2cd5f5ace51f - aka https://github.com/mesonbuild/meson/pull/12597

martinpitt commented 9 months ago

Oooh thanks @DimStar77 for figuring that out! :100: I first saw this in the Gentoo build, and suspected gcc 14 or related, but couldn't find a meaningful difference. So I applied commit 539af0b4f36a40d1f85529cbeef401667e64e7f3.

So I suppose that should just become the new default. This makes sense at last!

DimStar77 commented 9 months ago

I first saw this in the Gentoo build, and suspected gcc 14 or related, but couldn't find a meaningful difference.

gentoo backported that vala fix from meson 1.4 into their package with https://github.com/gentoo/gentoo/pull/34141

DimStar77 commented 9 months ago

So I suppose that should just become the new default. This makes sense at last!

on openSUSE, I added this to umockdev.spec: export CFLAGS="-Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable %{optflags}"

thesamesam commented 8 months ago

By the way, feel free to CC me if there's anything like this which shows up for Gentoo which I might be able to give insight on. Happy to help!

martinpitt commented 8 months ago

Thanks @thesamesam It seems to be quite happy now, aside from the ugliness of #226.. (but that's not Gentoo specific at all).