NetBSD Problem Report #44834

From www@NetBSD.org  Wed Apr  6 05:59:24 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 1A09D63C1DE
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  6 Apr 2011 05:59:24 +0000 (UTC)
Message-Id: <20110406055923.3287563C1CD@www.NetBSD.org>
Date: Wed,  6 Apr 2011 05:59:23 +0000 (UTC)
From: nakaji@jp.freebsd.org
Reply-To: nakaji@jp.freebsd.org
To: gnats-bugs@NetBSD.org
Subject: Building on Solaris, sh problem: empty for loop
X-Send-Pr-Version: www-1.0

>Number:         44834
>Category:       toolchain
>Synopsis:       Building on Solaris, sh problem: empty for loop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 06 06:00:00 +0000 2011
>Closed-Date:    Sun Nov 13 23:31:56 +0000 2016
>Last-Modified:  Sun Nov 13 23:31:56 +0000 2016
>Originator:     NAKAJI Hiroyuki
>Release:        Oracle Solaris 11 Express snv_151a X86
>Organization:
>Environment:
SunOS sayaka 5.11 snv_151a i86pc i386 i86pc Solaris
>Description:
From the output of build.sh command:

#    create  libposix/Atffile
/usr/xpg4/bin/sh: syntax error at line 1 : `;' unexpected

*** Failed target:  Atffile
*** Failed command: { echo 'Content-Type: application/X-atf-atffile; version="1"'; echo; echo '# Automatically generated by bsd.test.mk.'; echo; echo 'prop: test-suite = "NetBSD"'; echo; for tp in ; do echo "tp: ${tp}"; done; } >Atffile.tmp
*** Error code 2

Stop.
nbmake: stopped in /home/nakaji/NetBSD/src/tests/lib/libposix

*** Failed target:  dependall
*** Failed command: cd "/home/nakaji/NetBSD/src/tests/lib/libposix"; home/nakaji/NetBSD/obj/tooldir.SunOS-5.11-i86pc/bin/nbmake realall

>How-To-Repeat:
% cvs co -P src
% cd src
% ./build.sh -m amd64 (or any) ...

>Fix:
As described in the current-users thread, http://mail-index.netbsd.org/current-users/2008/11/28/msg006344.html, share/mk/bsd.test.mk needs change. For example,

Index: bsd.test.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.test.mk,v
retrieving revision 1.17
diff -u -r1.17 bsd.test.mk
--- bsd.test.mk 27 Mar 2011 14:22:02 -0000      1.17
+++ bsd.test.mk 6 Apr 2011 05:58:31 -0000
@@ -72,7 +72,8 @@
        echo; \
        echo 'prop: test-suite = "NetBSD"'; \
        echo; \
-       for tp in ${_TESTS}; do \
+       tests=${_TESTS:Q}; \
+       for tp in $$tests; do \
            echo "tp: $${tp}"; \
        done; } >Atffile.tmp
        @mv Atffile.tmp Atffile

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: shattered@NetBSD.org
State-Changed-When: Wed, 05 Oct 2016 20:35:07 +0000
State-Changed-Why:
recent revision of bsd.test.mk wraps 'for lp' in 'test -n $_TESTS' -- shouldn't be a problem any more.  Can you verify?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 Nov 2016 23:31:56 +0000
State-Changed-Why:
feedback mail is bouncing


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