NetBSD Problem Report #45697

From www@NetBSD.org  Thu Dec  8 14:16:37 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 9CD1563D990
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  8 Dec 2011 14:16:37 +0000 (UTC)
Message-Id: <20111208141636.CF7AB63D735@www.NetBSD.org>
Date: Thu,  8 Dec 2011 14:16:36 +0000 (UTC)
From: kvedulv@kvedulv.de
Reply-To: kvedulv@kvedulv.de
To: gnats-bugs@NetBSD.org
Subject: build.sh fails to build tools with gcc (the one coming with FreeBSD)
X-Send-Pr-Version: www-1.0

>Number:         45697
>Category:       toolchain
>Synopsis:       build.sh fails to build tools with gcc (the one coming with FreeBSD)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 08 14:20:01 +0000 2011
>Last-Modified:  Thu Dec 08 15:15:03 +0000 2011
>Originator:     Michael Moll
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD marduk.kvedulv.de 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #1: Wed Nov 16 19:18:58 CET 2011     mmoll@marduk.kvedulv.de:/usr/obj/svn/base/stable/9/sys/MARDUK  amd64

>Description:
When using
gcc version 4.2.1 20070831 patched [FreeBSD]
with
$ ./build.sh -O /usr/obj/netbsd -m sparc64 tools
it fails:
<snip>
[...]
checking how to run the C preprocessor... cc  -m32 -E
checking for memcpy... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
nbgmake: *** [configure-zlib] Error 1

*** Failed target:  .build_done
*** Failed command: (cd build && /usr/bin/env -i gcc_cv_libc_provides_ssp=yes gcc_cv_as_sparc_gotdata_op=no AR=ar AWK=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbawk CC=cc CFLAGS=-O CPPFLAGS= CXX=c++ CXXFLAGS=-O INSTALL=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/sparc64--netbsd-install\ -c\ \ -r LDFLAGS= LEX=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nblex MAKE=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbgmake PATH="/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin:$PATH" RANLIB=ranlib YACC=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbyacc MACHINE= MAKEINFO=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbmakeinfo LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS\ -DTARGET_SYSTEM_ROOT=0\ \ -DTARGET_SYSTEM_ROOT_RELOCATABLE AR=ar RANLIB=ranlib BISON=true DESTDIR= INSTALL=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/sparc64--netbsd-insta
 ll\ -c\ \ -r /usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbgmake -e MACHINE= MAKEINFO=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbmakeinfo LIBGCC= LIBGCC1= LIBGCC1_TEST= LIBGCC2= INSTALL_LIBGCC= EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS\ -DTARGET_SYSTEM_ROOT=0\ \ -DTARGET_SYSTEM_ROOT_RELOCATABLE AR=ar RANLIB=ranlib BISON=true DESTDIR= INSTALL=/usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/sparc64--netbsd-install\ -c\ \ -r all-gcc)
*** Error code 2

Stop.
nbmake: stopped in /netbsd/src/tools/gcc

*** Failed target:  dependall
*** Failed command: cd "/netbsd/src/tools/gcc"; /usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbmake realall
*** Error code 1

Stop.
nbmake: stopped in /netbsd/src/tools/gcc

*** Failed target:  dependall-gcc
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/netbsd/src/tools" ;; *) this="${dir}/"; real="/netbsd/src/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/obj/netbsd/tooldir.FreeBSD-9.0-PRERELEASE-amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget gcc dependall
*** Error code 1

Stop.
nbmake: stopped in /netbsd/src/tools

ERROR: Failed to make dependall in "tools"
*** BUILD ABORTED ***
</snip>
I installed GCC 4.6 with FreBSD ports on this system and using this as HOST_CC works.
>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/45697: build.sh fails to build tools with gcc (the one coming with FreeBSD)
Date: Thu, 8 Dec 2011 16:04:18 +0100

 On Thu, Dec 08, 2011 at 02:20:01PM +0000, kvedulv@kvedulv.de wrote:
 > checking how to run the C preprocessor... cc  -m32 -E

 Anything special in your environment or mk.conf? Why is it using -m32 here?

 Martin

From: Michael Moll <kvedulv@kvedulv.de>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: toolchain/45697: build.sh fails to build tools with gcc (the one
 coming with FreeBSD)
Date: Thu, 8 Dec 2011 16:13:52 +0100

 On Thu, Dec 08, 2011 at 03:05:03PM +0000, Martin Husemann wrote:
 >  > checking how to run the C preprocessor... cc  -m32 -E
 >  Anything special in your environment or mk.conf?

 No, nothing.

 > Why is it using -m32 here?

 No idea, sorry...

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.