[perl #34963] [PATCH] r7825: suppress stderr output during 'bc' step in configure

6 views
Skip to first unread message

Jerry Gay

unread,
Apr 13, 2005, 12:53:23 PM4/13/05
to bugs-bi...@rt.perl.org
# New Ticket Created by jerry gay
# Please include the string: [perl #34963]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34963 >


This transaction appears to have no content

bc.patch

Andy Dougherty

unread,
Apr 13, 2005, 2:12:36 PM4/13/05
to Perl6 Internals
On Wed, 13 Apr 2005, Jerry Gay wrote:

> the attached patch against r7825 suppresses stderr output during 'bc'
> step in configure

I was thinking along similar lines, but got stuck wondering: "Why is
Configure.pl looking for bc in the first place? It doesn't do anything
with the result."

The problem is complicated because there are significant differences among
bc(1) commands. For example, Solaris has a traditional bc(1) command. It
does not accept the '-v' option, and Configure.pl currently sets
has_bc='no'. The GNU version of bc(1) has many extensions beyond
traditional bc(1). It does accept a '-v' option, and Configure.pl
currently sets has_bc='yes'.

A reasonable Configure.pl plan, then, would be to construct a bc input
file representative of the sorts of things we actually use bc for, run the
system bc (if there is one), and check that the output is as it should be.

Since bc isn't used anywhere yet, I wasn't able to construct such a
"typical" bc input file.

--
Andy Dougherty doug...@lafayette.edu

Jerry Gay

unread,
Apr 13, 2005, 2:53:17 PM4/13/05
to Andy Dougherty, Perl6 Internals
On 4/13/05, Andy Dougherty <doug...@lafayette.edu> wrote:

> On Wed, 13 Apr 2005, Jerry Gay wrote:
>
> > the attached patch against r7825 suppresses stderr output during 'bc'
> > step in configure
>
> I was thinking along similar lines, but got stuck wondering: "Why is
> Configure.pl looking for bc in the first place? It doesn't do anything
> with the result."

bernhard, (r7757), notes:

r7757 | bernhard | 2005-04-02 03:00:05 -0800 (Sat, 02 Apr 2005) | 4 lines
Changed paths:
M /trunk/MANIFEST
A /trunk/config/auto/bc.pl
M /trunk/config/auto/perldoc.pl
M /trunk/lib/Parrot/Configure/RunSteps.pm

Check for existence of 'bc', the basic calculator, on the system.
When running tests for 'Parrot bc', I'd like to doublecheck
with the standard 'bc'.

so it seems he's using it for testing against parrot. perhaps there's some
basic functionality that 'bc' shares in its many incarnations, including a
method of detection that can be used reliably during configure. since i
can't find 'Parrot bc', i'll wait for bernhard to weigh in.

> Andy Dougherty doug...@lafayette.edu

~jerry

Bernhard Schmalhofer

unread,
Apr 14, 2005, 3:10:08 AM4/14/05
to Andy Dougherty, Perl6 Internals

> I was thinking along similar lines, but got stuck wondering: "Why is
> Configure.pl looking for bc in the first place? It doesn't do anything
> with the result."
That's true. I am working on 'Parrot bc', based on ANTLR and Python.
For the tests I want to doublecheck whether there are any discrepancies
between the system bc and Parrot bc.


> The problem is complicated because there are significant differences among
> bc(1) commands. For example, Solaris has a traditional bc(1) command. It
> does not accept the '-v' option, and Configure.pl currently sets
> has_bc='no'. The GNU version of bc(1) has many extensions beyond
> traditional bc(1). It does accept a '-v' option, and Configure.pl
> currently sets has_bc='yes'.

'Parrot bc' is planned to support only the POSIX standard. GNU bc has a
'-s', standard, option. So it is a good target for verifying 'Parrot bc'.
For now it might be the easiest thing to check only for 'has_gnu_bc'.
Ultimatively the bc test should end up in 'languages/bc', but AFAIK,
there is no language specific config yet.

CU, Bernhard

--
**************************************************
Dipl.-Physiker Bernhard Schmalhofer
Senior Developer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89 895574-839
Fax: +49 89 895574-825
eMail: Bernhard.S...@biomax.com
Website: www.biomax.com
**************************************************

Jens Rieks

unread,
Apr 14, 2005, 9:21:05 AM4/14/05
to perl6-i...@perl.org
On Wednesday 13 April 2005 18:53, jerry gay wrote:
> # New Ticket Created by jerry gay
> # Please include the string: [perl #34963]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34963 >
2>&1 is not the best way, it only works if the shell supports it, which is not
always the case (AFAIK).

I suggest to use the new "capture_output" (from
lib/Parrot/Configure/Step.pm)...

BTW: the same problem is in
- config/inter/progs.pl
- config/init/hints/mswin32.pl
- config/auto/antlr.pl
- config/auto/python.pl

On Win98/VC6, there is a file "&1" after Configure.pl ran.

jens

Reply all
Reply to author
Forward
0 new messages