Обсуждение: Having problems compiling postgres on IRIX

Поиск
Список
Период
Сортировка

Having problems compiling postgres on IRIX

От
Henrique Silva
Дата:

    Hi everyone.

    I am new to postgres.   I need a relational db that can be used with
a web client
from any plataform, and this seems to be it, BUT.....

    Our lab has ONLY sgi machines.   Indigo 2s running Irix 6.2, an
Origin 200 running
IRIX 6.4,  and a lonely Indigo running IRIX 5.3 !!!

    I have read about all the problems with the ld on IRIX 6.2 and
6.4,   and try to follow the
installation instructions, and did not have any luck on all 3
systesms.   Here is a little summary
of what I did !!!   BTW, these systems are patched up with the latest
patches, so, it has the
latest compilers, on the 6.2 and 6.4, and 5.3 has the latest of what it
can have ( I think it is 7.1 for
the c compiler, but I am not sure there ).

    ANyways, I installed gmake and GNU readline, but could not find
GNU install !!!  I looked on the
GNU page, and it is not there !!!   ANybody knows ?????

    Thenm I created the postgres account, logged in, and did a configure
with the --prefix and where
the location of the src directory is.    Then, issue the gmake all   and
I get a bunch of warnings and
it compiles for a while, and then, I get these errors !!!!!

Warning: parse_target.o: fmgr_pl_finfo: multiply defined
        previous (used) definition from 'analyze.o';
        new (ignored) definition from 'parse_target.o'
Warning: scan.o: fmgr_pl_finfo: multiply defined
        previous (used) definition from 'analyze.o';
        new (ignored) definition from 'scan.o'
gmake[2]: Leaving directory `/purple/disk3/pgsql/src/backend/parser'
gmake -C port all
gmake[2]: Entering directory `/purple/disk3/pgsql/src/backend/port'
cc -I../../include -I../../backend     -I..   -c dynloader.c -o
dynloader.o
cc -I../../include -I../../backend     -I..   -c isinf.c -o isinf.o
cc -I../../include -I../../backend     -I..   -c snprintf.c -o
snprintf.o
cfe: Error: snprintf.c, line 115: Syntax Error
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 -------------------^
cfe: Error: snprintf.c, line 115: Syntax Error
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 -------------------------------------^
cfe: Error: snprintf.c, line 115: Syntax Error
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 ------------------------------------------------^
cfe: Error: snprintf.c, line 115: Syntax Error
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 ---------------------------------------------------------^
cfe: Error: snprintf.c, line 115: Syntax Error
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 -------------------------------------------------------------------^
cfe: Warning 625: snprintf.c, line 115: Empty declaration
 static void fmtstr __P((char *value, int ljust, int len, int zpad, int
maxwidth));
 ---------------------------------------------------------------------------------^

cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 -------------------^
cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ------------------------------------^
cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ----------------------------------------------^
cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ----------------------------------------------------------^
cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ---------------------------------------------------------------------^
cfe: Error: snprintf.c, line 116: Syntax Error
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ------------------------------------------------------------------------------^

cfe: Warning 625: snprintf.c, line 116: Empty declaration
 static void fmtnum __P((long value, int base, int dosign, int ljust,
int len, int zpad));
 ----------------------------------------------------------------------------------------^

cfe: Error: snprintf.c, line 117: Syntax Error
 static void dostr __P(( char * , int ));
 ------------------^
cfe: Warning 625: snprintf.c, line 117: Empty declaration
 static void dostr __P(( char * , int ));
 ---------------------------------------^
cfe: Error: snprintf.c, line 119: Syntax Error
 static void dopr_outch __P(( int c ));
 -----------------------^
cfe: Warning 625: snprintf.c, line 119: Empty declaration
 static void dopr_outch __P(( int c ));
 -------------------------------------^
gmake[2]: *** [snprintf.o] Error 1
gmake[2]: Leaving directory `/purple/disk3/pgsql/src/backend/port'
gmake[1]: *** [port.dir] Error 2
gmake[1]: Leaving directory `/purple/disk3/pgsql/src/backend'
gmake: *** [all] Error 2


    SO !!!!!      Any help ?   Did anybody had some luck with SGIs ?
How do I get rid of this errors,
and or warnings ?     Since I do not have much experience with unix
compilation,   I am in a loss
here !!  My boss wants this up and running ASAP, or else, he will buy a
windoze app, argh !!!!!!

    If anybody has binaries, it would be nice to have them uploaded to
the postgres site !!!!!

--
==============================================================================
        Henrique Moreira da Silva Jr    |
        X-ray Crystallography Lab       |       voice:(617) 632-3981
                                        |
        Dana-Farber Cancer Institute    |       fax:  (617) 632-4393
        44 Binney Street, SM 1036       |
        Boston, MA 02115                |   henrique@red.dfci.harvard.edu
==============================================================================




Re: Having problems compiling postgres on IRIX

От
Robert Bruccoleri
Дата:
Dear Henrique,
    I have been using PostgreSQL on Irix for several years, and it
works very well. The Perl interface (src/interfaces/perl5) works
nicely too, especially for CGI scripts.  The problem you have run into
stems from the use of the current developmental snapshot instead of
the released version 6.3.2. Download the released version, and unpack
it. Put the following into src/Makefile.custom:

CUSTOM_CC = cc -32
LD += -32
MK_NO_LORDER = 1
LIBS = $(filter-out -nsl, $(LIBS))

Use a initialization script like the following to setup the
environment for running or compiling PostgreSQL (obviously,
you have to replace the paths, machine names, and port number
with appropriate values for your installation.

# Setup to run postgresql 6.3.2 under csh.

set path = ( /u/stone/pg/pg6.3.2/bin `printenv PATH | tr ':' '\012' | grep -v postgres/bin` )
if ($?MANPATH) then
    setenv MANPATH ${MANPATH}:/u/stone/pg/pg6.3.2/man
else
    setenv MANPATH /usr/share/catman:/usr/share/man:/usr/catman:/usr/man:/u/stone/pg/pg6.3.2/man
endif
setenv PGHOST stone
setenv PGPORT 6546
setenv POSTGRES_HOME /u/stone/pg/pg6.3.2
setenv PGDATA /u/stone/pg/pg6.3.2/data
setenv PGLIB /u/stone/pg/pg6.3.2/lib
if ($?POSTGRESDIR) then
        unsetenv POSTGRESDIR
endif

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

Next, apply the locking patch I posted to pgsql-patches (volume 1 # 107)

Then, study the script below, edit it to suit your installation,
and then run it to build PostgreSQL

#!/bin/ksh -x

cd src
cat >config.cache <<EOF
ac_cv_lib_nsl_main=${ac_cv_lib_nsl_main='no'}
EOF
gmake clean
INSTALL=/usr/local/bin/install ./configure --prefix=/pg/pg6.3.2 --enable-hba --with-pgport=6546 --disable-locale
--enable-cassert--with-template=irix5 --with-tcl --with-includes="/usr/local/include /usr/local/include/readline"
--with-libs=/usr/local/lib
gmake -j 2
gmake install
export PATH=/pg/pg6.3.2/bin:$PATH
initdb --pgdata=/pg/pg6.3.2/data --pglib=/pg/pg6.3.2/lib
cd ../data
if [[ ! -r pg_hba.conf.bak ]]
then
      chmod 644 pg_hba.conf
      cp pg_hba.conf pg_hba.conf.bak
      cat >>pg_hba.conf <<EOF
host         all        0.0.0.0       0.0.0.0           trust

# The above would allow anyone anywhere to connect to any database under
# any username.
EOF
      chmod 444 pg_hba.conf
fi
cd ../src
export TZ=PST8PDT7
postmaster -S -i
cd test/regress
gmake clean
gmake all runtest

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

The Perl5 interface can be built using the following set of commands
when your default directory is src/interfaces/perl5. Note that you
must have built perl using the -32 compilation switch and
it be able to dynamically load objects.

#!/bin/csh -x

perl Makefile.PL
smake
smake test
su root -c "smake install"

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

With regard to the install script, you can use /usr/bin/X11/bsdinst
and that should work OK.

If you need more help, send me email. We certainly don't you
to use Windoze!

+------------------------------------------+------------------------------+
| Robert E. Bruccoleri, Ph.D.              | Associate Research Professor |
| phone: 732 235 5796                      | Center for Advanced          |
| Fax:   732 235 4850                      |   Biotechnology and Medicine |
| email: bruc@acm.org                      | Rutgers University           |
| URL:   http://www.cabm.rutgers.edu/~bruc | 679 Hoes Lane                |
|                                          | Piscataway, NJ 08854-5638    |
+------------------------------------------+------------------------------+