Thread: HEAD build troubles, buildfarm misconfigurations
Trying to build 8.3 from the stable snapshot again (yes, I'm a glutten for punishment), and using the following config options: ./configure --prefix=/home/rob/devel/postgresql/83snapshot20070904/pgsql/ --enable-cassert --with-perl --enable-debug --with-pgport=5483 --with-libxml I get the following error during make (configure runs fine) gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing-g -DFRONTEND -I. -I../../../src/interfaces/libpq -I../../../src/bin/pg_dump -I../../../src/include -D_GNU_SOURCE-I/usr/include/libxml2 -c -o describe.o describe.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing-g -DFRONTEND -I. -I../../../src/interfaces/libpq -I../../../src/bin/pg_dump -I../../../src/include -D_GNU_SOURCE-I/usr/include/libxml2 -c -o psqlscan.o psqlscan.c In file included from ../../../src/include/port.h:17, from ../../../src/include/c.h:839, from../../../src/include/postgres_fe.h:21, from psqlscan.l:40: /usr/include/netdb.h:560: error: syntax error before ‘[’ token make[3]: *** [psqlscan.o] Error 1 make[3]: Leaving directory `/home/rob/devel/postgresql/83snapshot20070904/postgresql-snapshot/src/bin/psql' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/rob/devel/postgresql/83snapshot20070904/postgresql-snapshot/src/bin' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/rob/devel/postgresql/83snapshot20070904/postgresql-snapshot/src' make: *** [all] Error 2 Looking at /usr/include/netdb.h I see in that section # ifdef __USE_GNU /* Structure used as control block for asynchronous lookup. */ struct gaicb { const char *ar_name; /* Name to look up. */ const char *ar_service; /* Service name. */ const struct addrinfo*ar_request; /* Additional request specification. */ struct addrinfo *ar_result; /* Pointer to result. */ /*The following are internal elements. */ int __return; int __unused[5]; }; /* Lookup mode. */ # define GAI_WAIT 0 # define GAI_NOWAIT 1 # endif If anyone has any ideas on what might fix the above, I'd be interested in hearing them. (And oddly, the snapshot built fine a couple days ago) The second half of this story is that I thought it was odd none of the buildfarm machines had reported this error, so I went poking for another ubuntu machine (I am running Ubuntu 6.06), preferrably one that was also trying to build xml, and I noticed "barasingha" (ubuntu 7.04) was configured with --with-xml, which afaict should produce nothing more than a configure warning. I looked at a handful of other machines configured for xml and they all seemed right, but maybe someone can do a more thorough search in the db? Or maybe there is a way to capture configure warnings? -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
Robert Treat <xzilla@users.sourceforge.net> writes: > I get the following error during make (configure runs fine) > /usr/include/netdb.h:560: error: syntax error before =E2=80=98[=E2=80=99 to= > ken Which line of netdb.h is that exactly? I'm thinking we've redefined some name as a macro that's breaking the include file, but I don't see which name exactly ... regards, tom lane
Robert Treat <xzilla@users.sourceforge.net> writes: > I get the following error during make (configure runs fine) BTW, on re-reading that, it seems a tad surprising to get an error right there --- if postgres_fe.h or anything it includes were broken, then the build should have failed earlier. Is the failure reproducible in repeated tries? regards, tom lane
On Wednesday 05 September 2007 00:06, Tom Lane wrote: > Robert Treat <xzilla@users.sourceforge.net> writes: > > I get the following error during make (configure runs fine) > > > > /usr/include/netdb.h:560: error: syntax error before =E2=80=98[=E2=80=99 > > to= ken > > Which line of netdb.h is that exactly? I'm thinking we've redefined > some name as a macro that's breaking the include file, but I don't see > which name exactly ... > Sorry, it was the line "int __unused[5];" > BTW, on re-reading that, it seems a tad surprising to get an error right > there --- if postgres_fe.h or anything it includes were broken, then the > build should have failed earlier. Is the failure reproducible in > repeated tries? > Yes. Just for giggles I played with the configure flags as well, but it always errors in that spot. -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
Robert Treat <xzilla@users.sourceforge.net> writes: > On Wednesday 05 September 2007 00:06, Tom Lane wrote: >> BTW, on re-reading that, it seems a tad surprising to get an error right >> there --- if postgres_fe.h or anything it includes were broken, then the >> build should have failed earlier. Is the failure reproducible in >> repeated tries? > Yes. Just for giggles I played with the configure flags as well, but it > always errors in that spot. Hmph. I checked the CVS logs and there haven't been any recent changes that seem like they could be related. It might be worth getting gcc -E output and looking to see what that part of netdb.h looks like after macro expansion. regards, tom lane
On Wednesday 05 September 2007 12:01, Tom Lane wrote: > Robert Treat <xzilla@users.sourceforge.net> writes: > > On Wednesday 05 September 2007 00:06, Tom Lane wrote: > >> BTW, on re-reading that, it seems a tad surprising to get an error right > >> there --- if postgres_fe.h or anything it includes were broken, then the > >> build should have failed earlier. Is the failure reproducible in > >> repeated tries? > > > > Yes. Just for giggles I played with the configure flags as well, but it > > always errors in that spot. > > Hmph. I checked the CVS logs and there haven't been any recent changes > that seem like they could be related. > > It might be worth getting gcc -E output and looking to see what that > part of netdb.h looks like after macro expansion. > Sorry, my C-fu is lacking. My makefile claims it uses gcc -E, but I'm not sure how to get a look at results after macro expansion However... I looked again at the output of the make command on some ubuntu buildfarm members, and the results were different enough that I got suspicous of the flex/bison derived files in the snapshot, so I decided to build from cvs and that works fine. FWIW I am using flex 2.5.31 and bison 2.1, not sure what is used to produce the snapshots... -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
Robert Treat wrote: > On Wednesday 05 September 2007 12:01, Tom Lane wrote: > >> Robert Treat <xzilla@users.sourceforge.net> writes: >> >>> On Wednesday 05 September 2007 00:06, Tom Lane wrote: >>> >>>> BTW, on re-reading that, it seems a tad surprising to get an error right >>>> there --- if postgres_fe.h or anything it includes were broken, then the >>>> build should have failed earlier. Is the failure reproducible in >>>> repeated tries? >>>> >>> Yes. Just for giggles I played with the configure flags as well, but it >>> always errors in that spot. >>> >> Hmph. I checked the CVS logs and there haven't been any recent changes >> that seem like they could be related. >> >> It might be worth getting gcc -E output and looking to see what that >> part of netdb.h looks like after macro expansion. >> >> > > Sorry, my C-fu is lacking. My makefile claims it uses gcc -E, but I'm not sure > how to get a look at results after macro expansion > > However... I looked again at the output of the make command on some ubuntu > buildfarm members, and the results were different enough that I got suspicous > of the flex/bison derived files in the snapshot, so I decided to build from > cvs and that works fine. FWIW I am using flex 2.5.31 and bison 2.1, not sure > what is used to produce the snapshots... > scan.c in snapshot says: #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 gram.c in snapshot says: /* A Bison parser, made by GNU Bison 1.875. */ cheers andrew