Bug 1225908

Summary: Package osinfo-db-tools does not build with gcc14 because of new errors
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Jambor <mjambor>
Component: OtherAssignee: Charles Arnold <carnold>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1220571    

Description Martin Jambor 2024-06-04 09:38:10 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 osinfo-db-tools fails to compile.  This can be seen online
at:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/osinfo-db-tools/standard/x86_64

It can be reproduced locally with command: osc build --clean
--alternative-project home:rguenther:nextgcc


The (first) error (that halts the build) is:

[   11s] ../tools/osinfo-db-validate.c: In function ‘validate_files’:
[   11s] ../tools/osinfo-db-validate.c:176:37: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types]
[   11s]   176 |     xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
[   11s]       |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   11s]       |                                     |
[   11s]       |                                     void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)}
[   11s] In file included from /usr/include/libxml2/libxml/relaxng.h:14,
[   11s]                  from ../tools/osinfo-db-validate.c:23:
[   11s] /usr/include/libxml2/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 *)’}
[   11s]   898 |                                  xmlStructuredErrorFunc handler);
[   11s]       |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Comment 1 OBSbugzilla Bot 2024-07-01 20:55:01 UTC
This is an autogenerated message for OBS integration:
This bug (1225908) was mentioned in
https://build.opensuse.org/request/show/1184376 Factory / osinfo-db-tools
Comment 2 Martin Jambor 2024-07-12 11:51:35 UTC
This has been fixed by https://build.opensuse.org/request/show/1184376
Thanks!