NetBSD Problem Report #52584

From wiz@yt.nih.at  Sat Sep 30 14:13:50 2017
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 D16917A180
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 30 Sep 2017 14:13:50 +0000 (UTC)
Message-Id: <20170930120127.8429A2AC0C7@yt.nih.at>
Date: Sat, 30 Sep 2017 14:01:27 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: lang/rust build failure (bootstrap kit issue?)
X-Send-Pr-Version: 3.95

>Number:         52584
>Category:       pkg
>Synopsis:       lang/rust build failure (bootstrap kit issue?)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 30 14:15:00 +0000 2017
>Last-Modified:  Fri Oct 06 15:30:00 +0000 2017
>Originator:     Thomas Klausner
>Release:        NetBSD 8.99.3
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
When trying to build lang/rust 1.20, I see

===> Building for rust-1.20.0
cd /scratch/lang/rust/work/rustc-1.20.0-src  && env USETOOLS=no PTHREAD_CFLAGS=\ -pthread\  PTHREAD_LDFLAGS=\ -pthread PTHREAD_LIBS= PTHREADBASE=/usr DL_CFLAGS=\ -pthread\  DL_LDFLAGS=\ -pthread DL_LIBS= PYTHON=/usr/pkg/bin/python3.6 CC=gcc CFLAGS=-O2\ -g\ -D_FORTIFY_SOURCE=2\ -fstack-check\ -I/usr/pkg/include\ -I/usr/include\ -I/usr/pkg/include/python3.6\ -I/usr/include/krb5 CPPFLAGS=-g\ -I/usr/pkg/include\ -I/usr/include\ -I/usr/pkg/include/python3.6\ -I/usr/include/krb5 CXX=c++ CXXFLAGS=-O2\ -g\ -D_FORTIFY_SOURCE=2\ -fstack-check\ -I/usr/pkg/include\ -I/usr/include\ -I/usr/pkg/include/python3.6\ -I/usr/include/krb5 COMPILER_RPATH_FLAG=-Wl,-R F77=g77 FC=g77 FFLAGS=-O LANG=C LC_ALL=C LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C LDFLAGS=-Wl,-z,relro\ -Wl,-z,now\ -L/usr/pkg/lib\ -Wl,-R/usr/pkg/lib\ -L/usr/lib\ -Wl,-R/usr/lib LINKER_RPATH_FLAG=-R PATH=/scratch/lang/rust/work/.cwrapper/bin:/scratch/lang/rust/work/.buildlink/bin:/scratch/lang/rust/work/.gcc/
 bin:/scratch/lang/rust/work/.tools/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/pkg/bin:/usr/local/bin:/usr/pkg/bin:/usr/pkg/bin PREFIX=/usr/pkg MAKELEVEL=0 CONFIG_SITE= PKG_SYSCONFDIR=/usr/pkg/etc HOME=/scratch/lang/rust/work/.home CWRAPPERS_CONFIG_DIR=/scratch/lang/rust/work/.cwrapper/config CPP=cpp LOCALBASE=/usr/pkg X11BASE=/usr/pkg PKGMANDIR=man PKGINFODIR=info PKGGNUDIR=gnu/ MAKECONF=/dev/null OBJECT_FMT=ELF USETOOLS=no BSD_INSTALL_PROGRAM=/usr/bin/install\ -c\ \ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_SCRIPT=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_LIB=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_DATA=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 644 BSD_INSTALL_MAN=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 644 BSD_INSTALL=/usr/bin/install BSD_INSTALL_PROGRAM_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_SCRIPT_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_LIB_DIR=/usr/bin/ins
 tall\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_DATA_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_MAN_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 755 BSD_INSTALL_GAME=/usr/bin/install\ -c\ \ -o\ pbulk\ -g\ builder\ -m\ 2555 BSD_INSTALL_GAME_DATA=/usr/bin/install\ -c\ -o\ pbulk\ -g\ builder\ -m\ 664 BSD_INSTALL_GAME_DIR=/usr/bin/install\ -d\ -o\ pbulk\ -g\ builder\ -m\ 775 INSTALL_INFO= MAKEINFO=/scratch/lang/rust/work/.tools/bin/makeinfo FLEX= BISON= PKG_CONFIG=/scratch/lang/rust/work/.tools/bin/pkg-config PKG_CONFIG_LIBDIR=/scratch/lang/rust/work/.buildlink/lib/pkgconfig:/scratch/lang/rust/work/.buildlink/share/pkgconfig PKG_CONFIG_LOG=/scratch/lang/rust/work/.pkg-config.log PKG_CONFIG_PATH= KRB5_CONFIG=/usr/bin/krb5-config CWRAPPERS_CONFIG_DIR=/scratch/lang/rust/work/.cwrapper/config  /usr/pkg/bin/python3.6 ./x.py dist
running: /scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/cargo/bin/cargo build --manifest-path /scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen
/usr/lib/libgcc_s.so.1: version GCC_3.3 required by /scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/cargo/bin/cargo not found
Traceback (most recent call last):
  File "./x.py", line 20, in <module>
    bootstrap.main()
  File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 694, in main
    bootstrap()
  File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 675, in bootstrap
    rb.build_bootstrap()
  File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 423, in build_bootstrap
    run(args, env=env, verbose=self.verbose)
  File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 147, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/cargo/bin/cargo build --manifest-path /scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen
*** Error code 1

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

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


The symbol is not there, but many others are:

# strings /usr/lib/libgcc_s.so* | grep GCC
GCC_3.0
GCC_3.4
GCC_3.4.2
GCC_3.4.4
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.5.0
GCC_4.7.0
GCC: (NetBSD nb1 20160606) 5.4.0
GCC_3.4
GCC_3.0
GCC_3.4.4
GCC_4.3.0
GCC_4.2.0
GCC_3.4.2
GCC_4.5.0
GCC_4.0.0
GCC_4.7.0
GCC_3.0
GCC_3.4
GCC_3.4.2
GCC_3.4.4
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.5.0
GCC_4.7.0
GCC: (NetBSD nb1 20160606) 5.4.0
GCC_3.4
GCC_3.0
GCC_3.4.4
GCC_4.3.0
GCC_4.2.0
GCC_3.4.2
GCC_4.5.0
GCC_4.0.0
GCC_4.7.0
GCC_3.0
GCC_3.4
GCC_3.4.2
GCC_3.4.4
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.5.0
GCC_4.7.0
GCC: (NetBSD nb1 20160606) 5.4.0
GCC_3.4
GCC_3.0
GCC_3.4.4
GCC_4.3.0
GCC_4.2.0
GCC_3.4.2
GCC_4.5.0
GCC_4.0.0
GCC_4.7.0

I don't know why this particular one is needed.
>How-To-Repeat:
See above.
>Fix:
No idea.

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/52584: lang/rust build failure (bootstrap kit issue?)
Date: Fri, 6 Oct 2017 17:29:00 +0200

 On Sat, Sep 30, 2017 at 02:15:00PM +0000, Thomas Klausner wrote:
 > >Number:         52584
 > >Category:       pkg
 > >Synopsis:       lang/rust build failure (bootstrap kit issue?)

 The problem was that I had built my base system with "./build.sh .. -V
 HAVE_LIBGCC_EH=no ..." for better clang support.

 The rust bootstrap should really be built with -static-libgcc.


 When I don't do that, rust still fails to build, but differently:



 running: /scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/cargo/bin/cargo build --manifest-path /scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen
 error: failed to run `rustc` to learn about target-specific information

 Caused by:
   process didn't exit successfully: `/scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/rustc/bin/rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --target x86_64-unknown-netbsd` (exit code: 101)
 --- stderr
 error: internal compiler error: unexpected panic

 note: the compiler unexpectedly panicked. this is a bug.

 note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

 thread 'rustc' panicked at 'failed to get current_exe: No such file or directory (os error 2)', /checkout/src/librustc/session/filesearch.rs:169
 note: Run with `RUST_BACKTRACE=1` for a backtrace.


 Traceback (most recent call last):
   File "./x.py", line 20, in <module>
     bootstrap.main()
   File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 694, in main
     bootstrap()
   File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 675, in bootstrap
     rb.build_bootstrap()
   File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 423, in build_bootstrap
     run(args, env=env, verbose=self.verbose)
   File "/scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/bootstrap.py", line 147, in run
     raise RuntimeError(err)
 RuntimeError: failed to run: /scratch/lang/rust/work/rust-1.19.0-x86_64-unknown-netbsd/cargo/bin/cargo build --manifest-path /scratch/lang/rust/work/rustc-1.20.0-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen
 *** Error code 1


 From the error message I guessed that /proc needs to contain a procfs,
 and that seems to make the build proceed.
  Thomas

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.