Thread: Re: [PATCHES] vcbuild bison check

Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
> Attached patch adds a version check for bison when running the vc++
> build.

Shouldn't it be looking for 2.1 as well?

            regards, tom lane

Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> > Attached patch adds a version check for bison when running the vc++
> > build.
>
> Shouldn't it be looking for 2.1 as well?

2.1 is the broken one. It seemd it was fixed in 2.2, but 2.2 isn't
realeased for win32 from what I cna tell.

//Magnus

Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
>>> Attached patch adds a version check for bison when running the vc++
>>> build.
>>
>> Shouldn't it be looking for 2.1 as well?

> 2.1 is the broken one.

Exactly.  So we should reject it.

> It seemd it was fixed in 2.2, but 2.2 isn't
> realeased for win32 from what I cna tell.

What's that got to do with rejecting 2.1?

            regards, tom lane

Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> >>> Attached patch adds a version check for bison when running the
> vc++
> >>> build.
> >>
> >> Shouldn't it be looking for 2.1 as well?
>
> > 2.1 is the broken one.
>
> Exactly.  So we should reject it.

We do. The code as-is *only* accepts 1.875. Thus it rejects 2.1.

//Magnus

Re: [PATCHES] vcbuild bison check

From
Bruce Momjian
Date:
Magnus Hagander wrote:
> > >>> Attached patch adds a version check for bison when running the
> > vc++
> > >>> build.
> > >>
> > >> Shouldn't it be looking for 2.1 as well?
> >
> > > 2.1 is the broken one.
> >
> > Exactly.  So we should reject it.
>
> We do. The code as-is *only* accepts 1.875. Thus it rejects 2.1.

I think Tom's point is that we should reject only 2.1.  Isn't that the
only version that fails?

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> > > > 2.1 is the broken one.
> > >
> > > Exactly.  So we should reject it.
> >
> > We do. The code as-is *only* accepts 1.875. Thus it rejects 2.1.
>
> I think Tom's point is that we should reject only 2.1.  Isn't
> that the only version that fails?

Not entirely sure. I beleive there were older versions that don't work
as well... And you can't expect lots of older versions around - I'm sure
*at least* 99% of the ppl who are building withthis will download bison
specifically for this. And given that, they're going to get the latest
by default, or 1.875 if they read the (currently being written) README.

//Magnus


Re: [PATCHES] vcbuild bison check

From
"Zeugswetter Andreas DCP SD"
Date:
> And given that, they're going to get the latest by default,
> or 1.875 if they read the (currently being written) README.

The point was, that >= 2.2 won't be allowed when it comes out for win32,
even if it should work.

Andreas


Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> > And given that, they're going to get the latest by default, or
> 1.875
> > if they read the (currently being written) README.
>
> The point was, that >= 2.2 won't be allowed when it comes out for
> win32, even if it should work.

Right. So I'd update it once we see a working version other than 1.875.

//mha


Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
>> The point was, that >= 2.2 won't be allowed when it comes out for
>> win32, even if it should work.

> Right. So I'd update it once we see a working version other than 1.875.

No, we should ship it that way to start with.  Otherwise we're going to
get caught with no released source code that will allow 2.2.

A look at ftp.gnu.org says that 2.2 was released 19-May-2006 and
2.3 was released 05-Jun-2006.  So it's not like these versions are
fresh off the boat.  I think it's safe to assume that someone will
bother to compile them for Windows, probably sooner not later.
We should be making sure our code works with them, rather than
making sure it doesn't.
        regards, tom lane


Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> >> The point was, that >= 2.2 won't be allowed when it comes out
> for
> >> win32, even if it should work.
>
> > Right. So I'd update it once we see a working version other than
> 1.875.
>
> No, we should ship it that way to start with.  Otherwise we're
> going to get caught with no released source code that will allow
> 2.2.
>
> A look at ftp.gnu.org says that 2.2 was released 19-May-2006 and
> 2.3 was released 05-Jun-2006.  So it's not like these versions are
> fresh off the boat.  I think it's safe to assume that someone will
> bother to compile them for Windows, probably sooner not later.
> We should be making sure our code works with them, rather than
> making sure it doesn't.

Ok. So what you want is something that checks that it's >=1.875 but
specifically not 2.1?

Might be a while before I can submit an updated patch for that, may need
to rewrite the whole script in perl to do that :-( .bat files are
horribly limited in what they can do.

//Magnus



Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
>> I think Tom's point is that we should reject only 2.1.  Isn't 
>> that the only version that fails?

> Not entirely sure. I beleive there were older versions that don't work
> as well...

My recollection is that the version immediately prior to 1.875 was
actively broken, and that versions much before that fail to cope with
the current size of our grammar.

What I see in ftp.gnu.org since 1.875 are 2.0, 2.1, 2.2, 2.3.  We do not
know at this point whether the extra-semicolon bug is present in 2.0
or only 2.1 ... but I will download them and find out.
        regards, tom lane


Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
"Magnus Hagander" <mha@sollentuna.net> writes:
> Ok. So what you want is something that checks that it's >=1.875 but
> specifically not 2.1? 

Let me finish investigating the 2.x series and get back to you on that.

> Might be a while before I can submit an updated patch for that, may need
> to rewrite the whole script in perl to do that :-( .bat files are
> horribly limited in what they can do.

I see no big reason for hurry here, as long as it's in before RC1.
        regards, tom lane


Re: [PATCHES] vcbuild bison check

From
Tom Lane
Date:
I wrote:
> Let me finish investigating the 2.x series and get back to you on that.

2.1 indeed seems to be the only version that emits the busted semicolon.
I found that 2.2 and 2.3 both fail one of their "make check" tests on my
machine --- if that's widespread it might explain a slow uptake rate for
these versions :-(.  But the failure is in one of the GLR tests and
shouldn't affect us.  All four 2.x versions produce gram.c files that
compile and pass regression for me.

So I'd vote for "allow 1.875 and up, except 2.1 specifically".
        regards, tom lane


Re: [PATCHES] vcbuild bison check

From
"Zeugswetter Andreas DCP SD"
Date:
> Ok. So what you want is something that checks that it's
> >=1.875 but specifically not 2.1?
>
> Might be a while before I can submit an updated patch for
> that, may need to rewrite the whole script in perl to do that
> :-( .bat files are horribly limited in what they can do.

Since we are on NT or higher you could use extensions:
IF %bversion% GEQ 1.875 IF %bversion% NEQ 2.1 goto use_bison
http://www.robvanderwoude.com/ntif.html

(even in .bat files) to avoid converting to perl.
sorry, haven't looked at the file so needs adaption

Thank you for the work
Andreas


Re: [PATCHES] vcbuild bison check

From
"Magnus Hagander"
Date:
> > Ok. So what you want is something that checks that it's
> > >=1.875 but specifically not 2.1?
> >
> > Might be a while before I can submit an updated patch for that,
> may
> > need to rewrite the whole script in perl to do that :-( .bat
> files are
> > horribly limited in what they can do.
>
> Since we are on NT or higher you could use extensions:
> IF %bversion% GEQ 1.875 IF %bversion% NEQ 2.1 goto use_bison
> http://www.robvanderwoude.com/ntif.html

I thought that only worked if your locale was set to something that has
dot as decimal separator. Mine has comma, as have many others...

//Magnus



Re: [PATCHES] vcbuild bison check

From
"Zeugswetter Andreas DCP SD"
Date:

> -----Original Message-----
> From: Magnus Hagander [mailto:mha@sollentuna.net]
> Sent: Wednesday, October 04, 2006 6:01 PM
> To: Zeugswetter Andreas ADI SD
> Cc: pgsql-hackers@postgresql.org
> Subject: RE: [HACKERS] [PATCHES] vcbuild bison check
>
> > > Ok. So what you want is something that checks that it's
> > > >=1.875 but specifically not 2.1?
> > >
> > > Might be a while before I can submit an updated patch for that,
> > may
> > > need to rewrite the whole script in perl to do that :-( .bat
> > files are
> > > horribly limited in what they can do.
> >
> > Since we are on NT or higher you could use extensions:
> > IF %bversion% GEQ 1.875 IF %bversion% NEQ 2.1 goto use_bison
> > http://www.robvanderwoude.com/ntif.html
>
> I thought that only worked if your locale was set to
> something that has dot as decimal separator. Mine has comma,
> as have many others...

Um, I think it does a string compare because point or comma is no
decimal digit,
but that would imho also be sufficient.
My locale is German, so my decimal sep should also be a comma, and it
worked
for the mentioned versions.

Andreas


Re: [PATCHES] vcbuild bison check

From
Andrew Dunstan
Date:
Magnus Hagander wrote:
>>> Ok. So what you want is something that checks that it's
>>>       
>>>> =1.875 but specifically not 2.1?
>>>>         
>>> Might be a while before I can submit an updated patch for that,
>>>       
>> may
>>     
>>> need to rewrite the whole script in perl to do that :-( .bat
>>>       
>> files are
>>     
>>> horribly limited in what they can do.
>>>       
>> Since we are on NT or higher you could use extensions:
>> IF %bversion% GEQ 1.875 IF %bversion% NEQ 2.1 goto use_bison
>> http://www.robvanderwoude.com/ntif.html
>>     
>
> I thought that only worked if your locale was set to something that has
> dot as decimal separator. Mine has comma, as have many others...
>
>   

Won't it just do a string comparison, then? That's probably good enough 
in this instance.

cheers

andrew