I have created https://build.opensuse.org/request/show/1185237 which contains just the configury bits of the patch from comment #1 and then added -fpermissive to the optflags in the spec file. This is the safest we can do without diverging from the upstream too much, which is where the issues will hopefully be solved when GCC 14 is more widespread. I plan to keep this bug opened so that the need for -fpermissive can be reviewed in the future.