pgsql: Enable script to generate preproc.y in build process.

Started by Nonameabout 17 years ago17 messages
#1Noname
meskes@postgresql.org

Log Message:
-----------
Enable script to generate preproc.y in build process.

Modified Files:
--------------
pgsql/src/interfaces/ecpg/preproc:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/.cvsignore?r1=1.1&r2=1.2)
Makefile (r1.137 -> r1.138)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Makefile?r1=1.137&r2=1.138)
pgsql/src/tools/msvc:
Solution.pm (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/Solution.pm?r1=1.44&r2=1.45)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pgsql: Enable script to generate preproc.y in build process.

meskes@postgresql.org (Michael Meskes) writes:

Enable script to generate preproc.y in build process.

Where's the "cvs remove preproc.y" ?

regards, tom lane

#3Michael Meskes
meskes@postgresql.org
In reply to: Tom Lane (#2)
Re: pgsql: Enable script to generate preproc.y in build process.

On Fri, Nov 14, 2008 at 12:13:30PM -0500, Tom Lane wrote:

meskes@postgresql.org (Michael Meskes) writes:

Enable script to generate preproc.y in build process.

Where's the "cvs remove preproc.y" ?

Waiting for me to get online again. I didn't want to make that last change
while going offline immediately afterwards. I prefer to be able to keep an eye
on the buildfarm for the first few builds after changes to the build system.

Just wanted to do it but saw you already removed it. Thanks.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Meskes (#3)
Re: pgsql: Enable script to generate preproc.y in build process.

Michael Meskes <meskes@postgresql.org> writes:

On Fri, Nov 14, 2008 at 12:13:30PM -0500, Tom Lane wrote:

Where's the "cvs remove preproc.y" ?

Waiting for me to get online again. I didn't want to make that last change
while going offline immediately afterwards. I prefer to be able to keep an eye
on the buildfarm for the first few builds after changes to the build system.

I didn't think we were getting any real testing with the preproc.y file
still being there --- it would depend on chance file update times
whether the preproc.y file got rebuilt or not.

In any case, one can always roll back a CVS change ...

regards, tom lane

#5Michael Meskes
meskes@postgresql.org
In reply to: Tom Lane (#4)
Re: pgsql: Enable script to generate preproc.y in build process.

On Fri, Nov 14, 2008 at 02:42:57PM -0500, Tom Lane wrote:

Michael Meskes <meskes@postgresql.org> writes:

On Fri, Nov 14, 2008 at 12:13:30PM -0500, Tom Lane wrote:

Where's the "cvs remove preproc.y" ?

Waiting for me to get online again. I didn't want to make that last change
while going offline immediately afterwards. I prefer to be able to keep an eye
on the buildfarm for the first few builds after changes to the build system.

I didn't think we were getting any real testing with the preproc.y file
still being there --- it would depend on chance file update times
whether the preproc.y file got rebuilt or not.

Exactly. :-)

In any case, one can always roll back a CVS change ...

Even for a delete?

Anyway, the buildfarm is still green.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Meskes (#5)
Re: pgsql: Enable script to generate preproc.y in build process.

Michael Meskes <meskes@postgresql.org> writes:

On Fri, Nov 14, 2008 at 02:42:57PM -0500, Tom Lane wrote:

In any case, one can always roll back a CVS change ...

Even for a delete?

Sure, you can re-add the file.

regards, tom lane

#7Alex Hunsaker
badalex@gmail.com
In reply to: Noname (#1)
Re: pgsql: Enable script to generate preproc.y in build process.

On Fri, Nov 14, 2008 at 10:11, Michael Meskes <meskes@postgresql.org> wrote:

Log Message:
-----------
Enable script to generate preproc.y in build process.

Modified Files:
--------------
pgsql/src/interfaces/ecpg/preproc:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/.cvsignore?r1=1.1&amp;r2=1.2)
Makefile (r1.137 -> r1.138)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Makefile?r1=1.137&amp;r2=1.138)
pgsql/src/tools/msvc:
Solution.pm (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/Solution.pm?r1=1.44&amp;r2=1.45)

--

Hrm this seems to break for me.

"/usr/bin/perl" ./parse.pl . < ../../../../src/backend/parser/gram.y >
preproc.y
bison -d -o preproc.c preproc.y
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -DECPG_COMPILE -I../include
-I../../../../src/interfaces/ecpg/include -I. -DMAJOR_VERSION=4
-DMINOR_VERSION=5 -DPATCHLEVEL=0 -I../../../../src/include
-D_GNU_SOURCE -c -o preproc.o preproc.c
preproc.y: In function 'base_yyparse':
preproc.y:11201: error: expected ';' before '}' token
make[4]: *** [preproc.o] Error 1

The fix to preproc.y is below, but I don't immediately see how to fix parse.pl

*** src/interfaces/ecpg/preproc/preproc.y.orig	2008-11-15
14:43:24.000000000 -0700
--- src/interfaces/ecpg/preproc/preproc.y	2008-11-15 14:43:29.000000000 -0700
***************
*** 11198,11204 ****
  ecpg_xconst:	XCONST		{ $$ = make_name(); } ;

ecpg_ident: IDENT { $$ = make_name(); }
! | CSTRING { $$ = make3_str(make_str("\""), $1, make_str("\"")) }
| UIDENT { $$ = $1; }
;

--- 11198,11204 ----
  ecpg_xconst:	XCONST		{ $$ = make_name(); } ;

ecpg_ident: IDENT { $$ = make_name(); }
! | CSTRING { $$ = make3_str(make_str("\""), $1, make_str("\"")); }
| UIDENT { $$ = $1; }
;

Show quoted text

Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#8Andrew Dunstan
andrew@dunslane.net
In reply to: Alex Hunsaker (#7)
Re: pgsql: Enable script to generate preproc.y in build process.

Fixed.

cheers

andrew

Alex Hunsaker wrote:

Show quoted text

On Fri, Nov 14, 2008 at 10:11, Michael Meskes <meskes@postgresql.org> wrote:

Log Message:
-----------
Enable script to generate preproc.y in build process.

Modified Files:
--------------
pgsql/src/interfaces/ecpg/preproc:
.cvsignore (r1.1 -> r1.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/.cvsignore?r1=1.1&amp;r2=1.2)
Makefile (r1.137 -> r1.138)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Makefile?r1=1.137&amp;r2=1.138)
pgsql/src/tools/msvc:
Solution.pm (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/Solution.pm?r1=1.44&amp;r2=1.45)

--

Hrm this seems to break for me.

"/usr/bin/perl" ./parse.pl . < ../../../../src/backend/parser/gram.y >
preproc.y
bison -d -o preproc.c preproc.y
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -DECPG_COMPILE -I../include
-I../../../../src/interfaces/ecpg/include -I. -DMAJOR_VERSION=4
-DMINOR_VERSION=5 -DPATCHLEVEL=0 -I../../../../src/include
-D_GNU_SOURCE -c -o preproc.o preproc.c
preproc.y: In function 'base_yyparse':
preproc.y:11201: error: expected ';' before '}' token
make[4]: *** [preproc.o] Error 1

The fix to preproc.y is below, but I don't immediately see how to fix parse.pl

*** src/interfaces/ecpg/preproc/preproc.y.orig	2008-11-15
14:43:24.000000000 -0700
--- src/interfaces/ecpg/preproc/preproc.y	2008-11-15 14:43:29.000000000 -0700
***************
*** 11198,11204 ****
ecpg_xconst:	XCONST		{ $$ = make_name(); } ;

ecpg_ident: IDENT { $$ = make_name(); }
! | CSTRING { $$ = make3_str(make_str("\""), $1, make_str("\"")) }
| UIDENT { $$ = $1; }
;

--- 11198,11204 ----
ecpg_xconst:	XCONST		{ $$ = make_name(); } ;

ecpg_ident: IDENT { $$ = make_name(); }
! | CSTRING { $$ = make3_str(make_str("\""), $1, make_str("\"")); }
| UIDENT { $$ = $1; }
;

Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#9Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Hunsaker (#7)
Re: pgsql: Enable script to generate preproc.y in build process.

"Alex Hunsaker" <badalex@gmail.com> writes:

"/usr/bin/perl" ./parse.pl . < ../../../../src/backend/parser/gram.y >
preproc.y
bison -d -o preproc.c preproc.y
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -g -DECPG_COMPILE -I../include
-I../../../../src/interfaces/ecpg/include -I. -DMAJOR_VERSION=4
-DMINOR_VERSION=5 -DPATCHLEVEL=0 -I../../../../src/include
-D_GNU_SOURCE -c -o preproc.o preproc.c
preproc.y: In function 'base_yyparse':
preproc.y:11201: error: expected ';' before '}' token
make[4]: *** [preproc.o] Error 1

Huh ... what gcc and bison versions are you using? The code is
certainly wrong but I wonder why nobody else saw this error.

The fix to preproc.y is below, but I don't immediately see how to fix parse.pl

That's cause the problem is in ecpg.trailer. I see Andrew got it
already.

regards, tom lane

#10Alex Hunsaker
badalex@gmail.com
In reply to: Tom Lane (#9)
Re: pgsql: Enable script to generate preproc.y in build process.

On Sat, Nov 15, 2008 at 15:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Huh ... what gcc and bison versions are you using? The code is
certainly wrong but I wonder why nobody else saw this error.

$ gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++,treelang
--enable-threads=posix --mandir=/usr/share/man
--infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib
--libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.3.2 (GCC)

$ bison --version
bison (GNU Bison) 2.4
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The fix to preproc.y is below, but I don't immediately see how to fix parse.pl

That's cause the problem is in ecpg.trailer. I see Andrew got it
already.

Explains why I could not see where to fix it :).

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Hunsaker (#10)
Re: pgsql: Enable script to generate preproc.y in build process.

"Alex Hunsaker" <badalex@gmail.com> writes:

On Sat, Nov 15, 2008 at 15:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Huh ... what gcc and bison versions are you using? The code is
certainly wrong but I wonder why nobody else saw this error.

$ bison --version
bison (GNU Bison) 2.4

Interesting. Looking at the generated code, it seems that the older
bison versions I have here (2.3 and 1.875) insert an extra semicolon at
the end of any action. Apparently 2.4 doesn't do that anymore ...
I wonder how many other projects' code will break?

regards, tom lane

#12Michael Meskes
meskes@postgresql.org
In reply to: Tom Lane (#11)
Re: pgsql: Enable script to generate preproc.y in build process.

On Sat, Nov 15, 2008 at 05:39:49PM -0500, Tom Lane wrote:

Interesting. Looking at the generated code, it seems that the older
bison versions I have here (2.3 and 1.875) insert an extra semicolon at
the end of any action. Apparently 2.4 doesn't do that anymore ...
I wonder how many other projects' code will break?

Me too. The ecpg.trailer code was just copied from the old preproc.y so I guess
this bug has been in before we moved to the new automatic build. Could we get
one of the buildfarm members to upgrade to bison 2.4? Even if we now compile
through cleanly on that one test system, I'd rather have a regular build using
this new version.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Meskes (#12)
Re: pgsql: Enable script to generate preproc.y in build process.

Michael Meskes <meskes@postgresql.org> writes:

On Sat, Nov 15, 2008 at 05:39:49PM -0500, Tom Lane wrote:

I wonder how many other projects' code will break?

Me too. The ecpg.trailer code was just copied from the old preproc.y so I guess
this bug has been in before we moved to the new automatic build.

If so then we would need to back-patch, but if I'm correctly identifying
the corresponding code in 8.3, it has a semicolon where expected.

Could we get one of the buildfarm members to upgrade to bison 2.4?
Even if we now compile through cleanly on that one test system, I'd
rather have a regular build using this new version.

Yeah, this would be a good idea.

regards, tom lane

#14Michael Meskes
meskes@postgresql.org
In reply to: Tom Lane (#13)
Re: pgsql: Enable script to generate preproc.y in build process.

On Sun, Nov 16, 2008 at 11:33:06AM -0500, Tom Lane wrote:

Me too. The ecpg.trailer code was just copied from the old preproc.y so I guess
this bug has been in before we moved to the new automatic build.

If so then we would need to back-patch, but if I'm correctly identifying
the corresponding code in 8.3, it has a semicolon where expected.

No, not that old. These rules were introduced at some point after 8.3 was
released, so no biggy here. This just meant that we went weeks without any
system complaining.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

#15Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#13)
Re: [HACKERS] pgsql: Enable script to generate preproc.y in build process.

Tom Lane wrote:

Michael Meskes <meskes@postgresql.org> writes:

On Sat, Nov 15, 2008 at 05:39:49PM -0500, Tom Lane wrote:

I wonder how many other projects' code will break?

Me too. The ecpg.trailer code was just copied from the old preproc.y so I guess
this bug has been in before we moved to the new automatic build.

If so then we would need to back-patch, but if I'm correctly identifying
the corresponding code in 8.3, it has a semicolon where expected.

Could we get one of the buildfarm members to upgrade to bison 2.4?
Even if we now compile through cleanly on that one test system, I'd
rather have a regular build using this new version.

Yeah, this would be a good idea.

It's about 2 weeks old, by the look of it; you're not going to see it
rolling out to most distributions for a while.

But maybe someone would like to upgrade their buildfarm member
regardless of that.

cheers

andrew

#16Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Andrew Dunstan (#15)
Re: [HACKERS] pgsql: Enable script to generate preproc.y in build process.

On Sun, 2008-11-16 at 12:12 -0500, Andrew Dunstan wrote:

But maybe someone would like to upgrade their buildfarm member
regardless of that.

I installed 2.4 to Orca, and the next builds are at:

0 3 * * * cd /home/pgbuildfarm/build-farm && ./run_build.pl
0 4 * * * cd /home/pgbuildfarm/build-farm && ./run_build.pl REL8_3_STABLE
0 5 * * * cd /home/pgbuildfarm/build-farm && ./run_build.pl REL8_2_STABLE
0 6 * * * cd /home/pgbuildfarm/build-farm && ./run_build.pl REL8_1_STABLE

Regards,
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

#17Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Devrim GÜNDÜZ (#16)
Re: [HACKERS] pgsql: Enable script to generate preproc.y in build process.

Hi,

On Mon, 2008-11-17 at 00:41 +0200, Devrim GÜNDÜZ wrote:

On Sun, 2008-11-16 at 12:12 -0500, Andrew Dunstan wrote:

But maybe someone would like to upgrade their buildfarm member
regardless of that.

I installed 2.4 to Orca, and the next builds are at:

I forced a manual build:

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=orca&amp;dt=2008-11-17%
2005:12:46

--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org