Re: [BUGS] Detecting proper bison version before make

Lists: pgsql-bugsPostg윈 토토SQL :
From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Detecting proper bison version before make
Date: 2003-06-02 00:56:42
Message-ID: bc411aa5a5cd2ae5f80e420d2c7a21d9@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


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

I just installed Postgres on an older machine and was surprised
that configure did not throw an error about running an old version
of bison, but let me get a bit into the whole 'make' cycle before
a cryptic error was thrown. Can the configure script be made to check
for a proper version of bison?

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200306012154
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE+2q7qvJuQZxSWSsgRAjmqAKDOWFXmckpYnvrIXSKVY7CQNWcn2gCbBb7b
il6Rrr+MmQ4fUrFNN4dRNyM=
=2Y3s
-----END PGP SIGNATURE-----


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Detecting proper bison version before make
Date: 2003-06-05 18:59:41
Message-ID: Pine.LNX.4.44.0306051854450.2050-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Greg Sabino Mullane writes:

> Can the configure script be made to check for a proper version of bison?

Normally the parser files are prebuild and bison is never invoked. So it
seems wasteful to do a bunch of checking for this rare case.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Detecting proper bison version before make
Date: 2003-06-06 19:11:23
Message-ID: 200306061911.h56JBNk06480@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


Here is an applied patch to check for bison version >= 1.875 and print a
warning. I piggybacks on the existing bison warning.

---------------------------------------------------------------------------

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
>
[ PGP not available, raw data follows ]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> I just installed Postgres on an older machine and was surprised
> that configure did not throw an error about running an old version
> of bison, but let me get a bit into the whole 'make' cycle before
> a cryptic error was thrown. Can the configure script be made to check
> for a proper version of bison?
>
> - --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> PGP Key: 0x14964AC8 200306012154
> -----BEGIN PGP SIGNATURE-----
> Comment: http://www.turnstep.com/pgp.html
>
> iD8DBQE+2q7qvJuQZxSWSsgRAjmqAKDOWFXmckpYnvrIXSKVY7CQNWcn2gCbBb7b
> il6Rrr+MmQ4fUrFNN4dRNyM=
> =2Y3s
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
[ Decrypting message... End of raw data. ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 1.7 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Detecting proper bison version before make
Date: 2003-06-07 15:44:25
Message-ID: 15638.1055000665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> AC_CHECK_PROGS(YACC, ['bison -y'])
> +
> + if test "$YACC"; then
> + if bison --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
> + AC_MSG_WARN([

Should this not be making at least some effort to use the particular
program found by the AC_CHECK_PROGS macro? ie, why not $YACC --version ...

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Detecting proper bison version before make
Date: 2003-06-07 16:31:20
Message-ID: 200306071631.h57GVKp07103@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches


Sure, I will change it to $YACC, but I thought it had to be 'bison -y'
because that's what we fed to AC_CHECK_PROGS. I looked at the configure
output but I don't understand it, even though I know shell script.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > AC_CHECK_PROGS(YACC, ['bison -y'])
> > +
> > + if test "$YACC"; then
> > + if bison --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
> > + AC_MSG_WARN([
>
> Should this not be making at least some effort to use the particular
> program found by the AC_CHECK_PROGS macro? ie, why not $YACC --version ...
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Detecting proper bison version before make
Date: 2003-06-08 09:49:11
Message-ID: Pine.LNX.4.44.0306071816510.2132-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Bruce Momjian writes:

> Here is an applied patch to check for bison version >= 1.875 and print a
> warning. I piggybacks on the existing bison warning.

Instead of 'bison --version' you need to check the executable that was
actually detected by configure.

--
Peter Eisentraut peter_e(at)gmx(dot)net


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Detecting proper bison version before make
Date: 2003-06-09 01:16:51
Message-ID: 200306090116.h591Gpp05840@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-patches

Peter Eisentraut wrote:
> Greg Sabino Mullane writes:
>
> > Can the configure script be made to check for a proper version of bison?
>
> Normally the parser files are prebuild and bison is never invoked. So it
> seems wasteful to do a bunch of checking for this rare case.

Well, someone asked for it, and we already check for bison, so we might
as well check for a version that actually works. Now, if you are
suggesting we remove both bison checks, I could understand that. Are
you?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] Detecting proper bison version before make
Date: 2003-06-09 01:28:26
Message-ID: 200306090128.h591SQa07045@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs Postg윈 토토SQL :

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > Here is an applied patch to check for bison version >= 1.875 and print a
> > warning. I piggybacks on the existing bison warning.
>
> Instead of 'bison --version' you need to check the executable that was
> actually detected by configure.

I have since changed it to $YACC, per suggestion from Tom.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073