Bug 1225958

Summary: Package zsh does not build with gcc14 because of new errors
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Jambor <mjambor>
Component: OtherAssignee: Paolo Perego <paolo.perego>
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 16:31: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 zsh fails to compile.  This can be seen online
at:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/zsh/standard/x86_64

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

The list of patches linked from
https://gitlab.com/fweimer-rh/fedora-modernc/-/blob/main/pkg/z/zsh.md?ref_type=heads
might help.


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

[   44s] termcap.c:45:14: error: ‘_nc_boolcodes’ declared as function returning an array
[   44s]    45 | static char *boolcodes[] = {
[   44s]       |              ^~~~~~~~~
[   44s] termcap.c:45:1: error: function ‘_nc_boolcodes’ is initialized like a variable
[   44s]    45 | static char *boolcodes[] = {
[   44s]       | ^~~~~~
[   44s] termcap.c:45:14: error: conflicting types for ‘_nc_boolcodes’; have ‘int()’
[   44s]    45 | static char *boolcodes[] = {
[   44s]       |              ^~~~~~~~~
[   44s] /usr/include/ncursesw/term.h:761:1: note: previous declaration of ‘_nc_boolcodes’ with type ‘const char * const*(void)’
[   44s]   761 | NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);
[   44s]       | ^~~~~~~~~~~~~~~~~~~
Comment 1 Martin Jambor 2024-07-15 14:10:10 UTC
I have created https://build.opensuse.org/request/show/1187572
Comment 2 Paolo Perego 2024-07-16 08:59:55 UTC
Hi Martin, thank you so much. 
I just accepted your request