Re: Autoconf test for incompatible version of flex

Lists: pgsql-patches
From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Autoconf test for incompatible version of flex
Date: 2003-07-05 00:51:21
Message-ID: 87adbt4wza.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This patch adds an autoconf test to check for the new incompatible version of
flex.

--- programs.m4.~1.12.~ 2003-05-06 19:33:52.000000000 -0400
+++ programs.m4 2003-07-04 20:45:47.000000000 -0400
@@ -30,6 +30,10 @@
pgac_broken_flex=$pgac_candidate
continue
fi
+ if $pgac_candidate --version | grep ' 2\.5\.[[3-9][0-9]]$' >/dev/null 2>&1; then
+ pgac_new_flex=$pgac_candidate
+ continue
+ fi

pgac_cv_path_flex=$pgac_candidate
break 2
@@ -49,6 +53,12 @@
*** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
*** should get version 2.5.4 or later.])
fi
+ if test -n "$pgac_new_flex"; then
+ AC_MSG_WARN([
+*** The Flex version you have at $pgac_new_flex is a version PostgreSQL does
+*** not support. There were major incompatible API changes in this release of
+*** Flex. To compile PostgreSQL you should get version no later than 2.5.4a.])
+ fi

AC_MSG_WARN([
*** Without Flex you will not be able to build PostgreSQL from CVS or

--
greg


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-05 13:45:30
Message-ID: 3954.1057412730@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Greg Stark <gsstark(at)mit(dot)edu> writes:
> This patch adds an autoconf test to check for the new incompatible version of
> flex.

It seems unlikely that we should cause configure to reject all future
versions of flex... .31 may be broken but I think we should assume that
they'l fix it.

regards, tom lane


From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-05 16:32:06
Message-ID: 874r213pfd.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > This patch adds an autoconf test to check for the new incompatible version of
> > flex.
>
> It seems unlikely that we should cause configure to reject all future
> versions of flex... .31 may be broken but I think we should assume that
> they'l fix it.

I inquired about this problem elsewhere, it's not a bug, it's an API change.
Until postgres "ports" to the new API it won't work with newer versions of
Flex.

From the Debian maintainer of the flex package
(http://bugs.debian.org/199776):

> The signature of all functions has changed. flex has new
> command line options, and option parsing has changed (now also
> supports POSIX conventions optionally). Handles POSIXLY_CORRECT
> environment variable. Various i18n translations are included in the
> distribution. flex now works with recent bison versions
>
> This is not a single short lived change.
>
> I understand that this requires all packages using lex to
> massage their lexers to conform to the new behaviour of flex; but the
> gains in reduced complexity of the scanner and reentrancy and
> standards compliance are well worth it.

--
greg


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-06 01:29:45
Message-ID: 6868.1057454985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Greg Stark <gsstark(at)mit(dot)edu> writes:
> I inquired about this problem elsewhere, it's not a bug, it's an API change.
> Until postgres "ports" to the new API it won't work with newer versions of
> Flex.

If their intent was to break things, why wasn't this called flex 3.0?
Or at least 2.6? Calling it a minor version bump has to violate a
truth-in-advertising law or two.

regards, tom lane


From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-06 04:35:48
Message-ID: 87vfug2rx7.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > I inquired about this problem elsewhere, it's not a bug, it's an API change.
> > Until postgres "ports" to the new API it won't work with newer versions of
> > Flex.
>
> If their intent was to break things, why wasn't this called flex 3.0?
> Or at least 2.6? Calling it a minor version bump has to violate a
> truth-in-advertising law or two.

Or something else like "glex", since it doesn't really look much like flex any
more... I don't know whether it will be possible to port to the new API and
still have postgresql compile with the old API.

Incidentally, for anyone else compiling on debian there's a flex-old package.
I can't install it because of some other dependencies, so i just reverted to
the old flex.

--
greg


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-31 19:59:32
Message-ID: 18442.1059681572@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

[ followup to old message ]

Greg Stark <gsstark(at)mit(dot)edu> writes:
> This patch adds an autoconf test to check for the new incompatible version of
> flex.

Peter E. claims that CVS tip does work with flex 2.5.31 --- so we
shouldn't need this patch anymore.

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 Stark <gsstark(at)mit(dot)edu>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Autoconf test for incompatible version of flex
Date: 2003-07-31 21:11:51
Message-ID: 200307312111.h6VLBps28593@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Yes, that was my conclusion too.

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

Tom Lane wrote:
> [ followup to old message ]
>
> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > This patch adds an autoconf test to check for the new incompatible version of
> > flex.
>
> Peter E. claims that CVS tip does work with flex 2.5.31 --- so we
> shouldn't need this patch anymore.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

--
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