NetBSD Problem Report #56371

From www@netbsd.org  Sun Aug 22 07:18:04 2021
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5310D1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Aug 2021 07:18:04 +0000 (UTC)
Message-Id: <20210822071802.AC2581A9239@mollari.NetBSD.org>
Date: Sun, 22 Aug 2021 07:18:02 +0000 (UTC)
From: nia@pkgsrc.org
Reply-To: nia@pkgsrc.org
To: gnats-bugs@NetBSD.org
Subject: lang/rust fails to bootstrap on NetBSD 9 i386
X-Send-Pr-Version: www-1.0

>Number:         56371
>Category:       pkg
>Synopsis:       lang/rust fails to bootstrap on NetBSD 9 i386
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 22 07:20:00 +0000 2021
>Closed-Date:    
>Last-Modified:  Thu Nov 04 10:08:01 +0000 2021
>Originator:     nia
>Release:        pkgsrc-current today
>Organization:
The NetBSD Foundation
>Environment:
NetBSD procyon.is 9.2 NetBSD 9.2 (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/i386/compile/LIBKVER i386
>Description:
=> Bootstrap dependency digest>=20010302: found digest-20190127
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Building for rust-1.52.1nb4
/usr/sbin/paxctl +am /tmp/work/lang/rust/work/rust-bootstrap/bin/cargo
/usr/sbin/paxctl +am /tmp/work/lang/rust/work/rust-bootstrap/bin/rustc
running: /tmp/work/lang/rust/work/rust-bootstrap/bin/cargo build --manifest-path /tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/Cargo.toml --frozen
error: process didn't exit successfully: `/tmp/work/lang/rust/work/rust-bootstrap/bin/rustc -vV` (exit code: 1)
--- stderr
/tmp/work/lang/rust/work/rust-bootstrap/lib/librustc_driver-12ed1c8e5a734cfb.so: Shared object "libstdc++.so.8" not found

Traceback (most recent call last):
  File "/tmp/work/lang/rust/work/rustc-1.52.1-src/./x.py", line 27, in <module>
    bootstrap.main()
  File "/tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1183, in main
    bootstrap(help_triggered)
  File "/tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 1156, in bootstrap
    build.build_bootstrap()
  File "/tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 908, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/bootstrap.py", line 153, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /tmp/work/lang/rust/work/rust-bootstrap/bin/cargo build --manifest-path /tmp/work/lang/rust/work/rustc-1.52.1-src/src/bootstrap/Cargo.toml --frozen
*** Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/lang/rust
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/rust

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/56371: lang/rust fails to bootstrap on NetBSD 9 i386
Date: Mon, 23 Aug 2021 16:02:34 +0200

 > /tmp/work/lang/rust/work/rust-bootstrap/lib/librustc_driver-12ed1c8e5a734cfb.so: Shared object "libstdc++.so.8" not found

 You need to install NetBSD-8 compat libraries. They need to be in
 /usr/pkg. That's the way the bootstrap binaries are built.

 -- 
 Benny

From: nia <nia@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56371: lang/rust fails to bootstrap on NetBSD 9 i386
Date: Mon, 23 Aug 2021 20:59:49 +0000

 On Mon, Aug 23, 2021 at 02:05:01PM +0000, Benny Siegert wrote:
 > The following reply was made to PR pkg/56371; it has been noted by GNATS.
 > 
 > From: Benny Siegert <bsiegert@gmail.com>
 > To: gnats-bugs@netbsd.org
 > Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 > Subject: Re: pkg/56371: lang/rust fails to bootstrap on NetBSD 9 i386
 > Date: Mon, 23 Aug 2021 16:02:34 +0200
 > 
 >  > /tmp/work/lang/rust/work/rust-bootstrap/lib/librustc_driver-12ed1c8e5a734cfb.so: Shared object "libstdc++.so.8" not found
 >  
 >  You need to install NetBSD-8 compat libraries. They need to be in
 >  /usr/pkg. That's the way the bootstrap binaries are built.
 >  
 >  -- 
 >  Benny
 >  

 This is a pbulk build. compat80 is pulled in by the package
 already, but something else is wrong.

From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56371: lang/rust fails to bootstrap on NetBSD 9 i386
Date: Tue, 24 Aug 2021 23:11:45 -0400

 On Mon, 23 Aug 2021 at 21:00:03 +0000 (UTC), nia wrote:
 > On Mon, Aug 23, 2021 at 02:05:01PM +0000, Benny Siegert wrote:
 > >  > /tmp/work/lang/rust/work/rust-bootstrap/lib/librustc_driver-12ed1c8e5a734cfb.so: Shared object "libstdc++.so.8" not found
 > >  
 > >  You need to install NetBSD-8 compat libraries. They need to be in
 > >  /usr/pkg. That's the way the bootstrap binaries are built.
 > 
 > This is a pbulk build. compat80 is pulled in by the package
 > already, but something else is wrong.

 If you're building using a sandbox with null mounts (I assume you are),
 then compat80 won't be installed effectively, as it wants to reach
 outside the sandbox to write symlinks under /usr/lib, which gets
 rejected. (compat80 breaks pkgsrc norms by writing outside $PREFIX.)

 The hackish way around that for a specific, dedicated build environment
 is simply to install compat80 outside the sandbox. Another way could be
 to use something like the kludge I introduced for the ghc* packages[1],
 though Rust may be a little more complicated. (I did note this in my
 commit message when I restored the compat80 dependency[2]; I guess
 maybe it would have been better if I'd written a comment above. I was
 at the point of frustration with our Rust packaging that I didn't want
 to deal with it further. I'm almost at that point again today.)

 Dave

 1. https://github.com/NetBSD/pkgsrc/commit/728b87ce71e0023a64c9d4ef67cd9a845582a3f4
 later improved by riastradh@:
 https://github.com/NetBSD/pkgsrc/commit/8ab38add2c9745d0a1b7c05eba990071cd32e9de
 2. https://github.com/NetBSD/pkgsrc/commit/f2bf5fbfe0b09e0aeec104d7914c312d9ff048bb

State-Changed-From-To: open->analyzed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Thu, 04 Nov 2021 10:08:01 +0000
State-Changed-Why:
I suppose a workaround for bulk builds would be to install
the compat80 package "natively" on the machine before starting
the bulk build. Would that work?


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.