Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287130 - dev-libs/elfutils-0.143 fails to configure when CONFIG_SHELL is not bash
Summary: dev-libs/elfutils-0.143 fails to configure when CONFIG_SHELL is not bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-30 18:21 UTC by Harald van Dijk (RETIRED)
Modified: 2009-11-26 19:10 UTC (History)
0 users

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


Attachments
elfutils-0.143-configure-bashisms.patch (elfutils-0.143-configure-bashisms.patch,651 bytes, patch)
2009-10-01 00:49 UTC, Ryan Hill (RETIRED)
Details | Diff
elfutils-config-shell.patch (elfutils-config-shell.patch,1.15 KB, patch)
2009-11-23 18:11 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2009-09-30 18:21:55 UTC
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
./configure.lineno: 5467: Bad substitution

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-libs/elfutils-0.143/work/elfutils-0.143/config.log
 * 
 * ERROR: dev-libs/elfutils-0.143 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2574:  Called econf '--enable-nls' '--program-prefix=eu-' '--with-zlib' '--with-bzlib' '--without-lzma'
 *               ebuild.sh, line  536:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 *  The die message:
 *   econf failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/elfutils-0.143/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/elfutils-0.143/temp/environment'.
 * 


$ sed -ne 5461,5467p /var/tmp/portage/dev-libs/elfutils-0.143/work/elfutils-0.143/configure.lineno 
# 1.234<whatever> -> 1234<whatever>
case "$PACKAGE_VERSION" in
[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
*)         { { $as_echo "$as_me:5464: error: confused by version number '$PACKAGE_VERSION'" >&5
$as_echo "$as_me: error: confused by version number '$PACKAGE_VERSION'" >&2;}
   { (exit 1); exit 1; }; } ;;
esac

${a/b/c} is non-standard and not supported by dash.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2009-09-30 23:54:59 UTC
it doesn't think much of this either:

5497 # Round up to the next release API (x.y) version.
5498 eu_version=$[($eu_version + 999) / 1000]
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2009-10-01 00:49:28 UTC
Created attachment 205743 [details, diff]
elfutils-0.143-configure-bashisms.patch
Comment 3 SpanKY gentoo-dev 2009-10-01 17:30:14 UTC
are you setting CONFIG_SHELL manually ?  autoconf should be smart and find /bin/bash and then use it rather than /bin/sh.
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2009-10-01 18:36:27 UTC
Yes and no. Yes, I am setting CONFIG_SHELL manually, but no, autoconf does not force bash, and configure scripts are supposed to work with any POSIX shell. dash is missing $LINENO support, which is why configure prefers bash over dash, but that is the only reason.
Comment 5 SpanKY gentoo-dev 2009-10-01 22:43:46 UTC
i dont see the point in supporting people who force CONFIG_SHELL in their env.  if you can convince upstream to fix their stuff, that'd be great, but i dont really have hope in such things considering who the upstream maintainer is.  so if the only issue is people doing pointless stuff, then no need to change the elfutils ebuild.
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2009-10-02 17:07:57 UTC
In case I wasn't clear: if I hack dash to support LINENO (in a broken way but enough to pass the configure check), then configure uses dash _even if I do not set CONFIG_SHELL_.
Comment 7 SpanKY gentoo-dev 2009-11-21 03:48:26 UTC
you should hack in support for substring replacement too

at any rate, you can try posting the patch upstream now that it seems to have a real project:
https://fedorahosted.org/mailman/listinfo/elfutils-devel
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2009-11-21 07:44:42 UTC
(In reply to comment #7)
> you should hack in support for substring replacement too

That's not part of POSIX, so even if dash were made to support that, sh scripts still shouldn't rely on it.

I'll probably send Ryan's patch (thanks btw) to the list later today or tomorrow.
Comment 9 Harald van Dijk (RETIRED) gentoo-dev 2009-11-23 18:11:20 UTC
Created attachment 211001 [details, diff]
elfutils-config-shell.patch

The attached patch has been applied upstream (on the portability branch -- I don't know if that means it will be part of the next release), can it be added to the ebuild as well?
Comment 10 SpanKY gentoo-dev 2009-11-23 20:48:52 UTC
feel free to apply to the configure script ... i dont want to rerun autotools because of such trivial things
Comment 11 Harald van Dijk (RETIRED) gentoo-dev 2009-11-23 22:04:04 UTC
Thanks. Actually trying it shows that the commit has removed the ;; causing a syntax error in every shell, even bash. Re-adding the ;; qualifies as obvious in my opinion, but I'll wait to see if upstream changes anything else when fixing that.
Comment 12 Harald van Dijk (RETIRED) gentoo-dev 2009-11-26 19:10:19 UTC
Fixed.