Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file

Lists: pgsql-bugspgsql-hackers
From: "Pavel Golub" <pavel(at)gf(dot)microolap(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-01-28 18:27:05
Message-ID: 200801281827.m0SIR5ER089604@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers


The following bug has been logged online:

Bug reference: 3909
Logged by: Pavel Golub
Email address: pavel(at)gf(dot)microolap(dot)com
PostgreSQL version: 8.3RC2
Operating system: WinXP
Description: src\tools\msvc\clean.bat clears parse.h file
Details:

Executing clean.bat from src\tools\msvc clears src\backend\parser\parse.h

However, in help stated:

"Bison and Flex are required to build from CVS, but not required when
building from a release file."

Also in src\backend\parser\Makefile we have comments:

"# gram.c, parse.h, and scan.c are in the distribution tarball, so they
# are not cleaned here."

Because of this bug there is no opportunity to build PostgreSQL by Visual
Studio without using Bison.

So, may be as a workaround we may use such scheme:
1. We have "src\backend\parser\parse.h.release" (or whatever postfix) file
2. GenerateFiles() in Solution.pm must check if Bison is available. If so
then generate parse.h by Bison, else copy parse.h.release as parse.h
3. When clean will be called parse.h will be deleted, but not
parse.h.release

Regards


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-05 15:24:01
Message-ID: 20080205152401.GY24114@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
>
> The following bug has been logged online:
>
> Bug reference: 3909
> Logged by: Pavel Golub
> Email address: pavel(at)gf(dot)microolap(dot)com
> PostgreSQL version: 8.3RC2
> Operating system: WinXP
> Description: src\tools\msvc\clean.bat clears parse.h file
> Details:
>
> Executing clean.bat from src\tools\msvc clears src\backend\parser\parse.h
>
> However, in help stated:
>
> "Bison and Flex are required to build from CVS, but not required when
> building from a release file."
>
> Also in src\backend\parser\Makefile we have comments:
>
> "# gram.c, parse.h, and scan.c are in the distribution tarball, so they
> # are not cleaned here."
>
> Because of this bug there is no opportunity to build PostgreSQL by Visual
> Studio without using Bison.
>
> So, may be as a workaround we may use such scheme:
> 1. We have "src\backend\parser\parse.h.release" (or whatever postfix) file
> 2. GenerateFiles() in Solution.pm must check if Bison is available. If so
> then generate parse.h by Bison, else copy parse.h.release as parse.h
> 3. When clean will be called parse.h will be deleted, but not
> parse.h.release

I think a better solution is to add a parameter to clean.bat to make it
work like "make clean" does. So you'd to "clean" when you mean "make
clean", and "clean dist" when you mean "make distclean".

Thoughts on this?

//Magnus


From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: "Pavel Golub" <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-05 16:21:46
Message-ID: 937d27e10802050821yfb5dc01s9ca063ab6c58efab@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Feb 5, 2008 3:24 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
> >
> I think a better solution is to add a parameter to clean.bat to make it
> work like "make clean" does. So you'd to "clean" when you mean "make
> clean", and "clean dist" when you mean "make distclean".
>
> Thoughts on this?

Pretty sure I griped at you before about this, because when it removes
it, it fails to rebuild it the next time round, even on in an env like
mine which can build from CVS perfectly well. More than once I've had
to unpack the tarball again having run a clean.

/D


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-05 17:56:39
Message-ID: 47A8A357.6050904@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

Dave Page wrote:
> On Feb 5, 2008 3:24 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
>> I think a better solution is to add a parameter to clean.bat to make it
>> work like "make clean" does. So you'd to "clean" when you mean "make
>> clean", and "clean dist" when you mean "make distclean".
>>
>> Thoughts on this?
>
> Pretty sure I griped at you before about this, because when it removes
> it, it fails to rebuild it the next time round, even on in an env like
> mine which can build from CVS perfectly well. More than once I've had
> to unpack the tarball again having run a clean.

Uh, that would be a different issue, and I thought that one was fixed. I
certainly clean/rebuild a lot, and it works just fine with the stuff
coming out of cvs.

The problem comes from if you remove *one* of the files but not *all* of
them. We only trigger on one of them (unlike the makefile which triggers
on all). But as long as they are all removed, it should be ok.

Can you confirm if you actually still have that problem with 8.3.0?

//Magnus


From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: "Pavel Golub" <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-05 21:47:16
Message-ID: 937d27e10802051347r33b063amb61476eb312db4d3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Feb 5, 2008 5:56 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
> Dave Page wrote:
> > On Feb 5, 2008 3:24 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> >> On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
> >> I think a better solution is to add a parameter to clean.bat to make it
> >> work like "make clean" does. So you'd to "clean" when you mean "make
> >> clean", and "clean dist" when you mean "make distclean".
> >>
> >> Thoughts on this?
> >
> > Pretty sure I griped at you before about this, because when it removes
> > it, it fails to rebuild it the next time round, even on in an env like
> > mine which can build from CVS perfectly well. More than once I've had
> > to unpack the tarball again having run a clean.
>
> Uh, that would be a different issue, and I thought that one was fixed. I
> certainly clean/rebuild a lot, and it works just fine with the stuff
> coming out of cvs.
>
> The problem comes from if you remove *one* of the files but not *all* of
> them. We only trigger on one of them (unlike the makefile which triggers
> on all). But as long as they are all removed, it should be ok.
>
> Can you confirm if you actually still have that problem with 8.3.0?

Yup - run clean.bat, and then build.bat and the resulting build fails
because parser/parse.h is missing. Thats with the 8.3.0 tarball, which
built just fine prior to running clean. Bison and flex are in the
path.

/D


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-06 12:59:54
Message-ID: 20080206125954.GG4714@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Tue, Feb 05, 2008 at 09:47:16PM +0000, Dave Page wrote:
> On Feb 5, 2008 5:56 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> >
> > Dave Page wrote:
> > > On Feb 5, 2008 3:24 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> > >> On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
> > >> I think a better solution is to add a parameter to clean.bat to make it
> > >> work like "make clean" does. So you'd to "clean" when you mean "make
> > >> clean", and "clean dist" when you mean "make distclean".
> > >>
> > >> Thoughts on this?
> > >
> > > Pretty sure I griped at you before about this, because when it removes
> > > it, it fails to rebuild it the next time round, even on in an env like
> > > mine which can build from CVS perfectly well. More than once I've had
> > > to unpack the tarball again having run a clean.
> >
> > Uh, that would be a different issue, and I thought that one was fixed. I
> > certainly clean/rebuild a lot, and it works just fine with the stuff
> > coming out of cvs.
> >
> > The problem comes from if you remove *one* of the files but not *all* of
> > them. We only trigger on one of them (unlike the makefile which triggers
> > on all). But as long as they are all removed, it should be ok.
> >
> > Can you confirm if you actually still have that problem with 8.3.0?
>
> Yup - run clean.bat, and then build.bat and the resulting build fails
> because parser/parse.h is missing. Thats with the 8.3.0 tarball, which
> built just fine prior to running clean. Bison and flex are in the
> path.

I've managed to reproduce this now, and it's way more broken than I
thought. In fact, clean.bat simply does not work. It seems the batch
processor falls over *badly* when dealing with so many "call" statements. I
put in some "echo 1", "echo 2" etc to see in which order i runs the bat
file. I put them in from top to bottom, but the execution order came out as
0,5,6,7,8,1,5,6,7,8,7,8,2,3,4,5,6,7,8. Which obviously is less than
perfect.

I've redone a clean.bat now that inlines the deletes, and it seems to be
working better. I'll also add the "clean dist" stuff so it's possible to
clean/rebuild without bison/flex, and then commit this.

//Magnus


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-02-06 15:13:42
Message-ID: 20080206151342.GG9549@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Tue, Feb 05, 2008 at 09:47:16PM +0000, Dave Page wrote:
> On Feb 5, 2008 5:56 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> >
> > Dave Page wrote:
> > > On Feb 5, 2008 3:24 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> > >> On Mon, Jan 28, 2008 at 06:27:05PM +0000, Pavel Golub wrote:
> > >> I think a better solution is to add a parameter to clean.bat to make it
> > >> work like "make clean" does. So you'd to "clean" when you mean "make
> > >> clean", and "clean dist" when you mean "make distclean".
> > >>
> > >> Thoughts on this?
> > >
> > > Pretty sure I griped at you before about this, because when it removes
> > > it, it fails to rebuild it the next time round, even on in an env like
> > > mine which can build from CVS perfectly well. More than once I've had
> > > to unpack the tarball again having run a clean.
> >
> > Uh, that would be a different issue, and I thought that one was fixed. I
> > certainly clean/rebuild a lot, and it works just fine with the stuff
> > coming out of cvs.
> >
> > The problem comes from if you remove *one* of the files but not *all* of
> > them. We only trigger on one of them (unlike the makefile which triggers
> > on all). But as long as they are all removed, it should be ok.
> >
> > Can you confirm if you actually still have that problem with 8.3.0?
>
> Yup - run clean.bat, and then build.bat and the resulting build fails
> because parser/parse.h is missing. Thats with the 8.3.0 tarball, which
> built just fine prior to running clean. Bison and flex are in the
> path.

Fixed version applied to HEAD.

//Magnus


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-03-06 16:08:15
Message-ID: 200803061608.m26G8F615676@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers


Has this been addressed?

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

Pavel Golub wrote:
>
> The following bug has been logged online:
>
> Bug reference: 3909
> Logged by: Pavel Golub
> Email address: pavel(at)gf(dot)microolap(dot)com
> PostgreSQL version: 8.3RC2
> Operating system: WinXP
> Description: src\tools\msvc\clean.bat clears parse.h file
> Details:
>
> Executing clean.bat from src\tools\msvc clears src\backend\parser\parse.h
>
> However, in help stated:
>
> "Bison and Flex are required to build from CVS, but not required when
> building from a release file."
>
> Also in src\backend\parser\Makefile we have comments:
>
> "# gram.c, parse.h, and scan.c are in the distribution tarball, so they
> # are not cleaned here."
>
> Because of this bug there is no opportunity to build PostgreSQL by Visual
> Studio without using Bison.
>
> So, may be as a workaround we may use such scheme:
> 1. We have "src\backend\parser\parse.h.release" (or whatever postfix) file
> 2. GenerateFiles() in Solution.pm must check if Bison is available. If so
> then generate parse.h by Bison, else copy parse.h.release as parse.h
> 3. When clean will be called parse.h will be deleted, but not
> parse.h.release
>
> Regards
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

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


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3909: src\tools\msvc\clean.bat clears parse.h file
Date: 2008-03-06 16:21:10
Message-ID: 20080306162110.GE7408@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

Yes.

//Magnus

On Thu, Mar 06, 2008 at 11:08:15AM -0500, Bruce Momjian wrote:
>
> Has this been addressed?
>
> ---------------------------------------------------------------------------
>
> Pavel Golub wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference: 3909
> > Logged by: Pavel Golub
> > Email address: pavel(at)gf(dot)microolap(dot)com
> > PostgreSQL version: 8.3RC2
> > Operating system: WinXP
> > Description: src\tools\msvc\clean.bat clears parse.h file
> > Details:
> >
> > Executing clean.bat from src\tools\msvc clears src\backend\parser\parse.h
> >
> > However, in help stated:
> >
> > "Bison and Flex are required to build from CVS, but not required when
> > building from a release file."
> >
> > Also in src\backend\parser\Makefile we have comments:
> >
> > "# gram.c, parse.h, and scan.c are in the distribution tarball, so they
> > # are not cleaned here."
> >
> > Because of this bug there is no opportunity to build PostgreSQL by Visual
> > Studio without using Bison.
> >
> > So, may be as a workaround we may use such scheme:
> > 1. We have "src\backend\parser\parse.h.release" (or whatever postfix) file
> > 2. GenerateFiles() in Solution.pm must check if Bison is available. If so
> > then generate parse.h by Bison, else copy parse.h.release as parse.h
> > 3. When clean will be called parse.h will be deleted, but not
> > parse.h.release
> >
> > Regards
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faq
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://postgres.enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=pgsql-bugs