Re: Postgres 7 on IRIX - Mailing list pgsql-ports

From Pete Forman
Subject Re: Postgres 7 on IRIX
Date
Msg-id 14749.1761.323327.160681@kryten.bedford.waii.com
Whole thread Raw
In response to Re: Postgres 7 on IRIX  (Hernandez Alvarez Alfredo <ahernand@hafnio.servidores.unam.mx>)
Responses Re: Postgres 7 on IRIX  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Postgres 7 on IRIX  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-ports
Hernandez Alvarez Alfredo writes:
 >     Thanks. I tried making a link from the cc to
 > /usr/freeware/bin/gcc...  cant compile... I will try removing the mips
 > compiler...

That won't help.  Your problem is that configure has decided to use
the MIPSpro compiler and set the CFLAGS for that.  gcc doesn't grok
them.

Try making another template file, e.g. template/irix6_gcc.  Merge
template/irix5 and one or more of the _gcc templates.  Then configure
with

  ./configure --with-template=irix6_gcc


For what it's worth I've just been building PostgreSQL 7.0.2 on IRIX
6.5.5m with the native MIPSpro 7.3 compilers.  Both -n32 and -64
versions have been tried.  -o32 is obsolescent and was not considered.

The -64 version gives 34 warnings about 64-bit pointers being stored
in 32-bit integers.  That makes whatever is built unsafe IMHO.  How
well does PostgreSQL build on Alpha and other 64-bit systems?

One worrying problem is that when optimized -O2 both -n32 and -64
versions failed regression tests such as oidjoins.  An example is

    SELECT    oid, pg_aggregate.aggtransfn1
    FROM    pg_aggregate
    WHERE    pg_aggregate.aggtransfn1 != 0 AND
        NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid =
      pg_aggregate.aggtransfn1);
    ERROR:  getattproperties: no attribute tuple 1255 -2

I have not investigated further.  Compiling without optimization seems
okay.


So the current state of affairs is that it is built -n32 -g and passes
the regression tests.  To do this I've done the following.

1) Created a new template/irix6 containing

This is picked up by "./configure --with-template=irix6" though
presumably the configure script could be updated.

Note that the LD entry gets overridden somewhere later.  My kludge for
linker errors such as

    ld -r -o SUBSYS.o heaptuple.o indextuple.o indexvalid.o printtup.o
    scankey.o tupdesc.o
    ld: FATAL   12 : Expecting o32 objects: heaptuple.o is n32.

is to export the environment variable "SGI_ABI=-n32".


2) After running configure, edit config.h to get around the accept bug
   http://www.postgresql.org/mhonarc/pgsql-ports/2000-05/msg00042.html


3) Edit tests/regress/resultmap to add entries for IRIX.


Note that the geometry test still fails.  I've eyeballed the
differences to be just due to FP precision but it needs to be checked
thoroughly.

(I will copy item (3) to pgsql-patches.)

--
Pete Forman                 -./\.- Disclaimer: This post is originated
Western Geophysical           -./\.-  by myself and does not represent
pete.forman@westgeo.com         -./\.-  the opinion of Baker Hughes or
http://www.crosswinds.net/~petef  -./\.-  its divisions.

Attachment

pgsql-ports by date:

Previous
From: Hernandez Alvarez Alfredo
Date:
Subject: Re: Postgres 7 on IRIX
Next
From: Thomas Lockhart
Date:
Subject: Re: Postgres 7 on IRIX