Eric Blake | 3 Apr 05:21
Gravatar

Re: Reg M4


[adding bug-bison]

According to Prathima G on 4/2/2009 8:19 AM:
> 
> Hi ,
> 
> 
> While doing a ./configure for bison I receive the error:
> 
> checking for gm4... no
> checking for gnum4... no
> checking for m4... /bin/m4
> checking whether m4 supports frozen files... no
> configure: error: GNU M4 1.4 is required
>
> How to fix it?
>
> I'm running this on HP-UX 11.0 box and have just installed GNU m4 1.4.6

Which version of bison?  At any rate, the version of m4/m4.m4 in bison.git
is rather old, and should probably be replaced with the version from
autoconf 2.63 or newer.  The bison version suffers from the problem that
it only finds the first m4 in PATH, whether or not it is good enough.  The
autoconf version has been improved to search the entire PATH, and validate
that whichever m4 is picked is really up to the task, rather than just
relying on its position in PATH.

Meanwhile, the workaround is simple - simply install GNU m4 earlier in
your PATH, or even add a symlink gm4 that points to your fresh
(Continue reading)

Prathima G | 3 Apr 16:39
Favicon

Re: Reg M4


Hi ,


Created the Symlinks  for gm4 and gnu4 and the PATH is also fine .

But still we raegetting the same problem .

We are using bison-2.3 and the version of the autoconf is 2.60 .

Could you please look into this.

\\BR
Prathima




Eric Blake <ebb9 <at> byu.net>

04/03/2009 08:51 AM

To
Prathima G <prathima.g <at> tcs.com>
cc
bug-m4 <at> gnu.org, K Mohammad <k.mohammad <at> tcs.com>, bug-bison <at> gnu.org
Subject
Re: Reg M4





-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[adding bug-bison]

According to Prathima G on 4/2/2009 8:19 AM:
>
> Hi ,
>
>
> While doing a ./configure for bison I receive the error:
>
> checking for gm4... no
> checking for gnum4... no
> checking for m4... /bin/m4
> checking whether m4 supports frozen files... no
> configure: error: GNU M4 1.4 is required
>
> How to fix it?
>
> I'm running this on HP-UX 11.0 box and have just installed GNU m4 1.4.6

Which version of bison?  At any rate, the version of m4/m4.m4 in bison.git
is rather old, and should probably be replaced with the version from
autoconf 2.63 or newer.  The bison version suffers from the problem that
it only finds the first m4 in PATH, whether or not it is good enough.  The
autoconf version has been improved to search the entire PATH, and validate
that whichever m4 is picked is really up to the task, rather than just
relying on its position in PATH.

Meanwhile, the workaround is simple - simply install GNU m4 earlier in
your PATH, or even add a symlink gm4 that points to your fresh
installation of GNU m4.

> Notice: The information contained in this e-mail

As a note of netiquette, this disclaimer is unenforceable on publicly
archived mailing lists.  However, some people refuse to reply to such mail
on principle.  You are better off using a different email account that
avoids adding this text from your employer.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 <at> byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknVgJ0ACgkQ84KuGfSFAYA8dwCggZHvebGXm3+oiNuMlfwo2jkd
y+AAn1v9GDGV+6w42du3NidnmyEG7ZvI
=9hhG
-----END PGP SIGNATURE-----

ForwardSourceID:NT0000262E    
=====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Eric Blake | 3 Apr 16:56
Gravatar

Re: Reg M4


[this is not an M4 bug; future replies can drop the bug-m4 list]

[please don't top-post on technical lists]

According to Prathima G on 4/3/2009 8:39 AM:
> 
> Hi ,
> 
> 
> Created the Symlinks  for gm4 and gnu4 and the PATH is also fine .
> 
> But still we raegetting the same problem .

What absolute path did you create your gm4 symlink at?  And what is your PATH?

> 
> We are using bison-2.3

Well, I already verified that all released versions of bison have the same
bug in their configure scripts; the best you can hope for is that the next
bison release will perform a better search for a working m4, by copying
how autoconf does the same search.

--
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 <at> byu.net
Alexandre Bique | 4 Apr 02:22
Picon
Gravatar

Re: No header guard in glr.c skeleton (bison 2.4.1)

On Mon, Jan 19, 2009 at 9:27 PM, Akim Demaille <akim <at> lrde.epita.fr> wrote:
> Le 17 janv. 09 à 02:29, Alexandre Bique a écrit :
>
>> Hi,
>>
>> I just patched glr.c skeleton because it generates header without guards.
>> I attached the patch.
>
> Hi Alexandre.
>
> Thank you for the patch.  Unfortunately the cure is nastier than the
> disease: you used a constant string as a header guard, which will make life
> harder for people who mix several parsers.
Well, i just updated my patch. It use b4_prefix and translate [a-z:]
-> [A-Z_]. I think it should work with people who mix several parsers.

> But you definitely have a point here, we should do something.  As a matter
> of fact, even the plain old yacc-like header does not have include-guards.
I checked the git repository and i haven't find any commit related to
this issue. But i may have missed it.

> We'll address this.
>
>> Thank you for bison.
>
> Thank you for saying!
>
> Out of curiosity, what are you using glr.c for?
For the fun ;-) But i should use glr.cc because I do C++. But I feel
that the C interface is simpler to use. I wonder if it is difficult to
maintain skeletons for the C and C++, and if one is more performant
than another ?

Thank you.

PS: the patch is against bison 2.4.1
--

-- 
Alexandre Bique
Attachment (glr.c-header-guard.patch): application/octet-stream, 660 bytes
Joel E. Denny | 5 Apr 00:53

Re: Bison feature requests: types declared with rules

On Tue, 24 Feb 2009, Wilson Snyder wrote:

> >Why not just put the %type right before the rule in the grammar section?
> >
> >  %%
> >  %type <t> rule1;
> >  rule1: ... ;
> >
> >However, notice that a semicolon is required when declarations are moved 
> >to the grammar section.
> 
> Thanks, I wasn't aware of that syntax that helps a lot.
> Would you be willing to add an extra sentence in the manual
> under "Nonterminal symbols" saying that %type can be used in
> the rule section with the semicolon?  That would have helped
> me out.

Sorry for the slow reply.  Now that I think about it, I don't believe the 
ability to put declarations in the grammar section is documented at all. 
Hopefully we'll get to it soon.

Joel E. Denny | 5 Apr 03:41

Re: Reg M4

Hi Eric,

On Thu, 2 Apr 2009, Eric Blake wrote:

> Which version of bison?  At any rate, the version of m4/m4.m4 in bison.git
> is rather old,

I recall you mentioned this once before.  I'm sorry I forgot about it.

> and should probably be replaced with the version from
> autoconf 2.63 or newer.

Ok, I pushed the following patch to master.  I pushed the same patch to 
branch-2.4.2 except that we don't have an autoconf submodule there, so I 
just copied m4/m4.m4 instead of creating a symlink.

There's still the nagging question of why we claim to require GNU m4 1.4.6 
instead of 1.4.5.  I still don't know the answer.  As before this change, 
if configure does not find what it believes is a suitable m4, the version 
that it claims is required is older than 1.4.6.  Oh well, I guess.

Thanks.

From 62c99cf4eab29195f4cd02da54e7795a31d6d985 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <jdenny <at> ces.clemson.edu>
Date: Sat, 4 Apr 2009 20:58:46 -0400
Subject: [PATCH] Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.

If the first m4 in $PATH is wrong, it keeps looking.  Moreover, its
requirements for a correct m4 are stricter.
* m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
* configure.ac: Update to use AC_PROG_GNU_M4.
Reported by Eric Blake.

diff --git a/ChangeLog b/ChangeLog
index abae4b8..fcd81db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-04  Joel E. Denny  <jdenny <at> ces.clemson.edu>
+
+	Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
+	If the first m4 in $PATH is wrong, it keeps looking.  Moreover, its
+	requirements for a correct m4 are stricter.
+	* m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
+	* configure.ac: Update to use AC_PROG_GNU_M4.
+	Reported by Eric Blake.
+
 2009-04-03  Joel E. Denny  <jdenny <at> ces.clemson.edu>

 	Help with updating web manual.
diff --git a/configure.ac b/configure.ac
index 5698606..871b0df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # Configure template for GNU Bison.                   -*-Autoconf-*-
 #
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -92,10 +92,7 @@ AC_SUBST([YACC_LIBRARY])
 AC_PROG_LEX
 AC_PROG_YACC
 AC_PROG_RANLIB
-BISON_PROG_GNU_M4
-if test x"$ac_cv_prog_gnu_m4" != xyes; then
-  AC_MSG_ERROR([GNU M4 1.4 is required])
-fi
+AC_PROG_GNU_M4
 AC_DEFINE_UNQUOTED([M4], ["$M4"], [Define to the GNU M4 executable name.])
 AM_MISSING_PROG([HELP2MAN], [help2man])
 AC_PATH_PROG([XSLTPROC], [xsltproc])
diff --git a/m4/m4.m4 b/m4/m4.m4
deleted file mode 100644
index be0140f..5b176ba
--- a/m4/m4.m4
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2000 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# BISON_PROG_GNU_M4
-# -----------------
-# Check for GNU m4, at least 1.3 (supports frozen files).
-AC_DEFUN([BISON_PROG_GNU_M4],
-[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
-AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
-[ac_cv_prog_gnu_m4=no
-if test x"$M4" != x; then
-  case `$M4 --help < /dev/null 2>&1` in
-    *reload-state*) ac_cv_prog_gnu_m4=yes ;;
-  esac
-fi])])
diff --git a/m4/m4.m4 b/m4/m4.m4
new file mode 120000
index be0140f..5b176ba
--- /dev/null
+++ b/m4/m4.m4
@@ -0,0 +1 @@
+../submodules/autoconf/m4/m4.m4
\ No newline at end of file
--

-- 
1.5.4.3

Alexandre Bique | 17 Apr 22:59
Picon
Gravatar

Re: No header guard in glr.c skeleton (bison 2.4.1)

Hi,

On Sat, Apr 4, 2009 at 1:22 AM, Alexandre Bique
<bique.alexandre <at> gmail.com> wrote:
> On Mon, Jan 19, 2009 at 9:27 PM, Akim Demaille <akim <at> lrde.epita.fr> wrote:
>> Thank you for the patch.  Unfortunately the cure is nastier than the
>> disease: you used a constant string as a header guard, which will make life
>> harder for people who mix several parsers.
> Well, i just updated my patch. It use b4_prefix and translate [a-z:]
> -> [A-Z_]. I think it should work with people who mix several parsers.

Is there something wrong with my previous update ?
(http://lists.gnu.org/archive/html/bug-bison/2009-04/msg00003.html)

Thank you.

--

-- 
Alexandre Bique

Akim Demaille | 21 Apr 08:45
Picon
Picon
Picon
Gravatar

Re: No header guard in glr.c skeleton (bison 2.4.1)


Le 17 avr. 09 à 22:59, Alexandre Bique a écrit :

> Hi,
>
> On Sat, Apr 4, 2009 at 1:22 AM, Alexandre Bique
> <bique.alexandre <at> gmail.com> wrote:
>> On Mon, Jan 19, 2009 at 9:27 PM, Akim Demaille <akim <at> lrde.epita.fr>  
>> wrote:
>>> Thank you for the patch.  Unfortunately the cure is nastier than the
>>> disease: you used a constant string as a header guard, which will  
>>> make life
>>> harder for people who mix several parsers.
>> Well, i just updated my patch. It use b4_prefix and translate [a-z:]
>> -> [A-Z_]. I think it should work with people who mix several  
>> parsers.
>
> Is there something wrong with my previous update ?
> (http://lists.gnu.org/archive/html/bug-bison/2009-04/msg00003.html)

Hi,

Sorry for the delays Alexandre.  We are quite busy, and we also have  
ongoing changes that we would like to focus on before working on  
something else.  In other words, please be patient, and ping us from  
time to time :)

Alexandre Bique | 21 Apr 13:56
Picon
Gravatar

Re: No header guard in glr.c skeleton (bison 2.4.1)

On Tue, Apr 21, 2009 at 7:45 AM, Akim Demaille <akim <at> lrde.epita.fr> wrote:
>
> Le 17 avr. 09 à 22:59, Alexandre Bique a écrit :
>
>> Hi,
>>
>> On Sat, Apr 4, 2009 at 1:22 AM, Alexandre Bique
>> <bique.alexandre <at> gmail.com> wrote:
>>>
>>> On Mon, Jan 19, 2009 at 9:27 PM, Akim Demaille <akim <at> lrde.epita.fr>
>>> wrote:
>>>>
>>>> Thank you for the patch.  Unfortunately the cure is nastier than the
>>>> disease: you used a constant string as a header guard, which will make
>>>> life
>>>> harder for people who mix several parsers.
>>>
>>> Well, i just updated my patch. It use b4_prefix and translate [a-z:]
>>> -> [A-Z_]. I think it should work with people who mix several parsers.
>>
>> Is there something wrong with my previous update ?
>> (http://lists.gnu.org/archive/html/bug-bison/2009-04/msg00003.html)
>
> Hi,
>
> Sorry for the delays Alexandre.  We are quite busy, and we also have ongoing
> changes that we would like to focus on before working on something else.  In
> other words, please be patient, and ping us from time to time :)

Thank you for your answer. I'll ping you back in one month ;-)

--

-- 
Alexandre Bique


Gmane