Thread: postgresql-8.4.1 compile error (with Sun Studio 11)

postgresql-8.4.1 compile error (with Sun Studio 11)

From
"Maciej (Matchek) Blizinski"
Date:
Hi pgsql-general,

I'm looking at compiling postgresql using Sun Studio 11, on Solaris 8.
 I'm getting the following error:

gmake[7]: Entering directory

`/home/maciej/src/opencsw/pkg/postgresql/trunk/work/solaris8-sparc/build-isa-sparcv8/postgresql-8.4.1/src/interfaces/ecpg/pgtypeslib'
gmake[7]: Nothing to be done for `all'.
gmake[7]: Leaving directory

`/home/maciej/src/opencsw/pkg/postgresql/trunk/work/solaris8-sparc/build-isa-sparcv8/postgresql-8.4.1/src/interfaces/ecpg/pgtypeslib'
/opt/studio/SOS11/SUNWspro/bin/cc -Xa -xO3 -xarch=v8
-I/opt/csw/include -I/opt/csw/postgresql/include  -KPIC -I../include
-I../../../../src/interfaces/ecpg/include
-I../../../../src/interfaces/libpq -I../../../../src/port
-I../../../../src/include -I/opt/csw/include
-I/opt/csw/postgresql/include  -DSO_MAJOR_VERSION=6  -c -o prepare.o
prepare.c
"../../../../src/include/c.h", line 98: warning: macro redefined: gettext
"../../../../src/include/c.h", line 99: warning: macro redefined: dgettext
"../../../../src/include/c.h", line 100: warning: macro redefined: ngettext
"../../../../src/include/c.h", line 101: warning: macro redefined: dngettext
"/opt/csw/postgresql/include/ecpg_config.h", line 9: warning: macro
redefined: HAVE_LONG_LONG_INT_64
"prepare.c", line 116: identifier redeclared: ECPGprepare
        current : function(int, pointer to const char, const char,
pointer to const char, pointer to const char) returning char
        previous: function(int, pointer to const char, const int,
pointer to const char, pointer to const char) returning char :
"/opt/csw/postgresql/include/ecpglib.h", line 49
cc: acomp failed for prepare.c
gmake[6]: *** [prepare.o] Error 2
gmake[6]: Leaving directory

`/home/maciej/src/opencsw/pkg/postgresql/trunk/work/solaris8-sparc/build-isa-sparcv8/postgresql-8.4.1/src/interfaces/ecpg/ecpglib'

Has anyone else come across this problem?

Maciej

Re: postgresql-8.4.1 compile error (with Sun Studio 11)

From
Tom Lane
Date:
"Maciej (Matchek) Blizinski" <maciej@opencsw.org> writes:
> "/opt/csw/postgresql/include/ecpg_config.h", line 9: warning: macro
> redefined: HAVE_LONG_LONG_INT_64
> "prepare.c", line 116: identifier redeclared: ECPGprepare
>         current : function(int, pointer to const char, const char,
> pointer to const char, pointer to const char) returning char
>         previous: function(int, pointer to const char, const int,
> pointer to const char, pointer to const char) returning char :
> "/opt/csw/postgresql/include/ecpglib.h", line 49

What it looks like from here is that you have old/incompatible versions
of the postgresql header files in /opt/csw/postgresql/include.  Get rid
of the ill-considered -I pointing at those, and maybe it will be better.

            regards, tom lane