7.4.6 build failures on Solaris 9 with Sun cc
Hi all, before I delve too deeply into this, has anyone else tried building
7.4.6 on Solaris 9 (sparc) ? I'm seeing build failures using Sun's cc:
make[4]: Entering directory `/tmp/postgresql-7.4.6/src/backend/access/heap'
cc -Xa -O -v -I../../../../src/include -c -o tuptoaster.o tuptoaster.c
"tuptoaster.c", line 831: member can not have variably modified type: data
"tuptoaster.c", line 937: cannot recover from previous errors
cc: acomp failed for tuptoaster.c
Which is:
struct
{
struct varlena hdr;
char data[TOAST_MAX_CHUNK_SIZE];
} chunk_data;
The compiler is cc: Sun C 5.6 2004/06/02 (Sun Studio 9)
If no-one's seen this before, I'll do some digging.
Regards, Philip.
Philip Yarra <philip@utiba.com> writes:
Hi all, before I delve too deeply into this, has anyone else tried building
7.4.6 on Solaris 9 (sparc) ? I'm seeing build failures using Sun's cc:
make[4]: Entering directory `/tmp/postgresql-7.4.6/src/backend/access/heap'
cc -Xa -O -v -I../../../../src/include -c -o tuptoaster.o tuptoaster.c
"tuptoaster.c", line 831: member can not have variably modified type: data
"tuptoaster.c", line 937: cannot recover from previous errors
cc: acomp failed for tuptoaster.c
Which is:
struct
{
struct varlena hdr;
char data[TOAST_MAX_CHUNK_SIZE];
} chunk_data;
The compiler is cc: Sun C 5.6 2004/06/02 (Sun Studio 9)
I think we've seen this before, and the workaround was to replace the
expression that defines TOAST_MAX_CHUNK_SIZE with a hand-computed
constant. Check the archives.
regards, tom lane
On Fri, Dec 03, 2004 at 11:31:19AM +1100, Philip Yarra wrote:
Hi all, before I delve too deeply into this, has anyone else tried building
7.4.6 on Solaris 9 (sparc) ? I'm seeing build failures using Sun's cc:make[4]: Entering directory `/tmp/postgresql-7.4.6/src/backend/access/heap'
cc -Xa -O -v -I../../../../src/include -c -o tuptoaster.o tuptoaster.c
"tuptoaster.c", line 831: member can not have variably modified type: data
"tuptoaster.c", line 937: cannot recover from previous errors
cc: acomp failed for tuptoaster.c
gcc 3.4.2 on Solaris 9 doesn't complain about this.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
On Fri, 3 Dec 2004 01:43 pm, Michael Fuhr wrote:
gcc 3.4.2 on Solaris 9 doesn't complain about this.
Yes, I found Tom's response to the issue from March here:
http://archives.postgresql.org/pgsql-ports/2004-03/msg00009.php
and this on the Sun CC forum, confirming that the compiler is borked:
http://forum.sun.com/thread.jspa?threadID=20947&tstart=0
It'd be handy if they said what ID the bug had been assigned so I knew what
patch to download to fix it. I'll post the info once I can find it so there's
a simple "Apply patch #xxxx" answer in future.
I ended up building with gcc 3.4.0, no problem. Thanks for following up.
Regards, Philip.