NetBSD Problem Report #60594
From www@netbsd.org Sat Aug 15 00:58:39 2026
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 "YR2" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 347D21A923B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 Aug 2026 00:58:39 +0000 (UTC)
Message-Id: <20260815005837.685611A923C@mollari.NetBSD.org>
Date: Sat, 15 Aug 2026 00:58:37 +0000 (UTC)
From: opensauce04@gmail.com
Reply-To: opensauce04@gmail.com
To: gnats-bugs@NetBSD.org
Subject: pkgsrc must update to LLVM 22 or patch LLVM to support systems based on LLVM 22+ / macOS 27
X-Send-Pr-Version: www-1.0
X-From4GNATS: "opensauce04@gmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60594
>Category: pkg
>Synopsis: pkgsrc must update to LLVM 22 or patch LLVM to support systems based on LLVM 22+ / macOS 27
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 15 01:00:00 +0000 2026
>Closed-Date:
>Last-Modified: Sat Aug 15 16:41:48 +0000 2026
>Originator: Daniel Bradbury
>Release: pkgsrc-2026Q2
>Organization:
>Environment:
Darwin danmbp 27.0.0 Darwin Kernel Version 27.0.0: Wed Aug 5 22:05:58 PDT 2026; root:xnu-13432.1.6.501.1~1/RELEASE_ARM64_T8142 arm64
>Description:
A change which was made in LLVM 22 makes it impossible to compile versions of LLVM earlier than version 22 when using LLVM 22 or later. This is an issue in the earlier LLVM version's source code, not in the new version of LLVM which is being used to build.
This is documented in the following issue on LLVM's GitHub issue tracker, which was closed while ruling out addressing the issue in previous versions of LLVM upstream: https://github.com/llvm/llvm-project/issues/183908
As mentioned in the report title, macOS 27 is also affected, which is strange, as the version of LLVM distributed with the current Xcode 27 beta seems to be some variant of LLVM 21, assuming that the Apple Clang version number is accurate. Even so, the exact same build issue described in the above GitHub report also happens with the betas for macOS 27, and this issue didn't exist on macOS 26.6. I'm assuming that whatever change started causing the build issue was backported by Apple into Apple Clang 21; I haven't checked.
This means that it is currently impossible to build pkgsrc's LLVM recipe on the macOS 27 betas, and this will remain the case when macOS 27 is released as stable.
To address the issue ahead of time, I am suggesting upgrading to LLVM 22 in `current` to allow the use of pkgsrc on these systems, with the change becoming stable in the 2026Q3 branch.
It may also be possible to introduce a patch in pkgsrc for this issue while staying on LLVM 21 if that is desired and acceptable. Someone in the GitHub thread above reported success with a certain patch, but I haven't yet tested it to find out.
>How-To-Repeat:
Attempt to build pkgsrc's LLVM recipe on macOS 27 + Xcode 27 or another potential affected host system configuration.
>Fix:
Upgrade pkgsrc's LLVM version to LLVM 22 or patch pkgsrc's LLVM to fix the issue.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 15 Aug 2026 14:26:54 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-11, pullup-10, maybe pullup-9
State-Changed-From-To: needs-pullups->open
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 15 Aug 2026 16:41:48 +0000
State-Changed-Why:
Not fixed, probably typo.
The problem here is that we only have one version of llvm in pkgsrc, and when
we update it, we'd like meta-pkgs/bulk-test-llvm to still pass.
For example, the latest zig release is 0.16 and supports llvm 21.
From past experience, I wouldn't expect it to support llvm 22
because llvm releases usually break API.
You're very welcome to try using the wip/llvm packages and testing
how bulk-test-llvm fares against them (you'll have to copy them to the
corresponding places in pkgsrc and adapt paths), and start preparing
patches for the fallout :-)
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.