Bugzilla – Bug 1225910
Package polkit does not build with gcc14 because of new errors
Last modified: 2024-07-12 13:40:39 UTC
GCC 14 newly by default treats as errors a number of situations which before were only warnings. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. Because of this, package polkit fails to compile. This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/polkit/standard/x86_64 It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc It seems that Gentoo have fixed a similar issue in https://bugs.gentoo.org/898556 but then there is also https://bugs.gentoo.org/925440 which we may need too. The (first) error (that halts the build) is: [ 17s] ../subprojects/mocklibc-1.0/src/netgroup-debug.c: In function ‘netgroup_debug_print_entry’: [ 17s] ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Wimplicit-function-declaration] [ 17s] 25 | print_indent(stream, indent); [ 17s] | ^~~~~~~~~~~~
The only issue is the implicit function declaration in mocklibc, which has been meanwhile removed upstream (https://github.com/polkit-org/polkit/commit/8e17f09c770bc2efd5deb40ba2b6032d40603578). Because I do not exactly understand how the sub-project appears at the place where it does, I decided to resort to adding -Wno-error=implicit-function-declaration to %optflags. We should be able to remove the flag again after we pull from upstream again. I have created request https://build.opensuse.org/request/show/1187079
it comes out of some tar file , but i was not able to patch it. something weird is happening, perhaps it gets unpacked twice or so i accepted your sr