NetBSD Problem Report #52289

From bjjl@armv7.localdomain  Sun Jun 11 11:02:52 2017
Return-Path: <bjjl@armv7.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 119967A1F7
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Jun 2017 11:02:52 +0000 (UTC)
Message-Id: <20170611110250.54BEC2523B@armv7.localdomain>
Date: Sun, 11 Jun 2017 11:02:50 +0000 (UTC)
From: ben@pocket.services
Reply-To:
To: gnats-bugs@NetBSD.org
Subject: /bin/sh fails to execute configure script
X-Send-Pr-Version: 3.95

>Number:         52289
>Category:       bin
>Synopsis:       configure script fails for pkgsrc/graphics/ilmbase
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    adam
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 11 11:05:00 +0000 2017
>Closed-Date:    Thu Aug 05 07:51:53 +0000 2021
>Last-Modified:  Thu Aug 05 07:51:53 +0000 2021
>Originator:     ben@pocket.services
>Release:        NetBSD 8.0_BETA
>Organization:

>Environment:


System: NetBSD armv7 8.0_BETA NetBSD 8.0_BETA (RPI2.201706101850Z) evbarm
Architecture: earmv7hf
Machine: evbarm
>Description:
	cannot build pkgsrc/graphics/ilmbase
	configure script fails

	not sure if /bin/sh in 8.0_BETA is broken, or the package needs
	a patch 
>How-To-Repeat:
	cd pkgsrc/graphics/ilmbase
	make update

	checking for gcc optimization flags... -pipe
	./configure: 17376: Syntax error: no modifiers allowed with ${#var}
	*** Error code 2

	Stop.
	make[2]: stopped in /home/bjjl/pkgsrc/graphics/ilmbase
	*** Error code 1

	cross checking with 6.1_STABLE this package builds successfully


>Fix:


>Release-Note:

>Audit-Trail:
From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52289: /bin/sh fails to execute configure script
Date: Sun, 11 Jun 2017 16:52:49 +0200

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --HxCvp8vnEdFU3T9AqLugjACJamTajJxdA
 Content-Type: multipart/mixed; boundary="V986qK8rKgpxarUcUIukeNIm4PXJIoPev";
  protected-headers="v1"
 From: Kamil Rytarowski <n54@gmx.com>
 To: gnats-bugs@NetBSD.org
 Message-ID: <02ad1fa0-6ce4-13a0-8b9a-78ef619b9c7d@gmx.com>
 Subject: Re: bin/52289: /bin/sh fails to execute configure script
 References: <pr-bin-52289@gnats.netbsd.org>
  <20170611110250.54BEC2523B@armv7.localdomain>
  <20170611110500.C29C17A290@mollari.NetBSD.org>
 In-Reply-To: <20170611110500.C29C17A290@mollari.NetBSD.org>

 --V986qK8rKgpxarUcUIukeNIm4PXJIoPev
 Content-Type: text/plain; charset=windows-1252
 Content-Transfer-Encoding: quoted-printable

 On 11.06.2017 13:05, ben@pocket.services wrote:
 >> Number:         52289
 >> Category:       bin
 >> Synopsis:       configure script fails for pkgsrc/graphics/ilmbase
 >> Confidential:   no
 >> Severity:       serious
 >> Priority:       medium
 >> Responsible:    bin-bug-people
 >> State:          open
 >> Class:          sw-bug
 >> Submitter-Id:   net
 >> Arrival-Date:   Sun Jun 11 11:05:00 +0000 2017
 >> Originator:     ben@pocket.services
 >> Release:        NetBSD 8.0_BETA
 >> Organization:
 > =09
 >> Environment:
 > =09
 > =09
 > System: NetBSD armv7 8.0_BETA NetBSD 8.0_BETA (RPI2.201706101850Z) evba=
 rm
 > Architecture: earmv7hf
 > Machine: evbarm
 >> Description:
 > 	cannot build pkgsrc/graphics/ilmbase
 > 	configure script fails
 >=20
 > 	not sure if /bin/sh in 8.0_BETA is broken, or the package needs
 > 	a patch=20
 >> How-To-Repeat:
 > 	cd pkgsrc/graphics/ilmbase
 > 	make update
 >=20
 > 	checking for gcc optimization flags... -pipe
 > 	./configure: 17376: Syntax error: no modifiers allowed with ${#var}
 > 	*** Error code 2
 >=20
 > 	Stop.
 > 	make[2]: stopped in /home/bjjl/pkgsrc/graphics/ilmbase
 > 	*** Error code 1
 >=20
 > 	cross checking with 6.1_STABLE this package builds successfully
 >=20
 >=20
 >> Fix:
 > =09
 >=20
 >> Unformatted:
 >  =09
 >  =09
 >=20

 I can build this package on 8.99.1 on NetBSD/amd64.


 --V986qK8rKgpxarUcUIukeNIm4PXJIoPev--

 --HxCvp8vnEdFU3T9AqLugjACJamTajJxdA
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2

 iQIcBAEBCAAGBQJZPVlNAAoJEEuzCOmwLnZsVDoP/1aIQZs4fe8xrsN0UCECR9S5
 rZIkjhU6HAdH3K7avHK3hkN1VNKhJRlASnHYc4tCJvz88kpRISbYvHsl+4f9ZaUN
 31TmPsV4fTChkS3/QZYgvwD6lvaGBxM/T8aew/17DcjqXESX06DgSzxQtkSfQUve
 nhi90kvj1dqGMR77vyTn9KEUzsP+PT0W5FA6jGZBuWbHb+0MRgUs0jjPHab6Beq6
 KW3B+pL4jV1Ur8Z4xq/FF/vLwfcj4WDAhn/XxM6oTxF0F9wJeV6AWPYthgS9vHju
 UuUpOlQm3IKdD/s0upiO2dHjX/c9TGHyFvylrhMgjl/v8kERPogcPNKAgRs6P1Fr
 Fnx0RJJSfZr0HKoFVOgJmxZmACREG6iyevXXmS9b1UTvCJd/K5Y63a/oJu72WhtD
 YYLCV6U95NQe9kp0BE3srsOtzaW9+2jrF/q/ay2NDh9AL+iD5kxBTjh55IIDn1dI
 mSR7d0eE3PVNRLBtYOGjCx+4a1gkVZbDqqn/qwWgUV3yOy7ya6KfwZncqkO+Ploa
 vy+Ok53HBx0rb8/pGTxbGXpNWc+da63KXtwEtY6NeruZ79pZH1RXiLDqqy3+zJN9
 1HBFwr5q66PTsTg4Q/MwLYb6c9U238BZMiXiDTnidaF4BwaozchRCoYchnN9FPqQ
 CJ0EHxGBJ5vjBbqrFWL6
 =mr5o
 -----END PGP SIGNATURE-----

 --HxCvp8vnEdFU3T9AqLugjACJamTajJxdA--

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52289: /bin/sh fails to execute configure script
Date: Sun, 11 Jun 2017 23:51:12 +0700

 I will take a look at it - I'd tend to guess a script bug in this case
 (the updated shell is just stricter as to what is legal than it used
 to be - though the old version never "worked" (whatever that means here.)

 kre

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52289: /bin/sh fails to execute configure script
Date: Sun, 11 Jun 2017 15:40:52 -0500 (CDT)

 I have observed this same failure (same package) on i386-8.0_BETA and
 on amd64-8.99.1 (although it may not have picked up the very latest
 changes as Kamil reports success).

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52289: /bin/sh fails to execute configure script
Date: Mon, 12 Jun 2017 08:14:56 +0700

     Date:        Sun, 11 Jun 2017 20:45:01 +0000 (UTC)
     From:        "John D. Baker" <jdbaker@mylinuxisp.com>
     Message-ID:  <20170611204501.1AB167A28A@mollari.NetBSD.org>

   |  I have observed this same failure (same package) on i386-8.0_BETA and
   |  on amd64-8.99.1 (although it may not have picked up the very latest
   |  changes as Kamil reports success).

 It needs bash to configure, the script contains ...

         if test ${#osx_arch_array[@]} -gt 1 ; then

 which is never going to work with /bn/sh.   Previous versions of /bin/sh
 would have just let that slide by, and done almost anything, but almost
 certainly not what the author intended.

 On NetBSD it most likely does not matter, as we're not OSx and so I'd assume
 that code is never actually executed. but on other systems it does.

 I'll leave it to whoever maintains the package to decide whether to simply
 make it use bash, or to patch this line into oblivion on systems that aren't
 OSx.

 kre

Responsible-Changed-From-To: bin-bug-people->adam
Responsible-Changed-By: kre@NetBSD.org
Responsible-Changed-When: Mon, 12 Jun 2017 01:35:38 +0000
Responsible-Changed-Why:
This is a package configure script problem - requires bash
returning responsibility for this to adam


From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: kre@NetBSD.org
Subject: Re: pkg/52289: configure script fails for pkgsrc/graphics/ilmbase
Date: Mon, 12 Jun 2017 05:01:22 +0000

 It does have (since a while):
 CONFIG_SHELL=		bash

 I wonder whether it'd make sense to just pullup all the /bin/sh changes
 to 8.0_BETA (and some others). we know it works now, I can build it on
 8.99.1 /bin/sh, but apparently not on 8.0_BETA.

From: Robert Elz <kre@munnari.OZ.AU>
To: coypu@sdf.org
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/52289: configure script fails for pkgsrc/graphics/ilmbase
Date: Mon, 12 Jun 2017 12:59:26 +0700

     Date:        Mon, 12 Jun 2017 05:01:22 +0000
     From:        coypu@sdf.org
     Message-ID:  <20170612050122.GA28025@SDF.ORG>

   | It does have (since a while):
   | CONFIG_SHELL=		bash

 Then someone who understands pkgsrc ought to work out why that is not
 working (because you clearly would not be getting errors from /bin/sh
 if bash were being used.)

   | I wonder whether it'd make sense to just pullup all the /bin/sh changes
   | to 8.0_BETA (and some others). we know it works now, I can build it on
   | 8.99.1 /bin/sh, but apparently not on 8.0_BETA.

 Sorry, no, it definitely does not work now (the shell in current).  It
 limps by, but there are several problems.   Everything that has been
 changed recently that is safe to pull up has been.   I am hoping to commit
 a bunch more fixes quite soon now, but I need to verify that I am not
 making it even worse first (I hope not, but ...)   From what I have been
 seeing recently I'm actually surprised that sh (and not just with my recent
 changes, though some of the recent breakage is all my fault) works as well
 as it does - there is some "so wacky it us unbelievable" code in there
 (and it has been that way a very long time.)

 But, all that said the change that affected ilmbase (barfing on bash syntax)
 is deliberate (though we could change the way it is implemented, as I 
 suggested in a very recent message on tech-userlevel) and, apart doing what
 was postulated there, which would hide this particular case of bashness,
 I think, nothing else that has happened recently, or is going to happen, will
 make that error go away.

 If you can build ilmbase on current (and it is using sh as the shell to
 run the configure script) then something else is broken...

 kre

From: Robert Elz <kre@munnari.OZ.AU>
To: coypu@sdf.org
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/52289: configure script fails for pkgsrc/graphics/ilmbase
Date: Mon, 12 Jun 2017 13:04:33 +0700

 ps: I should make clear, that for this one, I have not attempted to
 build the package, I just saw the error message in the PR, and read
 the configure script to see why that might happen, so I do not actually
 know that it is not normally using bash as the shell for the configure
 script - is there perhaps some way to override that setting which might
 explain why some people seem able to build this, and others cannot?

From: Benjamin Lorenz <ben@pocket.services>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52289: configure script fails for pkgsrc/graphics/ilmbase
Date: Thu, 15 Jun 2017 08:49:03 +0200

 --=-sqK6GK31CXFCpt7F4bub
 Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: quoted-printable


 Installed the latest 8.0_BETA from nyftp (201706131110Z) on amd64,=C2=A0
 and here I can compile the package as well. Anything was changed?


 Is this an issue that manifests itself only on arm?

  ps: I should make clear, that for this one, I have not attempted to=20
  build the package, I just saw the error message in the PR, and read=20
  the configure script to see why that might happen, so I do not actually=20
  know that it is not normally using bash as the shell for the configure=20
  script - is there perhaps some way to override that setting which might=20
  explain why some people seem able to build this, and others cannot?=20
 =

 --=-sqK6GK31CXFCpt7F4bub
 Content-Type: text/html; charset="utf-8"

 <html><head></head><body><div>Installed the latest 8.0_BETA from nyftp (201706131110Z) on amd64,&nbsp;</div><div>and here I can compile the package as well. Anything was changed?</div><div><br></div><div>Is this an issue that manifests itself only on arm?</div><br><div><blockquote class="mori" style="margin:0 0 0 .8ex;border-left:1px solid #CCC;padding-left:1ex;"> ps: I should make clear, that for this one, I have not attempted to
 <br> build the package, I just saw the error message in the PR, and read
 <br> the configure script to see why that might happen, so I do not actually
 <br> know that it is not normally using bash as the shell for the configure
 <br> script - is there perhaps some way to override that setting which might
 <br> explain why some people seem able to build this, and others cannot?
 <br></blockquote></div></body></html>
 --=-sqK6GK31CXFCpt7F4bub--

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/52289: /bin/sh fails to execute configure script
Date: Thu, 15 Jun 2017 08:30:55 -0500 (CDT)

 No, it was not only on arm.  I experienced it on amd64-current and
 i386-8.0_BETA using pkgsrc-2017Q1.

 The problem is due to a 'bash'-ism in the configure script which slipped
 through earlier revisions of NetBSD's 'sh'.  After the corrections and
 tightening by kre, NetBSD's 'sh' properly choked on it.

 In pkgsrc-HEAD "graphics/ilmbase" has been changed to explicitly use
 'bash' to run its "./configure" scripts.  If you update at least that
 package to HEAD it should configure and build properly.  It does for me.

 There is a pending pull-up to pkgsrc-2017Q1 which includes these
 changes, but it hasn't been committed.  For myself, I just updated
 that package to HEAD.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

State-Changed-From-To: open->closed
State-Changed-By: adam@NetBSD.org
State-Changed-When: Thu, 05 Aug 2021 07:51:53 +0000
State-Changed-Why:
ilmbase is gone


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.