NetBSD Problem Report #59250
From triaxx@netbsd.org Thu Apr 3 20:08:04 2025
Return-Path: <triaxx@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)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B04B51A923C
for <gnats-bugs@gnats.NetBSD.org>; Thu, 3 Apr 2025 20:08:04 +0000 (UTC)
Message-Id: <20250403200803.90EA41A923E@mollari.NetBSD.org>
Date: Thu, 3 Apr 2025 20:08:03 +0000 (UTC)
From: triaxx@netbsd.org
Reply-To: triaxx@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: lang/gcc12 fails to build on Darwin
X-Send-Pr-Version: 3.95
>Number: 59250
>Category: pkg
>Synopsis: lang/gcc12 fails to build on Darwin
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: macos-pkg-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 03 20:10:00 +0000 2025
>Last-Modified: Mon Apr 07 08:00:01 +0000 2025
>Originator: Frédéric Fauberteau
>Release: Darwin 24.3.0
>Organization:
>Environment:
System: Darwin MBCMW40CH6R6 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:23:36 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8112 arm64
Architecture: arm64
Machine: aarch64
Pkgsrc: HEAD (20250303)
SDK Version: 15.4
>Description:
The build step fails with the following error message:
checking stack direction for C alloca... In file included from ../../gcc-12.4.0/zlib/zutil.c:10:
In file included from ../../gcc-12.4.0/zlib/gzguts.h:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:61:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:316:7: error: expected identifier or '('
316 | FILE *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen));
| ^
../../gcc-12.4.0/zlib/zutil.h:140:33: note: expanded from macro 'fdopen'
140 | # define fdopen(fd,mode) NULL /* No fdopen() */
| ^
>How-To-Repeat:
cd lang/gcc12 && bmake build
>Fix:
--- zutil.c.orig 2025-04-03 21:41:20
+++ zutil.c 2025-04-03 21:41:29
@@ -5,10 +5,10 @@
/* @(#) $Id: zutil.c,v 1.1.1.2 2002/03/11 21:53:27 tromey Exp $ */
-#include "zutil.h"
#ifndef Z_SOLO
# include "gzguts.h"
#endif
+#include "zutil.h"
z_const char * const z_errmsg[10] = {
(z_const char *)"need dictionary", /* Z_NEED_DICT 2 */
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->macos-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sat, 05 Apr 2025 13:03:23 +0000
Responsible-Changed-Why:
Over to Mac OS people.
From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= <triaxx@triaxx.online>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/59250 (lang/gcc12 fails to build on Darwin)
Date: Sun, 6 Apr 2025 11:44:24 +0200
I have committed wip/gcc12-darwin with the patch submitted in PR
pkg/59250 and others from some of https://github.com/iains/
repositories. I would be interested in getting feedback from macOS users
before trying to integrate it into pkgsrc.
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/59250 (lang/gcc12 fails to build on Darwin)
Date: Mon, 07 Apr 2025 09:59:19 +0200
I have successfully built wip/gcc12-darwin on NetBSD-10.99.12/amd64.
I should either update lang/gcc12 to integrate patches specific to
Darwin or add lang/gcc12 by implementing an approach as
https://github.com/drecklypkg/dreckly/compare/trunk...drecklypkg:dreckly:ci/gcc14
>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.