GNU bug report logs - #63670
CI failure due to warning in diff.c

Previous Next

Package: diffutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Tue, 23 May 2023 16:47:02 UTC

Severity: normal

Tags: fixed

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63670 in the body.
You can then email your comments to 63670 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#63670; Package diffutils. (Tue, 23 May 2023 16:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Tue, 23 May 2023 16:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: CI failure due to warning in diff.c
Date: Tue, 23 May 2023 18:46:01 +0200
Hi Paul,

The diffutils CI reports a build failure:


  CC       diff.o
../../../sources/diffutils/src/diff.c: In function 'compare_files':
../../../sources/diffutils/src/diff.c:1209:8: error: missing initializer for field 'name' of 'struct file_data' [-Werror=missing-field-initializers]
 1209 |        .file[1].desc = name1 ? UNOPENED : NONEXISTENT,
      |        ^
In file included from ../../../sources/diffutils/src/diff.c:22:
../../../sources/diffutils/src/diff.h:275:22: note: 'name' declared here
  275 |     char const      *name; /* File name  */
      |                      ^~~~
../../../sources/diffutils/src/diff.c:1210:8: error: missing initializer for field 'name' of 'struct file_data' [-Werror=missing-field-initializers]
 1210 |        .parent = parent };
      |        ^
In file included from ../../../sources/diffutils/src/diff.c:22:
../../../sources/diffutils/src/diff.h:275:22: note: 'name' declared here
  275 |     char const      *name; /* File name  */
      |                      ^~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1836: diff.o] Error 1


Looks like it's caused by yesterday's commit
e8c2d02643f8e75704088cebf7f7d54966d61c09

Bruno







Information forwarded to bug-diffutils <at> gnu.org:
bug#63670; Package diffutils. (Wed, 24 May 2023 17:27:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: bug-diffutils <at> gnu.org
Subject: Re: CI failure due to warning in diff.c
Date: Wed, 24 May 2023 10:25:45 -0700
[Message part 1 (text/plain, inline)]
On 2023-05-23 09:46, Bruno Haible wrote:

> The diffutils CI reports a build failure:
> 
> 
>    CC       diff.o
> ../../../sources/diffutils/src/diff.c: In function 'compare_files':
> ../../../sources/diffutils/src/diff.c:1209:8: error: missing initializer for field 'name' of 'struct file_data' [-Werror=missing-field-initializers]

I don't know how to find out the details of the diffutils CI build. 
However, I think the bug is probably that the build was using GCC 11.1 
or 11.2, which is buggy in this area. I installed the attached patches 
to Gnulib to work around that problem.

If you're configuring with --enable-gcc-warnings or equivalent, it's 
better to use current GCC. Older versions of GCC have several problems 
in this area, and although I went to the trouble of working around this 
particular problem I doubt whether it's worth our time to worry about 
all false positives generated by older GCC versions, so  it might be 
better to build with --disable-gcc-warnings on older platforms.
[0001-manywarnings-port-better-to-GCC-11.2-and-earlier.patch (text/x-patch, attachment)]
[0002-Simplify-Wno-missing-field-initializers-checking.patch (text/x-patch, attachment)]
[0003-manywarnings-speed-up-nomfi-test.patch (text/x-patch, attachment)]

Added tag(s) fixed. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 24 May 2023 17:30:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 63670 <at> debbugs.gnu.org and Bruno Haible <bruno <at> clisp.org> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 24 May 2023 17:30:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-diffutils <at> gnu.org:
bug#63670; Package diffutils. (Wed, 24 May 2023 18:52:02 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: bug-diffutils <at> gnu.org
Subject: Re: CI failure due to warning in diff.c
Date: Wed, 24 May 2023 20:50:50 +0200
Paul Eggert wrote:
> I don't know how to find out the details of the diffutils CI build. 

It's gcc 9.3.0 (this can be found from the CI's distro [1] and the
distrowatch database [2]).

> If you're configuring with --enable-gcc-warnings or equivalent

No, the CI build merely uses CPPFLAGS="-Wall". [3]

> However, I think the bug is probably that the build was using GCC 11.1 
> or 11.2, which is buggy in this area. I installed the attached patches 
> to Gnulib to work around that problem.

Ah, thanks. I didn't know that -Wno-missing-field-initializers already
had a configure test in manywarnings.m4.

Bruno

[1] https://gitlab.com/gnu-diffutils/ci-distcheck/-/blob/main/.gitlab-ci.yml#L31
[2] https://distrowatch.com/dwres.php?firstlist=ubuntu&secondlist=ubuntu&firstversions=7&secondversions=3&resource=compare-packages&view=major&refresh=Aktualisieren
[3] https://gitlab.com/gnu-diffutils/ci-distcheck/-/blob/main/.gitlab-ci.yml#L73







bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Jun 2023 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 309 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.