Subject: PostgreSQL 7.2.1 - fix, but who needs to know ?
To: None <port-cobalt@netbsd.org>
From: ian <cobalt@borg.minimal.cx>
List: port-cobalt
Date: 06/05/2002 17:11:05
Hi all,

I've been messing around with 1.5.3 on a Qube 2, mainly wanting to get a
database going so I can dump the Linux load.  It appears that the v7.2.1 in
the ports tree dies when building postgresql-server in the s_lock.c file due
to the code using opcodes that are only available when the -mips2 flag is
given to gcc.

I've built the same code on the original Linux distro (2.0.34) and it's
fine.  I've trapped the build at the point it does on NetBSD/cobalt, and
it's in the same #ifdef block.  I've checked the Makefile.global in the
postgresql-7.2.1/src directory, and CFLAGS does indeed have -mips2 given to
it.

Looking in the web CVS for the postgresql-server port indicates that it's
pretty much unaltered from the original file, and the top of the
Makefile.global says that this file is auto-built from the ./configure
script, and if anything needs changing then it's a bug.

My problem is: whose bug is it ?  I *think* it's something I should mention
to the postgresql people, as the src/template/netbsd file is simply missing
the test for the CPU type that the src/template/linux file has.
Unfortunately, I can't see a method of testing for mips1 CPU's (I'm new to
MIPS) which would break with the -mips2 flag.  Is this something that should
be patched with the NetBSD ports build process, as it's more of a NetBSD
quirk (!) that it supprts so many CPU's/architectures ?

Anyway, aside from that it does look like the build was ok.  I'll try
testing it tonight, but I can only switch away from Linux for a couple of
hours at a time, as the system is serving up a few web sites.

Thanks in advance for any guidance,
-- 
Ian Spray