Thread: postgres 8.1 compile error in the pg_attribute.h file

postgres 8.1 compile error in the pg_attribute.h file

From
"Prasad Duggineni"
Date:
I am getting the compile error in the /usr/include/pgsql/server/catalog/pg_attribute.h after installing the postgres8.1. I never had this problem for the postgres8.03 . please advice me to fix this problem.
 
 
/usr/include/pgsql/server/catalog/pg_attribute.h:44:26: macro "CATALOG" passed 2 arguments, but takes just 1
In file included from /usr/include/pgsql/server/access/tupdesc.h:18,
                 from /usr/include/pgsql/server/utils/rel.h:17,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_attribute.h:44: error: syntax error before "BKI_BOOTSTRAP"
/usr/include/pgsql/server/catalog/pg_attribute.h:45: error: syntax error before '{' token
/usr/include/pgsql/server/catalog/pg_attribute.h:152: error: syntax error before '}' token
/usr/include/pgsql/server/catalog/pg_attribute.h:152: warning: type defaults to `int' in declaration of `FormData_pg_attribute'
/usr/include/pgsql/server/catalog/pg_attribute.h:152: warning: data definition has no type or storage class
/usr/include/pgsql/server/catalog/pg_attribute.h:167: error: syntax error before '*' token
/usr/include/pgsql/server/catalog/pg_attribute.h:167: warning: type defaults to `int' in declaration of `Form_pg_attribute'
/usr/include/pgsql/server/catalog/pg_attribute.h:167: warning: data definition has no type or storage class
In file included from /usr/include/pgsql/server/utils/rel.h:17,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/access/tupdesc.h:64: error: syntax error before "Form_pg_attribute"
/usr/include/pgsql/server/access/tupdesc.h:64: warning: no semicolon at end of struct or union
/usr/include/pgsql/server/access/tupdesc.h:70: error: syntax error before '}' token
/usr/include/pgsql/server/access/tupdesc.h:70: warning: type defaults to `int' in declaration of `TupleDesc'
/usr/include/pgsql/server/access/tupdesc.h:70: warning: data definition has no type or storage class
/usr/include/pgsql/server/access/tupdesc.h:73: error: syntax error before "CreateTemplateTupleDesc"
/usr/include/pgsql/server/access/tupdesc.h:73: warning: type defaults to `int' in declaration of `CreateTemplateTupleDesc'
/usr/include/pgsql/server/access/tupdesc.h:73: warning: data definition has no type or storage class
/usr/include/pgsql/server/access/tupdesc.h:75: error: syntax error before "CreateTupleDesc"
/usr/include/pgsql/server/access/tupdesc.h:76: error: syntax error before "Form_pg_attribute"
/usr/include/pgsql/server/access/tupdesc.h:76: warning: type defaults to `int' in declaration of `CreateTupleDesc'
/usr/include/pgsql/server/access/tupdesc.h:76: warning: data definition has no type or storage class
/usr/include/pgsql/server/access/tupdesc.h:78: error: syntax error before "CreateTupleDescCopy"
/usr/include/pgsql/server/access/tupdesc.h:78: error: syntax error before "tupdesc"
/usr/include/pgsql/server/access/tupdesc.h:78: warning: type defaults to `int' in declaration of `CreateTupleDescCopy'
/usr/include/pgsql/server/access/tupdesc.h:78: warning: data definition has no type or storage class
/usr/include/pgsql/server/access/tupdesc.h:80: error: syntax error before "CreateTupleDescCopyConstr"
/usr/include/pgsql/server/access/tupdesc.h:80: error: syntax error before "tupdesc"
/usr/include/pgsql/server/access/tupdesc.h:80: warning: type defaults to `int' in declaration of `CreateTupleDescCopyConstr'
/usr/include/pgsql/server/access/tupdesc.h:80: warning: data definition has no type or storage class
/usr/include/pgsql/server/access/tupdesc.h:82: error: syntax error before "tupdesc"
/usr/include/pgsql/server/access/tupdesc.h:84: error: syntax error before "tupdesc1"
/usr/include/pgsql/server/access/tupdesc.h:86: error: syntax error before "desc"
/usr/include/pgsql/server/access/tupdesc.h:93: error: syntax error before "BuildDescForRelation"
/usr/include/pgsql/server/access/tupdesc.h:93: warning: type defaults to `int' in declaration of `BuildDescForRelation'
/usr/include/pgsql/server/access/tupdesc.h:93: warning: data definition has no type or storage class
In file included from /usr/include/pgsql/server/utils/rel.h:18,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_am.h:39:19: macro "CATALOG" passed 2 arguments, but takes just 1
In file included from /usr/include/pgsql/server/utils/rel.h:18,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_am.h:40: error: syntax error before '{' token
/usr/include/pgsql/server/catalog/pg_am.h:66: error: syntax error before '}' token
/usr/include/pgsql/server/catalog/pg_am.h:66: warning: type defaults to `int' in declaration of `FormData_pg_am'
/usr/include/pgsql/server/catalog/pg_am.h:66: warning: data definition has no type or storage class
/usr/include/pgsql/server/catalog/pg_am.h:73: error: syntax error before '*' token
/usr/include/pgsql/server/catalog/pg_am.h:73: warning: type defaults to `int' in declaration of `Form_pg_am'
/usr/include/pgsql/server/catalog/pg_am.h:73: warning: data definition has no type or storage class
In file included from /usr/include/pgsql/server/utils/rel.h:19,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_class.h:45:22: macro "CATALOG" passed 2 arguments, but takes just 1
In file included from /usr/include/pgsql/server/utils/rel.h:19,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_class.h:45: error: syntax error before "BKI_BOOTSTRAP"
/usr/include/pgsql/server/catalog/pg_class.h:46: error: syntax error before '{' token
/usr/include/pgsql/server/catalog/pg_class.h:82: error: syntax error before '}' token
/usr/include/pgsql/server/catalog/pg_class.h:82: warning: type defaults to `int' in declaration of `FormData_pg_class'
/usr/include/pgsql/server/catalog/pg_class.h:82: warning: data definition has no type or storage class
/usr/include/pgsql/server/catalog/pg_class.h:93: error: syntax error before '*' token
/usr/include/pgsql/server/catalog/pg_class.h:93: warning: type defaults to `int' in declaration of `Form_pg_class'
/usr/include/pgsql/server/catalog/pg_class.h:93: warning: data definition has no type or storage class
In file included from /usr/include/pgsql/server/utils/rel.h:20,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
/usr/include/pgsql/server/catalog/pg_index.h:36:22: macro "CATALOG" passed 2 arguments, but takes just 1
In file included from /usr/include/pgsql/server/utils/rel.h:20,
                 from /usr/include/pgsql/server/storage/bufmgr.h:21,
                 from /usr/include/pgsql/server/storage/bufpage.h:18,
                 from /usr/include/pgsql/server/access/htup.h:17,
                 from /usr/include/pgsql/server/executor/tuptable.h:17,
                 from phonelib.c:49:
 
 

Re: postgres 8.1 compile error in the pg_attribute.h file

From
Tom Lane
Date:
"Prasad Duggineni" <pduggineni@prominencenet.com> writes:
> I am getting the compile error in the =
> /usr/include/pgsql/server/catalog/pg_attribute.h after installing the =
> postgres8.1.

> /usr/include/pgsql/server/catalog/pg_attribute.h:44:26: macro "CATALOG" =
> passed 2 arguments, but takes just 1

CATALOG() used to take 1 argument before 8.1, but now it takes 2.
Apparently your compile is managing to include some unholy combination
of 8.1 and pre-8.1 Postgres header files (specifically, it's picking up
an obsolete copy of postgres.h from somewhere).  Check include paths and
so forth.

            regards, tom lane