NetBSD Problem Report #59435
From www@netbsd.org Tue May 20 20:38:30 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)
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 43B0A1A923C
for <gnats-bugs@gnats.NetBSD.org>; Tue, 20 May 2025 20:38:30 +0000 (UTC)
Message-Id: <20250520203828.C28C41A923E@mollari.NetBSD.org>
Date: Tue, 20 May 2025 20:38:28 +0000 (UTC)
From: david@gutteridge.ca
Reply-To: david@gutteridge.ca
To: gnats-bugs@NetBSD.org
Subject: lang/rust fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
X-Send-Pr-Version: www-1.0
>Number: 59435
>Category: pkg
>Synopsis: lang/rust fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 20 20:40:00 +0000 2025
>Closed-Date: Mon Jun 23 22:56:10 +0000 2025
>Last-Modified: Mon Jun 23 22:56:10 +0000 2025
>Originator: David H. Gutteridge
>Release: pkgsrc -current
>Organization:
TNF
>Environment:
>Description:
lang/rust fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update.
This can be seen in bulk build reports, e.g.,
http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20250517.1036/rust-1.85.1nb3/build.log
Compiling compiler_builtins v0.1.140
Compiling rustc-std-workspace-core v1.99.0 (/tmp/lang/rust/work/rustc-1.85.1-src/library/rustc-std-workspace-core)
error: failed to prepare thin LTO module: Invalid alignment value (Producer: 'LLVM19.1.7' Reader: 'LLVM 19.1.7')
Compiling alloc v0.0.0 (/tmp/lang/rust/work/rustc-1.85.1-src/library/alloc)
Compiling cfg-if v1.0.0
Compiling unwind v0.0.0 (/tmp/lang/rust/work/rustc-1.85.1-src/library/unwind)
error: could not compile `core` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to parse bitcode for LTO module: Invalid alignment value (Producer: 'LLVM19.1.7' Reader: 'LLVM 19.1.7')
error: could not compile `compiler_builtins` (lib) due to 1 previous error
error: could not compile `alloc` (lib) due to 1 previous error
Build completed unsuccessfully in 1:06:02
I can reproduce this in my 9.4_STABLE pbulk build environment.
>How-To-Repeat:
Try to build lang/rust.
>Fix:
I'm testing rebuilding using the (non-default) rust-internal-llvm option.
>Release-Note:
>Audit-Trail:
From: Thomas Klausner <wiz@gatalith.at>
To: david@gutteridge.ca
Cc: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Subject: Re: pkg/59435: lang/rust fails to build on NetBSD 9.x (e.g.,
9.4_STABLE) after the llvm 19 update
Date: Tue, 20 May 2025 23:31:20 +0200
On Tue, May 20, 2025 at 08:40:01PM +0000, david@gutteridge.ca wrote:
> >Number: 59435
> >Category: pkg
> >Synopsis: lang/rust fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
Can you please also try wip/rust186?
Thanks,
Thomas
From: "David H. Gutteridge" <david@gutteridge.ca>
To: Thomas Klausner <wiz@gatalith.at>, Gnats Bugs <gnats-bugs@netbsd.org>
Cc:
Subject: Re: pkg/59435: lang/rust fails to build on NetBSD 9.x (e.g.,
9.4_STABLE) after the llvm 19 update
Date: Wed, 21 May 2025 08:33:42 -0400
On 2025-05-20 17:31, Thomas Klausner wrote:
> On Tue, May 20, 2025 at 08:40:01PM +0000, david@gutteridge.ca wrote:
> Number: 59435
> Category: pkg
> Synopsis: lang/rust fails to build on NetBSD 9.x (e.g.,
> 9.4_STABLE) after the llvm 19 update
> Can you please also try wip/rust186?
It fails the same way.
Compiling compiler_builtins v0.1.146
Compiling rustc-std-workspace-core v1.99.0
(/tmp/work/rustc-1.86.0-src/library/rustc-std-workspace-core)
Compiling alloc v0.0.0 (/tmp/work/rustc-1.86.0-src/library/alloc)
Compiling cfg-if v1.0.0
Compiling memchr v2.7.4
Compiling adler2 v2.0.0
Compiling rustc-demangle v0.1.24
Compiling unwind v0.0.0 (/tmp/work/rustc-1.86.0-src/library/unwind)
error: failed to parse bitcode for LTO module: Invalid alignment value
(Producer: 'LLVM19.1.7' Reader: 'LLVM 19.1.7')
error: could not compile `compiler_builtins` (lib) due to 1 previous
error
warning: build failed, waiting for other jobs to finish...
error: could not compile `core` (lib) due to 1 previous error
error: could not compile `rustc-demangle` (lib) due to 1 previous error
error: could not compile `memchr` (lib) due to 1 previous error
error: could not compile `alloc` (lib) due to 1 previous error
Building lang/rust with the rust-internal-llvm option works, as one
might expect.
Dave
From: "Havard Eidnes" <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59435 CVS commit: pkgsrc/lang/rust
Date: Sat, 21 Jun 2025 14:53:02 +0000
Module Name: pkgsrc
Committed By: he
Date: Sat Jun 21 14:53:02 UTC 2025
Modified Files:
pkgsrc/lang/rust: options.mk
Log Message:
lang/rust: on NetBSD/amd64 9.x, use a newer GCC.
Apparently, using pkgsrc LLVM 19.x does not work on
NetBSD/x86_64 9.x unless rust is built with a newer
gcc than the platform-included 7.5.0. Ref.
https://gnats.netbsd.org/59435 (PR#59435) and
https://mail-index.netbsd.org/pkgsrc-users/2025/05/20/msg041603.html
and following discussion.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 pkgsrc/lang/rust/options.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Mon, 23 Jun 2025 22:56:10 +0000
State-Changed-Why:
Issue resolved by he@, thanks!
>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.