Thread: Unable to build on Solaris 2.6
Hi, I am unable to build PostgreSQL 7.1.2 on Solaris 2.6. Below are some info as to versions of the tools used and error messages. Can anybody make something out of this? Thank you Peter MAKE VERSION: GNU Make version 3.77, by Richard Stallman and Roland McGrath. GCC VERSION: gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) JUST THE BEGINNING OF A LONG OUTPUT OF ERROR MESSAGES: [ws6709] /tmp/postgresql-7.1.2$ gmake gmake -C doc all gmake[1]: Entering directory `/tmp/postgresql-7.1.2/doc' gmake[1]: Nothing to be done for `all'. gmake[1]: Leaving directory `/tmp/postgresql-7.1.2/doc' gmake -C src all gmake[1]: Entering directory `/tmp/postgresql-7.1.2/src' gmake -C backend all gmake[2]: Entering directory `/tmp/postgresql-7.1.2/src/backend' gmake -C access all gmake[3]: Entering directory `/tmp/postgresql-7.1.2/src/backend/access' gmake -C common SUBSYS.o gmake[4]: Entering directory `/tmp/postgresql-7.1.2/src/backend/access/common' gcc -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include -c heaptuple .c -o heaptuple.o In file included from ../../../../src/include/access/tupdesc.h:18, from ../../../../src/include/utils/rel.h:18, from ../../../../src/include/storage/bufmgr.h:21, from ../../../../src/include/storage/bufpage.h:18, from ../../../../src/include/access/htup.h:17, from ../../../../src/include/access/heapam.h:18, from heaptuple.c:23: ../../../../src/include/catalog/pg_attribute.h:43: syntax error before `{' ../../../../src/include/catalog/pg_attribute.h:156: parse error before `}' ../../../../src/include/catalog/pg_attribute.h:156: warning: type defaults to `int' in declarat ion of `FormData_pg_attribute' ../../../../src/include/catalog/pg_attribute.h:156: warning: data definition has no type or sto rage class ../../../../src/include/catalog/pg_attribute.h:170: parse error before `*' ../../../../src/include/catalog/pg_attribute.h:170: warning: type defaults to `int' in declarat ion of `Form_pg_attribute' ../../../../src/include/catalog/pg_attribute.h:170: warning: data definition has no type or sto rage class In file included from ../../../../src/include/utils/rel.h:18,
Kovács Péter writes: > gmake[3]: Entering directory `/tmp/postgresql-7.1.2/src/backend/access' > gmake -C common SUBSYS.o > gmake[4]: Entering directory > `/tmp/postgresql-7.1.2/src/backend/access/common' > gcc -Wall -Wmissing-prototypes -Wmissing-declarations > -I../../../../src/include -c heaptuple > .c -o heaptuple.o > In file included from ../../../../src/include/access/tupdesc.h:18, > from ../../../../src/include/utils/rel.h:18, > from ../../../../src/include/storage/bufmgr.h:21, > from ../../../../src/include/storage/bufpage.h:18, > from ../../../../src/include/access/htup.h:17, > from ../../../../src/include/access/heapam.h:18, > from heaptuple.c:23: > ../../../../src/include/catalog/pg_attribute.h:43: syntax error before `{' > ../../../../src/include/catalog/pg_attribute.h:156: parse error before `}' > ../../../../src/include/catalog/pg_attribute.h:156: warning: type defaults > to `int' in declaration of `FormData_pg_attribute' There's some macro trickery going on there, so it's hard to tell what it's really seeing. Try this: $ cd src/backend/access/common $ make heaptuple.o CFLAGS=-save-temps Then look at the resulting (I hope) heaptuple.i and look at what's really happening at line 42 (search for pg_attribute should find it). It should look similar to this: # 42 "../../../../src/include/catalog/pg_attribute.h" 1 typedef struct FormData_pg_attribute { Oid attrelid; NameData attname; # 55 "../../../../src/include/catalog/pg_attribute.h" Oid atttypid; There's the "{" it's talking about. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Peter, Thanks a lot. The generated definition looked like: typedef struct FormData_ pg_attribute { Oid attrelid; NameData attname; Oid atttypid; Apparently, the configure script did not correctly recognize the stringizing capibality of the preprocessor. (Should I report this as a bug in autoconf???) Defining the HAVE_STRINGIZING macro in config.h by hand seemed to solve the problem and the compilation completed without error (though with lots of "<type>_{MIN | MAX} redefined" warnings). Thank you again. Peter -----Original Message----- From: Peter Eisentraut [mailto:peter_e@gmx.net] Sent: Monday, July 16, 2001 11:56 PM To: Kovács Péter Cc: pgsql-ports@postgresql.org Subject: Re: [PORTS] Unable to build on Solaris 2.6 Kovács Péter writes: > gmake[3]: Entering directory `/tmp/postgresql-7.1.2/src/backend/access' > gmake -C common SUBSYS.o > gmake[4]: Entering directory > `/tmp/postgresql-7.1.2/src/backend/access/common' > gcc -Wall -Wmissing-prototypes -Wmissing-declarations > -I../../../../src/include -c heaptuple > .c -o heaptuple.o > In file included from ../../../../src/include/access/tupdesc.h:18, > from ../../../../src/include/utils/rel.h:18, > from ../../../../src/include/storage/bufmgr.h:21, > from ../../../../src/include/storage/bufpage.h:18, > from ../../../../src/include/access/htup.h:17, > from ../../../../src/include/access/heapam.h:18, > from heaptuple.c:23: > ../../../../src/include/catalog/pg_attribute.h:43: syntax error before `{' > ../../../../src/include/catalog/pg_attribute.h:156: parse error before `}' > ../../../../src/include/catalog/pg_attribute.h:156: warning: type defaults > to `int' in declaration of `FormData_pg_attribute' There's some macro trickery going on there, so it's hard to tell what it's really seeing. Try this: $ cd src/backend/access/common $ make heaptuple.o CFLAGS=-save-temps Then look at the resulting (I hope) heaptuple.i and look at what's really happening at line 42 (search for pg_attribute should find it). It should look similar to this: # 42 "../../../../src/include/catalog/pg_attribute.h" 1 typedef struct FormData_pg_attribute { Oid attrelid; NameData attname; # 55 "../../../../src/include/catalog/pg_attribute.h" Oid atttypid; There's the "{" it's talking about. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Kovács Péter writes: > Apparently, the configure script did not correctly recognize the stringizing > capibality of the preprocessor. (Should I report this as a bug in > autoconf???) Hmm. I've never seen this test give a wrong result. Can you check *why* it does that? -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter