NetBSD Problem Report #44459

From khorben@defora.org  Tue Jan 25 15:50:13 2011
Return-Path: <khorben@defora.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 9DEFC63B873
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Jan 2011 15:50:13 +0000 (UTC)
Message-Id: <20110125155006.2F34D8F@kwarx.defora.lan>
Date: Tue, 25 Jan 2011 16:50:06 +0100 (CET)
From: Pierre Pronchery <khorben@defora.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: build.sh fails to build when /tmp is mounted noexec
X-Send-Pr-Version: 3.95

>Number:         44459
>Category:       toolchain
>Synopsis:       build.sh fails to build when /tmp is mounted noexec
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 25 15:55:00 +0000 2011
>Last-Modified:  Tue Jan 25 20:20:03 +0000 2011
>Originator:     Pierre Pronchery
>Release:        NetBSD 5.1_STABLE
>Organization:
>Environment:
System: NetBSD kwarx.defora.lan 5.1_STABLE NetBSD 5.1_STABLE (GENERIC) #0: Mon Jan 24 15:02:10 CET 2011 khorben@kwarx.defora.lan:/home/amd64/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
On my system, /tmp is a mfs mounted with the "noexec" flag.
Unfortunately, this seems to break proper operation of the build.sh
script.

>How-To-Repeat:
# mount -t mfs -o noexec mfs /tmp
# cd /usr/src
# ./build.sh tools
[...]
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use `--host'.

ERROR: Configure of nbmake failed
*** BUILD ABORTED ***

>Fix:
Forcing TMPDIR to be a different location, with execution permissions,
bypasses the issue:
# TMPDIR=$HOME ./build.sh tools
[...]
checking whether the C compiler works... yes
checking whether we are cross compiling... no

A suggestion on IRC was to default to OBJDIR instead, and supply it as
TMPDIR within the environment during compilation. I think this would
make sense indeed.

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: toolchain/44459: build.sh fails to build when /tmp is mounted noexec
Date: Wed, 26 Jan 2011 07:17:32 +1100

 i think your workaround is about the best we can do here.  the problem
 is that we don't *know* what the OBJDIR is until we've built make, and
 we need this tmpdir to build make.

 documenting this probably the best we can do.


 .mrg.

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.