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

Lists: pgsql-general
From: "Maciej (Matchek) Blizinski" <maciej(at)opencsw(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: postgresql-8.4.1 compile error (with Sun Studio 11)
Date: 2009-11-17 10:42:40
Message-ID: ce97543b0911170242o2c0bd3cbm7058539d0a1d2db3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Maciej (Matchek) Blizinski" <maciej(at)opencsw(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgresql-8.4.1 compile error (with Sun Studio 11)
Date: 2009-11-17 14:25:24
Message-ID: 27692.1258467924@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Maciej (Matchek) Blizinski" <maciej(at)opencsw(dot)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