NetBSD Problem Report #44459

From  Tue Jan 25 15:50:13 2011
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 9DEFC63B873
	for <>; 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 <>
Subject: fails to build when /tmp is mounted noexec
X-Send-Pr-Version: 3.95

>Number:         44459
>Category:       toolchain
>Synopsis: 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
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
On my system, /tmp is a mfs mounted with the "noexec" flag.
Unfortunately, this seems to break proper operation of the

# mount -t mfs -o noexec mfs /tmp
# cd /usr/src
# ./ 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

Forcing TMPDIR to be a different location, with execution permissions,
bypasses the issue:
# TMPDIR=$HOME ./ 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.

From: matthew green <>
Subject: re: toolchain/44459: 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.


NetBSD Home
NetBSD PR Database Search

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