tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Rust on NetBSD 9



On Thu, 19 Jun 2025 at 17:45:08 +0200 (CEST), Havard Eidnes wrote:
> >> The latest NetBSD 9 bulk build (on x86_64) has a Rust build
> failure:
> >>
> >> https://releng.netbsd.org/bulktracker/pkg/55017055
> >>
> >>    Compiling core v0.0.0
> >> (/pbulk/work/lang/rust/work/rustc-1.86.0-src/library/core)
> >> error: failed to parse bitcode for LTO module: Invalid alignment
> value
> >> (Producer: 'LLVM19.1.7' Reader: 'LLVM 19.1.7')
> >
> > I'm starting off a build on 9.3 to see if I can reproduce this,
> > and will possibly subsequently upgrade to 9.4 to see if that
> > fares any better.
> 
> It gets past this point when building with the rust-internal
> LLVM (yes, I'll try with external LLVM too):
> 
> so this is with
> 
> PKG_OPTIONS.rust+=      rust-internal-llvm
> 
> in /etc/mk.conf.
> 
> ...
> Building stage1 library artifacts (x86_64-unknown-netbsd)
>    Compiling shlex v1.3.0
>    Compiling core v0.0.0 (/usr/pkgsrc/lang/rust/work/rustc-1.86.0-
> src/library/core)
>    Compiling libc v0.2.169
>    Compiling object v0.36.7
>    Compiling cc v1.2.0
>    Compiling std v0.0.0 (/usr/pkgsrc/lang/rust/work/rustc-1.86.0-
> src/library/std)
>    Compiling compiler_builtins v0.1.146
>    Compiling rustc-std-workspace-core v1.99.0
> (/usr/pkgsrc/lang/rust/work/rustc-1.86.0-src/library/rustc-std-
> workspace-core)
>    Compiling alloc v0.0.0 (/usr/pkgsrc/lang/rust/work/rustc-1.86.0-
> src/library/alloc)
> ...
> 
> etc. etc. etc.

This is the same issue as with 1.85, which was discussed previously
(with the unhelpfully continually changing email subjects), starting
with:

https://mail-index.netbsd.org/pkgsrc-users/2025/05/20/msg041603.html

I also filed a PR about this, noting that, yes, using rust-internal-llvm
also allowed the build to succeed for me. (That being PR pkg/59435.)

Regards,

Dave


Home | Main Index | Thread Index | Old Index