Compilation of PostgreSQL on Irix - Mailing list pgsql-hackers

From Robert E. Bruccoleri
Subject Compilation of PostgreSQL on Irix
Date
Msg-id 200310081302.h98D2ucm157508@stone.congenomics.com
Whole thread Raw
Responses Re: Compilation of PostgreSQL on Irix
List pgsql-hackers
Dear Devrim,I have been using Postgres on Irix for over 8 years, and I have only
used the SGI provided compilers. GCC doesn't work well on Irix. In addition,
you can build a 64 bit version of PostgreSQL. Here's the script we used for
PostgreSQL 7.3.2:

#!/bin/ksh -x

./copy_local_files_for_build
export SGI_ABI=-64
cat >config.cache <<EOF
ac_cv_lib_nsl_main=${ac_cv_lib_nsl_main='no'}
ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'}
ac_cv_prog_gcc=${ac_cv_prog_gcc=no}
ac_cv_prog_perl=${ac_cv_prog_perl=/stf/sys64/bin/perl}
EOF
gmake clean
CC="cc -64" \
AWK=awk \
INSTALL=/pg/postgresql-7.3.2/config/install-sh \
LDFLAGS="-rpath $POSTGRES_HOME/local/lib" \
./configure --prefix=/pg/postgresql-7.3.2 \           --enable-hba \           --with-pgport=6543 \
--disable-locale\           --enable-cassert \           --with-template=irix5 \
--with-includes="$POSTGRES_HOME/local/include$POSTGRES_HOME/local/include/readline" \
--with-libs=$POSTGRES_HOME/local/lib\           --without-CXX \           --with-maxbackends=128 \
--enable-debug\           --without-java \           --enable-odbc
 
gmake
LD_LIBRARY64_PATH=/pg/postgresql-7.3.2/src/interfaces/libpq:$LD_LIBRARY64_PATH gmake check
gmake install
export PATH=/pg/postgresql-7.3.2/bin:$PATH
initdb -D /pg/postgresql-7.3.2/data

------------------------------------------------------------------------

src/Makefile.custom is set to:

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

The script copy_local_files_for_build is as follows:

#!/bin/sh

source="/stf/sys64"

if [ "$POSTGRES_HOME"x = x ]
then   echo "No POSTGRES_HOME variable set."   exit 1
fi

if [ ! -d $POSTGRES_HOME/local/lib ]
then   mkdir -p $POSTGRES_HOME/local/lib
fi

/usr/local/bin/tarcp $source/include/readline $POSTGRES_HOME/local/include/readline
cp ${source}/lib/libz* $POSTGRES_HOME/local/lib
cp ${source}/lib/libreadline* $POSTGRES_HOME/local/lib
cp ${source}/include/z* $POSTGRES_HOME/local/include

--Bob

+-----------------------------+------------------------------------+
| Robert E. Bruccoleri, Ph.D. | email: bruc@acm.org                |
| President, Congenomics Inc. | URL:   http://www.congen.com/~bruc |
| P.O. Box 314                | Phone: 609 818 7251                | 
| Pennington, NJ 08534        |                                    |
+-----------------------------+------------------------------------+


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: new initdb.c available
Next
From: Andrew Dunstan
Date:
Subject: Re: new initdb.c available