PostgreSQL on Irix

From: Robert Bruccoleri <bruc(at)pluto(dot)njcc(dot)com>
To: postgres(at)fvision(dot)com
Cc: pgsql-ports(at)hub(dot)org
Subject: PostgreSQL on Irix
Date: 1999-07-01 12:27:01
Message-ID: 199907011227.IAA09314@pluto.njcc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Dear Gerald,
Here's how I've built PostgreSQL on Irix (I avoid using gcc
on Irix because it doesn't work as well as the native compilers):

1.Add the following block to src/Makefile.shlib

ifeq ($(PORTNAME), irix5)
install-shlib-dep := install-shlib
shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -shared
CFLAGS += $(CFLAGS_SL)
endif

2. Make src/Makefile.custome with

CUSTOM_CC = cc -32
LD += -32
MK_NO_LORDER = 1

3. Modify the install script to always copy, never move. The following install will work:

#!/bin/ksh
# Stripping is ignored in this version of install.

cmd=/bin/cp
strip=""
chmod="/bin/chmod 755"
user=`/usr/bin/whoami`
if [ $user = "root" ]
then
chown="/bin/chown bin"
chgrp="/bin/chgrp bin"
else
chown="/bin/chown $user"
set -A groups `/usr/bin/groups`
chgrp="/bin/chgrp ${groups[0]}"
fi
while :
do
case $1 in
-s ) strip=""
;;
-c ) cmd="/bin/cp"
;;
-m ) chmod="/bin/chmod $2"
shift
;;
-o ) chown="/bin/chown $2"
shift
;;
-g ) chgrp="/bin/chgrp $2"
shift
;;
* ) break
;;
esac
shift
done

case "$2" in
"") echo "install: no destination specified"
exit 1
;;
.|"$1") echo "install: can't move $1 onto itself"
exit 1
;;
esac
case "$3" in
"") ;;
*) echo "install: too many files specified -> $*"
exit 1
;;
esac
if [ -d $2 ]
then file=$2/$1
else file=$2
fi
/bin/rm -f $file
$cmd $1 $file
[ $strip ] && $strip $file
$chown $file
$chgrp $file
$chmod $file

4. Configure nsl off and make sure the correct install program is
used. The following shell statements will do this.

cd src
rm config.cache
cat >config.cache <<EOF
ac_cv_lib_nsl_main=${ac_cv_lib_nsl_main='no'}
EOF
gmake clean
INSTALL="your install program as above" ./configure --prefix=/pg/pgsql --without-CXX ...

========================================================================

I haven't yet gotten libpq++ to build correctly and one regression test,
misc.out, fails due to a segmentation error in the copying of binary
data. The traceback is

dbx ../../../bin/postgres (wd: /pg/pgsql/data/base/regression)
use /pg/pgsql/src/backend/commands
(dbx) where
> 0 CopyFrom(0x10147450, 0x1, 0x0, 0xfb4d6f4) ["copy.c":809, 0x48e1f0]
1 DoCopy(0x1013a5d0, 0x1, 0x0, 0x1) ["copy.c":304, 0x48c760]
2 ProcessUtility(0x1013a630, 0x3, 0x0, 0x1013ab78) ["utility.c":227, 0x5598f8]
3 pg_exec_query_dest(0x7ffee364, 0x3, 0x0, 0x1013ab78) ["postgres.c":718, 0x556eb8]
4 pg_exec_query(0x7ffee364, 0x1014e1d0, 0x0, 0x1013ab78) ["postgres.c":654, 0x556d34]
5 PostgresMain(0x8, 0x7fff28f0, 0x7, 0x7fff2e84) ["postgres.c":1649, 0x5586f4]
6 DoBackend(0x100e2b10, 0x1014e1d0, 0x0, 0x1013ab78) ["postmaster.c":1611, 0x525a6c]
7 BackendStartup(0x100e2b10, 0x1014e1d0, 0x0, 0x1013ab78) ["postmaster.c":1356, 0x525260]
8 ServerLoop(0x1013ab88, 0x1014e1d0, 0x0, 0x1013ab78) ["postmaster.c":806, 0x524060]
9 PostmasterMain(0x7, 0x7fff2e84, 0x0, 0x1013ab78) ["postmaster.c":599, 0x5237cc]
10 main(0x7, 0x7fff2e84, 0x0, 0x1013ab78) ["main.c":93, 0x4cc92c]
11 __istart() ["crt1tinit.s":13, 0x42a490]
(dbx) l
>* 809 ptr = att_addlength(ptr, attr[i]->attlen, ptr);
810 }
811 }
812 }
813 }
814 if (done)
815 continue;
816
817 /*
818 * Does it have any sence ? - vadim 12/14/96

+----------------------------------+------------------------------------+
| Robert E. Bruccoleri, Ph.D. | Phone: 609 737 6383 |
| President, Congenomics, Inc. | Fax: 609 737 7528 |
| 114 W. Franklin Ave, Suite K1,10 | email: bruc(at)acm(dot)org |
| P.O. Box 314 | URL: http://www.congen.com/~bruc |
| Pennington, NJ 08534 | |
+----------------------------------+------------------------------------+

Browse pgsql-ports by date

  From Date Subject
Next Message Andrew Orlowski 1999-07-02 14:13:01 regression problems
Previous Message Bruce Momjian 1999-07-01 04:43:01 Re: [Fwd: [PORTS] Port Bug Report: parse error not detected on unterminated quote]