
I saw this when compiling 7.3b4 as well and also with 7.3b5

cd contrib
make
...
make[1]: Leaving directory
`/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/rtree_gist'
make[1]: Entering directory
`/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
sed 's,MODULE_PATHNAME,$libdir/seg,g' seg.sql.in >seg.sql
gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../src/include -I/usr/local/include  -c -o seg.o seg.c
bison -y -d  -p seg_yy segparse.y
mv -f y.tab.c segparse.c
mv -f y.tab.h segparse.h
/usr/bin/flex  -Pseg_yy -o'segscan.c' segscan.l
gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
-I../../src/include -I/usr/local/include  -c -o segparse.o segparse.c
In file included from segscan.l:8,
                 from segparse.y:182:
segparse.h:2: redefinition of `struct BND'
segparse.h:8: conflicting types for `YYSTYPE'
segparse.y:48: previous declaration of `YYSTYPE'
segparse.h:15: conflicting types for `seg_yylval'
/usr/lib/bison.simple:138: previous declaration of `seg_yylval'
make[1]: *** [segparse.o] Error 1
make[1]: Leaving directory `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
make: *** [all] Error 2     

Any ideas?

Thanks,

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
----------------------------------
My other vehicle is my imagination.
 - bumper sticker


Wed, 6 Nov 2002 15:36:18 -0800 (PST)
Laurette Cisneros <laurette@nextbus.com>
7.3b5 contrib compile problem

Wow, that is strange.  I have bison 1.75 here and it compiles fine. 
What version of bison do you have?

	bison --version

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

Laurette Cisneros wrote:
> 
> I saw this when compiling 7.3b4 as well and also with 7.3b5
> 
> cd contrib
> make
> ...
> make[1]: Leaving directory
> `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/rtree_gist'
> make[1]: Entering directory
> `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> sed 's,MODULE_PATHNAME,$libdir/seg,g' seg.sql.in >seg.sql
> gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> -I../../src/include -I/usr/local/include  -c -o seg.o seg.c
> bison -y -d  -p seg_yy segparse.y
> mv -f y.tab.c segparse.c
> mv -f y.tab.h segparse.h
> /usr/bin/flex  -Pseg_yy -o'segscan.c' segscan.l
> gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> -I../../src/include -I/usr/local/include  -c -o segparse.o segparse.c
> In file included from segscan.l:8,
>                  from segparse.y:182:
> segparse.h:2: redefinition of `struct BND'
> segparse.h:8: conflicting types for `YYSTYPE'
> segparse.y:48: previous declaration of `YYSTYPE'
> segparse.h:15: conflicting types for `seg_yylval'
> /usr/lib/bison.simple:138: previous declaration of `seg_yylval'
> make[1]: *** [segparse.o] Error 1
> make[1]: Leaving directory `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> make: *** [all] Error 2     
> 
> Any ideas?
> 
> Thanks,
> 
> -- 
> Laurette Cisneros
> The Database Group
> (510) 420-3137
> NextBus Information Systems, Inc.
> www.nextbus.com
> ----------------------------------
> My other vehicle is my imagination.
>  - bumper sticker
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

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

Wed, 6 Nov 2002 20:10:07 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.3b5 contrib compile problem
bison --version
GNU Bison version 1.28

Should I update it?

This just started with 7.3b4.

Thanks,

L.
On Wed, 6 Nov 2002, Bruce Momjian wrote:

> 
> Wow, that is strange.  I have bison 1.75 here and it compiles fine. 
> What version of bison do you have?
> 
> 	bison --version
> 
> ---------------------------------------------------------------------------
> 
> Laurette Cisneros wrote:
> > 
> > I saw this when compiling 7.3b4 as well and also with 7.3b5
> > 
> > cd contrib
> > make
> > ...
> > make[1]: Leaving directory
> > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/rtree_gist'
> > make[1]: Entering directory
> > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > sed 's,MODULE_PATHNAME,$libdir/seg,g' seg.sql.in >seg.sql
> > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > -I../../src/include -I/usr/local/include  -c -o seg.o seg.c
> > bison -y -d  -p seg_yy segparse.y
> > mv -f y.tab.c segparse.c
> > mv -f y.tab.h segparse.h
> > /usr/bin/flex  -Pseg_yy -o'segscan.c' segscan.l
> > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > -I../../src/include -I/usr/local/include  -c -o segparse.o segparse.c
> > In file included from segscan.l:8,
> >                  from segparse.y:182:
> > segparse.h:2: redefinition of `struct BND'
> > segparse.h:8: conflicting types for `YYSTYPE'
> > segparse.y:48: previous declaration of `YYSTYPE'
> > segparse.h:15: conflicting types for `seg_yylval'
> > /usr/lib/bison.simple:138: previous declaration of `seg_yylval'
> > make[1]: *** [segparse.o] Error 1
> > make[1]: Leaving directory `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > make: *** [all] Error 2     
> > 
> > Any ideas?
> > 
> > Thanks,
> > 
> > -- 
> > Laurette Cisneros
> > The Database Group
> > (510) 420-3137
> > NextBus Information Systems, Inc.
> > www.nextbus.com
> > ----------------------------------
> > My other vehicle is my imagination.
> >  - bumper sticker
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > 
> 
> 

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
----------------------------------
My other vehicle is my imagination.
 - bumper sticker


Wed, 6 Nov 2002 17:57:57 -0800 (PST)
Laurette Cisneros <laurette@nextbus.com>
Re: 7.3b5 contrib compile problem

I think bison 1.75 will fix it.  I am just not sure why earlier releases
fail that way.

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

Laurette Cisneros wrote:
> bison --version
> GNU Bison version 1.28
> 
> Should I update it?
> 
> This just started with 7.3b4.
> 
> Thanks,
> 
> L.
> On Wed, 6 Nov 2002, Bruce Momjian wrote:
> 
> > 
> > Wow, that is strange.  I have bison 1.75 here and it compiles fine. 
> > What version of bison do you have?
> > 
> > 	bison --version
> > 
> > ---------------------------------------------------------------------------
> > 
> > Laurette Cisneros wrote:
> > > 
> > > I saw this when compiling 7.3b4 as well and also with 7.3b5
> > > 
> > > cd contrib
> > > make
> > > ...
> > > make[1]: Leaving directory
> > > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/rtree_gist'
> > > make[1]: Entering directory
> > > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > > sed 's,MODULE_PATHNAME,$libdir/seg,g' seg.sql.in >seg.sql
> > > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > > -I../../src/include -I/usr/local/include  -c -o seg.o seg.c
> > > bison -y -d  -p seg_yy segparse.y
> > > mv -f y.tab.c segparse.c
> > > mv -f y.tab.h segparse.h
> > > /usr/bin/flex  -Pseg_yy -o'segscan.c' segscan.l
> > > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > > -I../../src/include -I/usr/local/include  -c -o segparse.o segparse.c
> > > In file included from segscan.l:8,
> > >                  from segparse.y:182:
> > > segparse.h:2: redefinition of `struct BND'
> > > segparse.h:8: conflicting types for `YYSTYPE'
> > > segparse.y:48: previous declaration of `YYSTYPE'
> > > segparse.h:15: conflicting types for `seg_yylval'
> > > /usr/lib/bison.simple:138: previous declaration of `seg_yylval'
> > > make[1]: *** [segparse.o] Error 1
> > > make[1]: Leaving directory `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > > make: *** [all] Error 2     
> > > 
> > > Any ideas?
> > > 
> > > Thanks,
> > > 
> > > -- 
> > > Laurette Cisneros
> > > The Database Group
> > > (510) 420-3137
> > > NextBus Information Systems, Inc.
> > > www.nextbus.com
> > > ----------------------------------
> > > My other vehicle is my imagination.
> > >  - bumper sticker
> > > 
> > > 
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > > 
> > 
> > 
> 
> -- 
> Laurette Cisneros
> The Database Group
> (510) 420-3137
> NextBus Information Systems, Inc.
> www.nextbus.com
> ----------------------------------
> My other vehicle is my imagination.
>  - bumper sticker
> 
> 

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

Wed, 6 Nov 2002 21:04:07 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.3b5 contrib compile problem
Oh, I see it now, I think there was a change on November 1st to rule
generation, but I can't see how that would cause your problem.

If you 'patch -R' the attached patch, does it fix the problem?

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

Bruce Momjian wrote:
> 
> I think bison 1.75 will fix it.  I am just not sure why earlier releases
> fail that way.
> 
> ---------------------------------------------------------------------------
> 
> Laurette Cisneros wrote:
> > bison --version
> > GNU Bison version 1.28
> > 
> > Should I update it?
> > 
> > This just started with 7.3b4.
> > 
> > Thanks,
> > 
> > L.
> > On Wed, 6 Nov 2002, Bruce Momjian wrote:
> > 
> > > 
> > > Wow, that is strange.  I have bison 1.75 here and it compiles fine. 
> > > What version of bison do you have?
> > > 
> > > 	bison --version
> > > 
> > > ---------------------------------------------------------------------------
> > > 
> > > Laurette Cisneros wrote:
> > > > 
> > > > I saw this when compiling 7.3b4 as well and also with 7.3b5
> > > > 
> > > > cd contrib
> > > > make
> > > > ...
> > > > make[1]: Leaving directory
> > > > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/rtree_gist'
> > > > make[1]: Entering directory
> > > > `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > > > sed 's,MODULE_PATHNAME,$libdir/seg,g' seg.sql.in >seg.sql
> > > > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > > > -I../../src/include -I/usr/local/include  -c -o seg.o seg.c
> > > > bison -y -d  -p seg_yy segparse.y
> > > > mv -f y.tab.c segparse.c
> > > > mv -f y.tab.h segparse.h
> > > > /usr/bin/flex  -Pseg_yy -o'segscan.c' segscan.l
> > > > gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I.
> > > > -I../../src/include -I/usr/local/include  -c -o segparse.o segparse.c
> > > > In file included from segscan.l:8,
> > > >                  from segparse.y:182:
> > > > segparse.h:2: redefinition of `struct BND'
> > > > segparse.h:8: conflicting types for `YYSTYPE'
> > > > segparse.y:48: previous declaration of `YYSTYPE'
> > > > segparse.h:15: conflicting types for `seg_yylval'
> > > > /usr/lib/bison.simple:138: previous declaration of `seg_yylval'
> > > > make[1]: *** [segparse.o] Error 1
> > > > make[1]: Leaving directory `/nfs/visor/u/software/postgres/postgresql-7.3b5/contrib/seg'
> > > > make: *** [all] Error 2     
> > > > 
> > > > Any ideas?
> > > > 
> > > > Thanks,
> > > > 
> > > > -- 
> > > > Laurette Cisneros
> > > > The Database Group
> > > > (510) 420-3137
> > > > NextBus Information Systems, Inc.
> > > > www.nextbus.com
> > > > ----------------------------------
> > > > My other vehicle is my imagination.
> > > >  - bumper sticker
> > > > 
> > > > 
> > > > ---------------------------(end of broadcast)---------------------------
> > > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > > > 
> > > 
> > > 
> > 
> > -- 
> > Laurette Cisneros
> > The Database Group
> > (510) 420-3137
> > NextBus Information Systems, Inc.
> > www.nextbus.com
> > ----------------------------------
> > My other vehicle is my imagination.
> >  - bumper sticker
> > 
> > 
> 
> -- 
>   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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

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

? seg.sql
? segscan.c
? segparse.c
? segparse.h
? libseg.so.0.0
Index: Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/contrib/seg/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -c -c -r1.6 -r1.7
*** Makefile	16 Nov 2001 16:32:33 -0000	1.6
--- Makefile	1 Nov 2002 22:52:33 -0000	1.7
***************
*** 1,15 ****
! # $Header: /cvsroot/pgsql-server/contrib/seg/Makefile,v 1.6 2001/11/16 16:32:33 petere Exp $
  
  subdir = contrib/seg
  top_builddir = ../..
  include $(top_builddir)/src/Makefile.global
  
  MODULE_big = seg
! OBJS = seg.o segparse.o segscan.o buffer.o
  DATA_built = seg.sql
  DOCS = README.seg
  REGRESS = seg
  
  
  segparse.c: segparse.h ;
  
--- 1,18 ----
! # $Header: /cvsroot/pgsql-server/contrib/seg/Makefile,v 1.7 2002/11/01 22:52:33 tgl Exp $
  
  subdir = contrib/seg
  top_builddir = ../..
  include $(top_builddir)/src/Makefile.global
  
  MODULE_big = seg
! OBJS = seg.o segparse.o buffer.o
  DATA_built = seg.sql
  DOCS = README.seg
  REGRESS = seg
  
+ 
+ # segscan is compiled as part of segparse
+ segparse.o: segscan.c
  
  segparse.c: segparse.h ;
  
Index: segparse.y
===================================================================
RCS file: /cvsroot/pgsql-server/contrib/seg/segparse.y,v
retrieving revision 1.6
retrieving revision 1.7
diff -c -c -r1.6 -r1.7
*** segparse.y	22 Sep 2002 21:51:18 -0000	1.6
--- segparse.y	1 Nov 2002 22:52:33 -0000	1.7
***************
*** 179,182 ****
    return 0;
  }
  
! 
--- 179,182 ----
    return 0;
  }
  
! #include "segscan.c"
Index: expected/seg.out
===================================================================
RCS file: /cvsroot/pgsql-server/contrib/seg/expected/seg.out,v
retrieving revision 1.4
retrieving revision 1.5
diff -c -c -r1.4 -r1.5
*** expected/seg.out	18 Oct 2002 18:41:21 -0000	1.4
--- expected/seg.out	1 Nov 2002 23:44:34 -0000	1.5
***************
*** 6,13 ****
  -- does not depend on contents of seg.sql.
  --
  \set ECHO none
! psql:seg.sql:12: WARNING:  ProcedureCreate: type seg is not yet defined
! psql:seg.sql:17: WARNING:  Argument type "seg" is only a shell
  --
  -- testing the input and output functions
  --
--- 6,13 ----
  -- does not depend on contents of seg.sql.
  --
  \set ECHO none
! psql:seg.sql:12: NOTICE:  ProcedureCreate: type seg is not yet defined
! psql:seg.sql:17: NOTICE:  Argument type "seg" is only a shell
  --
  -- testing the input and output functions
  --
Wed, 6 Nov 2002 21:08:34 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.3b5 contrib compile problem
Laurette Cisneros <laurette@nextbus.com> writes:
> bison --version
> GNU Bison version 1.28

> Should I update it?

Yes.

It's interesting that bison 1.28's output is sufficiently different to
cause a problem, but we are not going to worry about supporting use of
old bisons.

			regards, tom lane

Wed, 06 Nov 2002 23:20:25 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.3b5 contrib compile problem 
> Laurette Cisneros <laurette@nextbus.com> writes:
> > bison --version
> > GNU Bison version 1.28
>
> > Should I update it?
>
> Yes.
>
> It's interesting that bison 1.28's output is sufficiently different to
> cause a problem, but we are not going to worry about supporting use of
> old bisons.

Do I have to install the CVS version of Bison to get the new compile to
work?

Chris


Thu, 7 Nov 2002 12:35:14 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: 7.3b5 contrib compile problem 
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Do I have to install the CVS version of Bison to get the new compile to
> work?

No, you can use their current release, 1.75.  (Reportedly 1.50 works
too, but I never tried it.)

			regards, tom lane

Wed, 06 Nov 2002 23:41:10 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.3b5 contrib compile problem 
Tom Lane wrote:
> Laurette Cisneros <laurette@nextbus.com> writes:
> > bison --version
> > GNU Bison version 1.28
> 
> > Should I update it?
> 
> Yes.
> 
> It's interesting that bison 1.28's output is sufficiently different to
> cause a problem, but we are not going to worry about supporting use of
> old bisons.

Just to clarify, do the tarballs for /contrib/seg have the pre-processed
bison output, or are people required to have more current bisons to
compile the code?

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

Thu, 7 Nov 2002 00:12:40 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: 7.3b5 contrib compile problem
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Just to clarify, do the tarballs for /contrib/seg have the pre-processed
> bison output, or are people required to have more current bisons to
> compile the code?

AFAIK we do not provide prebuilt bison or flex output for any of the
contrib modules.

			regards, tom lane

Thu, 07 Nov 2002 00:29:46 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.3b5 contrib compile problem 
I said:
>> It's interesting that bison 1.28's output is sufficiently different to
>> cause a problem, but we are not going to worry about supporting use of
>> old bisons.

Well, it turned out to be reasonably easy to fix this, so I did.  It
seems that bison 1.28 generates a .h file that cannot be included into
the .c file it generates :-(.  Experimentation shows this is fixed in
bison 1.35, possibly earlier; but it's easy enough to just not include
the .h file.

			regards, tom lane

Thu, 07 Nov 2002 01:08:56 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.3b5 contrib compile problem 
FYI: I easily updated to 1.75 and all is well.

Thanks for all the help,

L.
On Thu, 7 Nov 2002, Tom Lane wrote:

> I said:
> >> It's interesting that bison 1.28's output is sufficiently different to
> >> cause a problem, but we are not going to worry about supporting use of
> >> old bisons.
> 
> Well, it turned out to be reasonably easy to fix this, so I did.  It
> seems that bison 1.28 generates a .h file that cannot be included into
> the .c file it generates :-(.  Experimentation shows this is fixed in
> bison 1.35, possibly earlier; but it's easy enough to just not include
> the .h file.
> 
> 			regards, tom lane
> 

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
----------------------------------
My other vehicle is my imagination.
 - bumper sticker


Thu, 7 Nov 2002 12:24:46 -0800 (PST)
Laurette Cisneros <laurette@nextbus.com>
Re: 7.3b5 contrib compile problem 