Bug 1225921

Summary: Package rubygem-hpricot does not build with gcc14 because of new errors
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Jambor <mjambor>
Component: DevelopmentAssignee: Marcus Rückert <mrueckert>
Status: NEW --- 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 11:40:51 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 rubygem-hpricot fails to compile.  This can be seen online
at:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/rubygem-hpricot/standard/x86_64

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

The corresponding Gentoo bug might be https://bugs.gentoo.org/884257


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

[    7s] fast_xs.c: In function ‘fast_xs’:
[    7s] fast_xs.c:165:46: error: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types]
[    7s]   165 |         array = rb_rescue(unpack_utf8, self, unpack_uchar, self);
[    7s]       |                                              ^~~~~~~~~~~~
[    7s]       |                                              |
[    7s]       |                                              VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}
[    7s] In file included from /usr/include/ruby-3.3.0/ruby/ruby.h:41,
[    7s]                  from /usr/include/ruby-3.3.0/ruby.h:38,
[    7s]                  from fast_xs.c:1:
[    7s] /usr/include/ruby-3.3.0/ruby/internal/iterator.h:364:62: note: expected ‘VALUE (*)(VALUE,  VALUE)’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’}
[    7s]   364 | VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2);
[    7s]       |                                                      ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~