Bugzilla – Bug 1225776
Flavor addons of package graphviz does not build with gcc14
Last modified: 2024-07-10 12:15:15 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] | ^
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);
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.
Which is what I did in https://build.opensuse.org/request/show/1186592