NetBSD Problem Report #46261

From www@NetBSD.org  Tue Mar 27 03:05:12 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id BD96A63DFDD
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Mar 2012 03:05:12 +0000 (UTC)
Message-Id: <20120327030511.F24AF63BBEC@www.NetBSD.org>
Date: Tue, 27 Mar 2012 03:05:11 +0000 (UTC)
From: riz@NetBSD.org
Reply-To: riz@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: NetBSD 6.0_BETA and -current build fails in tools on some Linux systems
X-Send-Pr-Version: www-1.0

>Number:         46261
>Category:       toolchain
>Synopsis:       NetBSD 6.0_BETA and -current build fails in tools on some Linux systems
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 27 03:10:00 +0000 2012
>Closed-Date:    Thu Feb 01 07:49:05 +0000 2018
>Last-Modified:  Thu Feb 01 07:49:05 +0000 2018
>Originator:     Jeff Rizzo
>Release:        Trying to build 6.99.4
>Organization:
>Environment:
A Linux VM running CentOS 6.2 (same happens on Ubuntu 11.10)

[riz@server-76645 src]$ uname -a
Linux server-76645.localdomain 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux

>Description:
The tools build fails in gmp:

dependall ===> gmp
Cleaning stale cache files Linux-2.6.32-220.2.1.el6.x86_64-x86_64 != none
checking build system type... pentium2-unknown-linux-gnu
checking host system type... pentium2-unknown-linux-gnu
checking for a BSD-compatible install... /home/riz/obj/tooldir/bin/x86_64--netbs
d-install -c  -r
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... /home/riz/obj/tooldir/bin/nbawk
checking whether /home/riz/obj/tooldir/bin/nbmake sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking whether cc is gcc... yes
checking compiler cc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler cc -O2 -pedantic -fomit-frame-pointer ... yes
checking compiler cc -O2 -pedantic -fomit-frame-pointer has sizeof(long)==4... n
o
configure: error: could not find a working compiler, see config.log for details

*** Failed target:  .configure_done
*** Failed command: (cd build && AR=ar AWK=/home/riz/obj/tooldir/bin/nbawk CC=cc
 CPPFLAGS= CXX=c++ INSTALL=/home/riz/obj/tooldir/bin/x86_64--netbsd-install\ -c\
 \ -r LDFLAGS= LEX=/home/riz/obj/tooldir/bin/nblex M4=/home/riz/obj/tooldir/bin/
nbm4 MAKE=/home/riz/obj/tooldir/bin/nbmake RANLIB=ranlib YACC=/home/riz/obj/tool
dir/bin/nbyacc PATH="/home/riz/obj/tooldir/bin:$PATH" /bin/sh /home/riz/src/tool
s/gmp/../../external/lgpl3/gmp/dist/configure --disable-shared --prefix=/home/ri
z/obj/tooldir)
*** Error code 1

Stop.
nbmake: stopped in /home/riz/src/tools/gmp


Chatting with Matthew Green, he determined that this is because external/lgpl3/gmp/dist/config.guess gets the archictecture wrong:

[riz@server-76645 src]$ external/lgpl3/gmp/dist/config.guess 
pentium2-unknown-linux-gnu

While the config.guess for mpfr does a better job:

[riz@server-76645 src]$ external/lgpl3/mpfr/dist/config.guess 
x86_64-unknown-linux-gnu

Replacing the config.guess for gmp with the one from mpfr helps get the build further, but it then dies in gcc, and I'm not sure if just swapping it in is even the right thing.
>How-To-Repeat:
Attempt a build of NetBSD (probably any since the gcc4.5 import) on a Linux system.

my build commandline:  ./build.sh -U -O ~/obj -T ~/obj/tooldir -j4 -m amd64 tools

>Fix:
None given.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: toolchain-manager->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Thu, 20 Sep 2012 22:26:09 +0000
Responsible-Changed-Why:
take.


State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Thu, 01 Feb 2018 07:49:05 +0000
State-Changed-Why:
should be fixed.  config* were updated in a bunch of places.


>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.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.