Sebastian Pipping | 1 Oct 21:29

Configure does not check for Flex and Texinfo (cvs head)

With the latest cvs head without flex I run into:

    /bin/bash ../build-aux/ylwrap scan-code.l .c scan-code.c -- :
    /bin/bash ../build-aux/ylwrap scan-skel.l .c scan-skel.c -- :
    /bin/bash ../build-aux/ylwrap scan-gram.l .c scan-gram.c -- :
    make[1]: *** [scan-skel.c] Error 1
    make[1]: *** [scan-gram.c] Error 1
    make[1]: *** [scan-code.c] Error 1

With flex installed but no texinfo I run into:

    WARNING: `makeinfo' is missing on your system.  [..]
    make[1]: *** [bison.info] Error 1

Sebastian

Paul Eggert | 6 Oct 00:34
Favicon

Re: Configure does not check for Flex and Texinfo (cvs head)

These issues are addressed in README-hacking.  Briefly, if you are building
from CVS, you are assumed to be a hacker who has all the tools.  If you
build from a tarball, you don't need Flex or Texinfo.

Sebastian Pipping | 6 Oct 00:38

Re: Configure does not check for Flex and Texinfo (cvs head)

Paul Eggert wrote:
> These issues are addressed in README-hacking.  Briefly, if you are building
> from CVS, you are assumed to be a hacker who has all the tools.  If you
> build from a tarball, you don't need Flex or Texinfo.

------------------------------------------------------------
Well, I didn't plan to do hacking so I didn't look
at README-hacking. I just wanted to built a bleeding
edge version. It took me some time to figure out
it's Flex that's missing so a proper message could
have save me some time. So my vote is: please
add a message.

Sebastian

Paul Eggert | 6 Oct 01:11
Favicon

Re: Configure does not check for Flex and Texinfo (cvs head)

Sebastian Pipping <webmaster <at> hartwork.org> writes:

> Well, I didn't plan to do hacking so I didn't look
> at README-hacking. I just wanted to built a bleeding
> edge version.

If you want to use a bleeding edge version, then by definition you
have to be prepared to do some hacking.  :-)

I suppose it might be a bit nicer to output the message that you
describe, but as a hacker you should be able to propose a patch to do
that.

Claudio Saavedra | 6 Oct 02:09
Picon

Re: Configure does not check for Flex and Texinfo (cvs head)

Hi Paul,

El vie, 05-10-2007 a las 16:11 -0700, Paul Eggert escribió:
> I suppose it might be a bit nicer to output the message that you
> describe, but as a hacker you should be able to propose a patch to do
> that.

Would the attached patch make it?

Claudio

--

-- 
Claudio Saavedra <csaavedra <at> alumnos.utalca.cl>
diff -r 72f974a255dc ChangeLog
--- a/ChangeLog	Fri Oct 05 02:54:33 2007 +0000
+++ b/ChangeLog	Fri Oct 05 20:08:28 2007 -0400
@@ -1,3 +1,7 @@ 2007-10-04  Joel E. Denny  <jdenny <at> ces.c
+2007-10-05  Claudio Saavedra  <csaavedra <at> alumnos.utalca.cl>
+
+	* configure.ac: Print an error message if texinfo or flex are missing.
+
 2007-10-04  Joel E. Denny  <jdenny <at> ces.clemson.edu>

 	Implement --print-datadir.
diff -r 72f974a255dc configure.ac
--- a/configure.ac	Fri Oct 05 02:54:33 2007 +0000
+++ b/configure.ac	Fri Oct 05 20:08:28 2007 -0400
@@ -80,6 +80,9 @@ AC_SUBST([YACC_LIBRARY])
(Continue reading)

Sebastian Pipping | 6 Oct 02:24

Re: Configure does not check for Flex and Texinfo (cvs head)

Claudio Saavedra wrote:
> Hi Paul,
> 
> El vie, 05-10-2007 a las 16:11 -0700, Paul Eggert escribió:
>> I suppose it might be a bit nicer to output the message that you
>> describe, but as a hacker you should be able to propose a patch to do
>> that.
> 
> Would the attached patch make it?

Guess what I was working on for the last hour. I hate it.
You forgot to check for bootstrap mode.

I also removed AC_PROG_LEX and AC_PROG_YACC - can I do that?
I read they just set variables.

Sebastian
Index: configure.ac
===================================================================
RCS file: /sources/bison/bison/configure.ac,v
retrieving revision 1.81
diff -u -r1.81 configure.ac
--- configure.ac	15 Aug 2007 20:21:20 -0000	1.81
+++ configure.ac	6 Oct 2007 00:20:49 -0000
@@ -79,8 +79,6 @@
 AC_SUBST([YACC_LIBRARY])

 # Checks for programs.
(Continue reading)

Paul Eggert | 6 Oct 09:19
Favicon

Re: Configure does not check for Flex and Texinfo (cvs head)

Sebastian Pipping <webmaster <at> hartwork.org> writes:

> +if test -a bootstrap ; then

This doesn't look right; "test -a" is not portable.

Also, why test only lex and makeinfo; shouldn't there be similar tests
for other tools?

Sebastian Pipping <webmaster <at> hartwork.org> writes:

> I also removed AC_PROG_LEX and AC_PROG_YACC - can I do that?
> I read they just set variables.

You didn't remove AC_PROG_LEX.

AC_PROG_YACC is a bit odd, because it's a bootstrapping issue of
a different sort.  I'm not sure it's safe to remove.

Karel Kulhavy | 9 Oct 12:12

Illogical parser hang

Hello

I wrote a simple grammar that has only one symbol 'a' and a reduce reduce
conflict. Yet, if I feed a single 'b' as a text to the input, the parser
generated by Bison hangs. Shouldn't it be immediately obvious to the parser
that if there is no 'b' in the grammar and the first token he gets on the input
is 'b' that the input is invalid?

See attached pinnacle.tgz, unpack it and enter. Then type "make". It will
demonstrate the hang.

How I came to the problem - I am writing a BASIC interpreter. I discovered it
hangs if someone accidentally types ';' after a command even when ';' is an
invalid token in the BASIC and is never used in the grammar. I simplified the
compiler as much as was possible while it still hangs and got this.

CL<
Attachment (pinnacle.tgz): application/x-tar-gz, 567 bytes
Paul Eggert | 10 Oct 08:43
Favicon

Re: Configure does not check for Flex and Texinfo (cvs head)

Sebastian Pipping <webmaster <at> hartwork.org> writes:

>>> +if test -a bootstrap ; then
>> 
>> This doesn't look right; "test -a" is not portable.
>
> Hm, what's not portable about that?

The better question is what _is_ portable about it?  I've never seen
"test -a" used before.  It's not specified by POSIX
<http://www.opengroup.org/onlinepubs/009695399/utilities/test.html>

>> Also, why test only lex and makeinfo; shouldn't there be similar tests
>> for other tools?
>
> Bison has more dependencies besides Texinfo and flex that
> are not checked on? Please make a list of them so I can
> come up with a patch.

See README-hacking.

>> AC_PROG_YACC is a bit odd, because it's a bootstrapping issue of
>> a different sort.  I'm not sure it's safe to remove.
>
> If we don't use Bison/Yacc for bootstrapping itself

But we do use it to build itself.

Sebastian Pipping | 10 Oct 18:56

Re: Configure does not check for Flex and Texinfo (cvs head)

Paul Eggert wrote:
>>>> +if test -a bootstrap ; then
>>> This doesn't look right; "test -a" is not portable.
>> Hm, what's not portable about that?
> 
> The better question is what _is_ portable about it?  I've never seen
> "test -a" used before.  It's not specified by POSIX
> <http://www.opengroup.org/onlinepubs/009695399/utilities/test.html>

Okay, maybe -f instead? That's in the list.

Sebastian


Gmane