Bugzilla – Bug 1228355
Package rubygem-nokogiri does not build with gcc 14 because of new errors (that were previously warnings)
Last modified: 2024-07-26 12:29:19 UTC
Package rubygem-nokogiri fails to build with GCC 14 because of various C99 violations which previously just generated warning s but which cause errors with GCC 14 by default. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. BuildService failures are available online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/rubygem-nokogiri/standard/x86_64 The build with GCC 14 can now be tried locally with: osc build --clean --alternative-project home:rguenther:nextgcc The (first) error that stops the build is: [ 17s] html4_document.c: In function ‘rb_html_document_s_read_io’: [ 17s] html4_document.c:49:52: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] [ 17s] 49 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); [ 17s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 17s] | | [ 17s] | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} [ 17s] In file included from /usr/include/libxml/valid.h:15, [ 17s] from /usr/include/libxml/parser.h:19, [ 17s] from ./nokogiri.h:35, [ 17s] from html4_document.c:1: [ 17s] /usr/include/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} [ 17s] 898 | xmlStructuredErrorFunc handler); [ 17s] | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ [ 17s] html4_document.c: In function ‘rb_html_document_s_read_memory’: [ 17s] html4_document.c:109:52: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types] [ 17s] 109 | xmlSetStructuredErrorFunc((void *)rb_error_list, Nokogiri_error_array_pusher); [ 17s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 17s] | | [ 17s] | void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)} [ 17s] /usr/include/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’} [ 17s] 898 | xmlStructuredErrorFunc handler); [ 17s] | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
There is an upstream issue: https://github.com/sparklemotion/nokogiri/issues/3295
Apparently I have already filed a bug for this. *** This bug has been marked as a duplicate of bug 1225922 ***