NetBSD Problem Report #59440
From www@netbsd.org Fri May 23 08:50:45 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id AC0AB1A923C
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 May 2025 08:50:45 +0000 (UTC)
Message-Id: <20250523085044.54CCF1A923E@mollari.NetBSD.org>
Date: Fri, 23 May 2025 08:50:44 +0000 (UTC)
From: bad@bsd.de
Reply-To: bad@bsd.de
To: gnats-bugs@NetBSD.org
Subject: tools build failures with gcc 15.1
X-Send-Pr-Version: www-1.0
>Number: 59440
>Category: toolchain
>Synopsis: tools build failures with gcc 15.1
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bad
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 23 08:55:00 +0000 2025
>Last-Modified: Fri May 23 09:40:01 +0000 2025
>Originator: Christoph Badura
>Release: 10.99.14 2025-05-20
>Organization:
The Conflicting Prototypes Foundation
>Environment:
Manjaro Linux, amd64, gcc 15.1
>Description:
Tools build errors reported by Vasyl Maksym Lanko so far:
In file included from /home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/lib/substring.c:22:
/home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/lib/system.h:123:12: error: conflicting types for 'strcasecmp'; have 'int(void)'
123 | extern int strcasecmp ();
| ^~~~~~~~~~
In file included from /usr/include/string.h:462,
from /home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/lib/system.h:76:
/usr/include/strings.h:116:12: note: previous declaration of 'strcasecmp' with type 'int(const char *, const char *)'
116 | extern int strcasecmp (const char *__s1, const char *__s2)
| ^~~~~~~~~~
/home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/lib/system.h:127:12: error: conflicting types for 'strncasecmp'; have 'int(void)'
127 | extern int strncasecmp ();
| ^~~~~~~~~~~
/usr/include/strings.h:120:12: note: previous declaration of 'strncasecmp' with type 'int(const char *, const char *, long unsigned int)'
120 | extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~~~~~~
*** Failed target: substring.o
And:
/home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/lib/mkstemp.c:43:10: error: too many arguments to function '__gen_tempname'; expected 0, have 2
I have warning about the same in the logs from my builds on macOS from clang. Apparently gcc 15.1 makes these conflicts an error now.
>How-To-Repeat:
On Manjaro Linux with gcc 15.1: build.sh -m amd64 tools
>Fix:
For the first error: texinfo/dist/lib/system.h enables the prototypeless declaration because configure never checks for the declarations of strcasecmp and strncasecmp and therefore the relevant #defines aren't in config.h.
For the second error: texinfo/dist/lib/mkstemp.c has an unconditional prototypeless declaration for __gen_tempname.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: toolchain-manager->bad
Responsible-Changed-By: bad@NetBSD.org
Responsible-Changed-When: Fri, 23 May 2025 08:57:13 +0000
Responsible-Changed-Why:
take
From: "Christoph Badura" <bad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59440 CVS commit: src/external/gpl2/texinfo/dist/lib
Date: Fri, 23 May 2025 09:34:12 +0000
Module Name: src
Committed By: bad
Date: Fri May 23 09:34:12 UTC 2025
Modified Files:
src/external/gpl2/texinfo/dist/lib: system.h
Log Message:
disable bogus decl of strcasecmp and strncasecmp
gcc 15.1 treats conflicting prototypes as errors.
texinfo's configure never checks whether strcasecmp and strncasecmp are
declared. Therefore the correct #defines never make it into config.h
Just disable the declaration of the bogus prototypes.
Seen on Manajaro Linux with gcc 15.1. Reported by Vasyl Maksym Lanko.
PR toolchain/59440: tools build failures with gcc 15.1
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/texinfo/dist/lib/system.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Christoph Badura" <bad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59440 CVS commit: src/external/gpl2/texinfo/dist/lib
Date: Fri, 23 May 2025 09:37:03 +0000
Module Name: src
Committed By: bad
Date: Fri May 23 09:37:03 UTC 2025
Modified Files:
src/external/gpl2/texinfo/dist/lib: mkstemp.c
Log Message:
declare __gen_tempname with the correct prototype
gcc 15.1 considers conflicting prototypes as errors.
Seen on Manjaro Linux with gcc 15.1. Reported by Vasyl Maksym Lanko.
PR toolchain/59440: tools build failures with gcc 15.1
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/texinfo/dist/lib/mkstemp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.