Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 555026 - sys-devel/bc-1.06.95: configure fails when forcing CONFIG_SHELL=/bin/dash
Summary: sys-devel/bc-1.06.95: configure fails when forcing CONFIG_SHELL=/bin/dash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2015-07-15 23:51 UTC by Alexander Tsoy
Modified: 2015-08-25 22:05 UTC (History)
1 user (show)

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


Attachments
bc-1.06.95-r1:20150715-233236.log.gz (bc-1.06.95-r1:20150715-233236.log.gz,3.39 KB, application/gzip)
2015-07-15 23:51 UTC, Alexander Tsoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2015-07-15 23:51:08 UTC
Created attachment 406886 [details]
bc-1.06.95-r1:20150715-233236.log.gz

Adding eautoreconf to src_prepare() fixes configure.

Actual error:

configure: creating ./config.status
config.status: creating Makefile
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating bc/Makefile
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating dc/Makefile
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating doc/Makefile
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating doc/texi-ver.incl
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating lib/Makefile
sed: file ./confstatg8dFv8/subs-1.sed line 29: unterminated `s' command
config.status: creating config.h
config.status: executing depfiles commands
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-devel/bc-1.06.95-r1/work/bc-1.06.95 ...
make -j8 AR=x86_64-pc-linux-gnu-ar 
make: *** No targets.  Stop.
emake failed
 * ERROR: sys-devel/bc-1.06.95-r1::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_compile
 *   environment, line 2251:  Called die
 * The specific snippet of code:
 *       emake AR="$(tc-getAR)" || die
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/bc-1.06.95-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/bc-1.06.95-r1::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/sys-devel/bc-1.06.95-r1:20150715-233236.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r1/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/bc-1.06.95-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/bc-1.06.95-r1/work/bc-1.06.95'
 * S: '/var/tmp/portage/sys-devel/bc-1.06.95-r1/work/bc-1.06.95'



From config.status:

--- snip ---
s,@DEFS@,-DHAVE_CONFIG_H,;t t
s,@ECHO_C@,
,;t t
s,@ECHO_N@,,;t t
s,@ECHO_T@, ,;t t
--- snip ---
Comment 1 Rémi Cardona (RETIRED) gentoo-dev 2015-07-19 19:55:16 UTC
Confirming the bug and the fix.

@base-system: may I push the fix?
Comment 2 SpanKY gentoo-dev 2015-07-20 02:30:00 UTC
(In reply to Rémi Cardona from comment #1)

forcing autotools is a big hammer, so let's not jump so quickly

at any rate, i can't reproduce this.
$ qlist -Iv dash
app-shells/dash-0.5.8.2
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jul 14 23:00 /bin/sh -> dash
$ ebuild bc-1.06.95-r1.ebuild clean unpack prepare configure
<runs fine>

maybe you need to upgrade your dash to the latest stable ?
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2015-07-20 06:01:42 UTC
Same version as you, I do have CONFIG_SHELL=/bin/dash otherwise configure restarts with bash.

There's nothing wrong in the configure.{ac,in}, it's just that the tarball has been generated with an older version of autoconf.  Maybe upstream could be poked into doing a new release?
Comment 4 SpanKY gentoo-dev 2015-07-20 06:26:32 UTC
(In reply to Rémi Cardona from comment #3)

i see no reason to support manually exporting CONFIG_SHELL=/bin/dash

even then, this doesn't reproduce for me:
$ tar xf /usr/portage/distfiles/dash-0.5.8.tar.gz
$ cd dash-0.5.8
$ CONFIG_SHELL=/bin/dash ./configure
<no sed errors>
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2015-07-20 06:36:04 UTC
(In reply to SpanKY from comment #4)
> i see no reason to support manually exporting CONFIG_SHELL=/bin/dash

Well, configure's LINENO detection means it will be restarted with bash, so unless dash is "fixed", setting CONFIG_SHELL is the only way of forcing autotooled projects to actually build with dash.

> even then, this doesn't reproduce for me:
> $ tar xf /usr/portage/distfiles/dash-0.5.8.tar.gz
> $ cd dash-0.5.8

It's bc that fails to build. Not dash.
Comment 6 SpanKY gentoo-dev 2015-07-20 06:47:42 UTC
(In reply to Rémi Cardona from comment #5)

right, using the correct tarball and i see the issue manually

but what you're trying doesn't really make sense.  you're either forcing configure to use a broken shell (which always fails) or configure ignores your setting and dash still isn't used.

if the only way this issue shows up is because you forced CONFIG_SHELL, then i guess there's not really anything that needs to be done here.
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2015-07-21 05:52:11 UTC
If I rebuild dash with lineno support, then I get the same issue (without any CONFIG_SHELL shenanigans)

The objective here is to remove those bashisms, or to force econf to run with bash.  Either way, to improve compatibility.

Could you reconsider ?

Thanks
Comment 8 SpanKY gentoo-dev 2015-07-27 04:02:27 UTC
(In reply to Rémi Cardona from comment #7)

sure, but we build dash w/out lineno support explicitly, so that doesn't really matter does it ?

i played around with the generated code a bit more.  the latest autoconf will change its behavior when the hardcoded CONFIG_SHELL doesn't support lineno (creating the configure.lineno file), adding forcing it globally isn't as bad as i thought.  i'll clobber it in the ebuild for this version.
Comment 9 SpanKY gentoo-dev 2015-07-27 04:03:21 UTC
should be all set now in the tree; thanks for the report!

Commit message: Force CONFIG_SHELL=/bin/bash in case the user has forced a broken one
http://sources.gentoo.org/sys-devel/bc/bc-1.06.95-r2.ebuild?r1=1.2&r2=1.3
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2015-08-25 22:05:51 UTC
Thanks!