Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154553 - sys-apps/kbd-1.12-r8 fragile configure script...
Summary: sys-apps/kbd-1.12-r8 fragile configure script...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-09 03:54 UTC by Steve Haeck
Modified: 2006-11-10 04:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Haeck 2006-11-09 03:54:40 UTC
When I emerged world, I got this error:
--
Configuring for PREFIX=/usr
Configuring for DATADIR=/usr/share
Configuring for MANDIR=/usr/share/man
checking for gcc
./configure: 151: Syntax error: Bad substitution
!!! ERROR: sys-apps/kbd-1.12-r8 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  kbd-1.12-r8.ebuild, line 93:   Called die
--

Line 151 of configure reads:

echo "ARCH=${TARGET_ARCH/i?86/i386}" >> make_include

but line 1 reads

#!/bin/sh

Line 151 appears to depend upon bash functionality in /bin/sh.  For many users this poses no problem, but where /bin/sh is a symlink to ash (say) this caused the ebuild to fail.  Having discussed this on gentoo.user it seems that the consensus of opinion was that either the configure script should avoid non-vanilla Bourne shell features, or it should request bash (or some other appropriate shell) explicitly in the she-bang line.  The latter appears to be a quick and easy fix that would avoid this kind of difficulty.
Comment 1 SpanKY gentoo-dev 2006-11-09 16:17:18 UTC
for future reference, changing /bin/sh to be something other than /bin/bash is not supported ...

you are correct here that the expression ${VAR/foo/bar} is not POSIX, so i've fixed it in cvs
Comment 2 Steve Haeck 2006-11-10 04:34:43 UTC
(In reply to comment #1)
> for future reference, changing /bin/sh to be something other than /bin/bash is
> not supported ...

I can't argue with that...  I can't even remember exactly why my /bin/sh was ash.  I've changed it back now for an easy life. :-)

> you are correct here that the expression ${VAR/foo/bar} is not POSIX, so i've
> fixed it in cvs

Fantastic - that's at least an academic improvement. :-)