NetBSD Problem Report #45367

From www@NetBSD.org  Wed Sep 14 15:47:07 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 3BCFC63C789
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 Sep 2011 15:47:07 +0000 (UTC)
Message-Id: <20110914154706.5DF1363C40C@www.NetBSD.org>
Date: Wed, 14 Sep 2011 15:47:06 +0000 (UTC)
From: gregoire.sutre@gmail.com
Reply-To: gregoire.sutre@gmail.com
To: gnats-bugs@NetBSD.org
Subject: build error due to exec-bit missing for shell script
X-Send-Pr-Version: www-1.0

>Number:         45367
>Category:       toolchain
>Synopsis:       build error due to exec-bit missing for shell script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 14 15:50:00 +0000 2011
>Closed-Date:    Thu Sep 15 09:59:26 +0000 2011
>Last-Modified:  Thu Sep 15 09:59:26 +0000 2011
>Originator:     Grégoire Sutre
>Release:        
>Organization:
>Environment:
Linux yosemite 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux

>Description:
Extracting -current source sets obtained from

http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201109131640Z/source/sets/

and running building tools gives:

$ ./build.sh -U -m amd64 tools
/bin/sh ./libtool --tag=CC    --mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -I. -I/tmp/src/tools/gmp/../../external/lgpl3/gmp/dist -D__GMP_WITHIN_GMP     -O2 -pedantic -m64 -mtune=core2 -march=core2 -c -o tal-reent.lo /tmp/src/tools/gmp/../../external/lgpl3/gmp/dist/tal-reent.c
libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I/tmp/src/tools/gmp/../../external/lgpl3/gmp/dist -D__GMP_WITHIN_GMP -O2 -pedantic -m64 -mtune=core2 -march=core2 -c /tmp/src/tools/gmp/../../external/lgpl3/gmp/dist/tal-reent.c -o tal-reent.o
nbmake: don't know how to make mpn/add_n.lo. Stop

nbmake: stopped in /tmp/src/tools/gmp/obj/build

*** Failed target:  all-recursive
*** Failed command: fail= failcom='exit 1'; for f in x $MAKEFLAGS; do case $f in *=* | --[!k]*);; *k*) failcom='fail=yes';; esac; done; dot_seen=no; target=`echo all-recursive | sed s/-recursive//`; list='tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc'; for subdir in $list; do echo "Making $target in $subdir"; if test "$subdir" = "."; then dot_seen=yes; local_target="$target-am"; else local_target="$target"; fi; (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && /tmp/src/obj/tooldir.Linux-3.0.0-1-amd64-x86_64/bin/nbmake -f /tmp/src/tools/gmp/../Makefile.gnuwrap $local_target) || eval $failcom; done; if test "$dot_seen" = "no"; then /tmp/src/obj/tooldir.Linux-3.0.0-1-amd64-x86_64/bin/nbmake -f /tmp/src/tools/gmp/../Makefile.gnuwrap "$target-am" || exit 1; fi; test -z "$fail"
*** Error code 1


Increasing verbosity (-N 4) shows:

../libtool: 2: eval: /tmp/src/tools/gmp/../../external/lgpl3/gmp/dist/mpn/m4-ccas: Permission denied


Indeed, the file src/external/lgpl3/gmp/dist/mpn/m4-ccas is executable when obtained by cvs, but, in the src.tgz source set, its permissions are

-rw-rw-r-- root/wsrc      2382 2011-06-20 07:54 usr/src/external/lgpl3/gmp/dist/mpn/m4-ccas

>How-To-Repeat:
Extracting -current source sets obtained from

http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/<timestamp>/source/sets/

and run: ./build.sh -U tools

>Fix:
The following patch fixes this issue by prefixing the call to the script
with $(SHELL).  This is inspired from the commit

http://mail-index.netbsd.org/netbsd-bugs/2008/10/12/msg006466.html

that solved a similar issue.


diff -Naur src/external/lgpl3/gmp/dist/mpn/Makefile.in src.new/external/lgpl3/gmp/dist/mpn/Makefile.in
--- src/external/lgpl3/gmp/dist/mpn/Makefile.in	2011-06-20 07:54:38.000000000 +0200
+++ src.new/external/lgpl3/gmp/dist/mpn/Makefile.in	2011-09-14 17:08:30.261315615 +0200
@@ -1022,7 +1022,7 @@
 	$(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
 	$(RM_TMP) tmp-$*.s
 .asm.lo:
-	$(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<
+	$(LIBTOOL) --mode=compile --tag=CC $(SHELL) $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<

 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45367 CVS commit: src/external/lgpl3/gmp/dist/mpn
Date: Wed, 14 Sep 2011 12:35:22 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Wed Sep 14 16:35:22 UTC 2011

 Modified Files:
 	src/external/lgpl3/gmp/dist/mpn: Makefile.in

 Log Message:
 PR/45367: Grégoire Sutre: don't depend on m4-ccas and cpp-ccas to be
 executable; invoke the shell to run them.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/gmp/dist/mpn/Makefile.in

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 14 Sep 2011 21:33:36 +0000
State-Changed-Why:
Christos committed something, ok to close?


From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= <gregoire.sutre@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: wiz@NetBSD.org, toolchain-manager@netbsd.org, netbsd-bugs@netbsd.org, 
 gnats-admin@netbsd.org
Subject: Re: toolchain/45367 (build error due to exec-bit missing for shell
 script)
Date: Thu, 15 Sep 2011 11:51:42 +0200

 On 09/14/2011 11:33 PM, wiz@NetBSD.org wrote:
 > Synopsis: build error due to exec-bit missing for shell script
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: wiz@NetBSD.org
 > State-Changed-When: Wed, 14 Sep 2011 21:33:36 +0000
 > State-Changed-Why:
 > Christos committed something, ok to close?

 Yes, it can be closed.  For the record, I tested with source sets from

 http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201109141910Z/source/sets/

 and this error did not occur.

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 15 Sep 2011 09:59:26 +0000
State-Changed-Why:
Confirmed fixed, thanks.


>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.