Bug 1225776

Summary: Flavor addons of package graphviz does not build with gcc14
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Jambor <mjambor>
Component: OtherAssignee: Thomas Renninger <trenn>
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-05-31 20:02:50 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, flavor addons of package graphviz fails to compile.
This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/graphviz:addons/standard/x86_64

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

The error (that halts the build) is:


[   79s] tbl.c:173:15: error: assignment to ‘char *’ from incompatible pointer type ‘char (*)[1]’ [-Wincompatible-pointer-types]
[   79s]   173 |             s = &cp[i].u.s;
[   79s]       |               ^
Comment 1 Martin Jambor 2024-07-09 13:38:12 UTC
The error when compiling cmd/lefty/tbl.c can be fixed with the
following patch.  Accordig to https://graphviz.org/docs/cli/lefty/ it
is deprecated and so we might need to carry that patch but that seems
OK.

--- graphviz-2.49.3/cmd/lefty/tbl.c~    2021-10-23 00:02:14.000000000 +0000
+++ graphviz-2.49.3/cmd/lefty/tbl.c     2024-07-09 13:00:01.366640148 +0000
@@ -170,7 +170,7 @@
             cp2[i] = cp[i];
             if (cp2[i].next != C_NULL)
                 cp2[i].next -= ci;
-            s = &cp[i].u.s;
+            s = &cp[i].u.s[0];
             while (*s)
                 s++;
             cn = (long) (s - (char *) &cp[i]) / sizeof (Code_t);
Comment 2 Martin Jambor 2024-07-09 13:44:54 UTC
Fixing that, there are incompatible pointer type errors in
cmd/smyrna/polytess.c which upstream seemed to have addressed with
https://gitlab.com/graphviz/graphviz/-/commit/87cc54644e40fccc0651b7fedc137b3dd02b4514

However, the patch does not apply cleanly and so it seems it would
be better to simply defer fixing this until we grab a new upstream
version.
Comment 3 Martin Jambor 2024-07-10 12:15:15 UTC
Which is what I did in https://build.opensuse.org/request/show/1186592