GNU bug report logs -
#72842
Compile error due to lto warning on Arch Linux -Werror=maybe-uninitialized
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72842 in the body.
You can then email your comments to 72842 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#72842
; Package
coreutils
.
(Tue, 27 Aug 2024 21:00:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tobias Powalowski <tobias.powalowski <at> googlemail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 27 Aug 2024 21:00:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
In function 'canonicalize_filename_mode_stk',
inlined from 'canonicalize_filename_mode' at lib/canonicalize.c:464:18,
inlined from 'get_dev' at src/df.c:1111:26:
lib/canonicalize.c:383:33: error: 'end_idx' may be used uninitialized
[-Werror=maybe-uninitialized]
383 | end = extra_buf + end_idx;
| ^
lib/canonicalize.c: In function 'get_dev':
lib/canonicalize.c:370:21: note: 'end_idx' was declared here
370 | idx_t end_idx;
| ^
lto1: all warnings being treated as errors
make[3]: *** [/tmp/ccPldcTP.mk:2: /tmp/cc83dm7m.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:11281: src/df] Error 1
make[2]: Leaving directory '/build/coreutils/src/coreutils'
make[1]: *** [Makefile:22568: all-recursive] Error 1
make[1]: Leaving directory '/build/coreutils
I get this while compiling v9.5 git tag after bootstrap.
Using: make CFLAGS="$CFLAGS -Wno-maybe-uninitialized"
is a workaround at the moment.
Best regards
tpowa
--
Tobias Powalowski
Arch Linux Developer (tpowa)
https://www.archlinux.org
tpowa <at> archlinux.org
Archboot Developer
https://archboot.com
St. Martin-Apotheke
Herzog-Georg-Str. 25
89415 Lauingen
https://www.st-martin-apo.de
info <at> st-martin-apo.de
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#72842
; Package
coreutils
.
(Tue, 27 Aug 2024 21:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 72842 <at> debbugs.gnu.org (full text, mbox):
I'm not seeing that false alarm when building coreutils v9.5 on Ubuntu
24.04 LTS with "./configure --enable-gcc-warnings CC=gcc-14".
What GCC version are you using? If it's not GCC 14, try upgrading. I'm
using gcc-14 (Ubuntu 14-20240412-0ubuntu1) 14.0.1 20240412
(experimental) [master r14-9935-g67e1433a94f].
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#72842
; Package
coreutils
.
(Wed, 28 Aug 2024 05:54:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 72842 <at> debbugs.gnu.org (full text, mbox):
Am 27.08.24 um 23:34 schrieb Paul Eggert:
> I'm not seeing that false alarm when building coreutils v9.5 on Ubuntu
> 24.04 LTS with "./configure --enable-gcc-warnings CC=gcc-14".
>
> What GCC version are you using? If it's not GCC 14, try upgrading. I'm
> using gcc-14 (Ubuntu 14-20240412-0ubuntu1) 14.0.1 20240412
> (experimental) [master r14-9935-g67e1433a94f].
Hi
gcc --version
gcc (GCC) 14.2.1 20240805
Best regards
tpowa
--
Tobias Powalowski
Arch Linux Developer (tpowa)
https://www.archlinux.org
tpowa <at> archlinux.org
Archboot Developer
https://archboot.com
St. Martin-Apotheke
Herzog-Georg-Str. 25
89415 Lauingen
https://www.st-martin-apo.de
info <at> st-martin-apo.de
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Wed, 28 Aug 2024 11:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tobias Powalowski <tobias.powalowski <at> googlemail.com>
:
bug acknowledged by developer.
(Wed, 28 Aug 2024 11:40:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 72842-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 27/08/2024 22:34, Paul Eggert wrote:
> I'm not seeing that false alarm when building coreutils v9.5 on Ubuntu
> 24.04 LTS with "./configure --enable-gcc-warnings CC=gcc-14".
>
> What GCC version are you using? If it's not GCC 14, try upgrading. I'm
> using gcc-14 (Ubuntu 14-20240412-0ubuntu1) 14.0.1 20240412
> (experimental) [master r14-9935-g67e1433a94f].
I think LTO is key here, as GCC has more context then to produce warnings.
With `-march=native -O3 -flto` on GCC 14.2.1 I see,
2 false warnings in gnulib (patch attached).
1 correct warning in coreutils (patch attached).
Marking this as done.
I'll apply the patches later today.
cheers,
Pádraig.
[gnulib-lto.patch (text/x-patch, attachment)]
[coreutils-xdectoint-lto.patch (text/x-patch, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 26 Sep 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.