Detecting proper bison version before make
-----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@turnstep.com
PGP Key: 0x14964AC8 200306012154
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iD8DBQE+2q7qvJuQZxSWSsgRAjmqAKDOWFXmckpYnvrIXSKVY7CQNWcn2gCbBb7b
il6Rrr+MmQ4fUrFNN4dRNyM=
=2Y3s
-----END PGP SIGNATURE-----
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@gmx.net
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: SHA1I 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@turnstep.com
PGP Key: 0x14964AC8 200306012154
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.htmliD8DBQE+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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:
/bjm/difftext/plainDownload+23-0
Bruce Momjian <pgman@candle.pha.pa.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
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@candle.pha.pa.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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
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@gmx.net
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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
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@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073