Thread: 7.0 installation problem, help please :-(
I'm pgsql newbie. I try to install the pgsql 7.0 on my Solaris 8 x86 server but fail. The following is the error message: stringinfo.c: In function `appendStringInfo': stringinfo.c:104: `va_list' undeclared (first use in this function) stringinfo.c:104: (Each undeclared identifier is reported only once stringinfo.c:104: for each function it appears in.) stringinfo.c:104: parse error before `args' stringinfo.c:121: warning: implicit declaration of function `va_start' stringinfo.c:121: `args' undeclared (first use in this function) stringinfo.c:124: warning: implicit declaration of function `va_end' gmake[2]: *** [stringinfo.o] Error 1 gmake[2]: Leaving directory `/usr/share/src/postgresql-7.0/src/backend/lib' gmake[1]: *** [lib.dir] Error 2 gmake[1]: Leaving directory `/usr/share/src/postgresql-7.0/src/backend' gmake: *** [all] Error 2 The installed softwares on the Solaris 8 1. gcc 2.95.2 2. bison 1.28 3. flex 2.5.4 4. gmake, zcat ...etc. Can anyone help me? 1,000,000 thanks ---- Chris Chan
That's odd. This is the error I got compiling pgsql 6.5 on Solaris. I never resolved the problem. However, the 7.0 source did not give this error. Maybe this is a stupid question, but are you sure you have the most recent source code? ---------------------------------------------------------------- Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer ---------------------------------------------------------------- On Tue, 23 May 2000, Chris Chan wrote: > > I'm pgsql newbie. I try to install the pgsql 7.0 on my Solaris 8 x86 server > but fail. The following is the error message: > > > stringinfo.c: In function `appendStringInfo': > stringinfo.c:104: `va_list' undeclared (first use in this function) > stringinfo.c:104: (Each undeclared identifier is reported only once > stringinfo.c:104: for each function it appears in.) > stringinfo.c:104: parse error before `args' > stringinfo.c:121: warning: implicit declaration of function `va_start' > stringinfo.c:121: `args' undeclared (first use in this function) > stringinfo.c:124: warning: implicit declaration of function `va_end' > gmake[2]: *** [stringinfo.o] Error 1 > gmake[2]: Leaving directory `/usr/share/src/postgresql-7.0/src/backend/lib' > gmake[1]: *** [lib.dir] Error 2 > gmake[1]: Leaving directory `/usr/share/src/postgresql-7.0/src/backend' > gmake: *** [all] Error 2
Travis Bauer <trbauer@indiana.edu> writes: > That's odd. This is the error I got compiling pgsql 6.5 on Solaris. I > never resolved the problem. However, the 7.0 source did not give this > error. Maybe this is a stupid question, but are you sure you have the > most recent source code? > On Tue, 23 May 2000, Chris Chan wrote: >> stringinfo.c: In function `appendStringInfo': >> stringinfo.c:104: `va_list' undeclared (first use in this function) >> stringinfo.c:104: (Each undeclared identifier is reported only once >> stringinfo.c:104: for each function it appears in.) This would seem to indicate that <stdarg.h> isn't getting included, which in turn suggests that the configure script didn't define STDC_HEADERS (look in include/config.h to confirm or deny that). The autoconf manual lists a number of reasons for not defining STDC_HEADERS: - Macro: AC_HEADER_STDC Define `STDC_HEADERS' if the system has ANSI C header files. Specifically, this macro checks for `stdlib.h', `stdarg.h', `string.h', and `float.h'; if the system has those, it probably has the rest of the ANSI C header files. This macro also checks whether `string.h' declares `memchr' (and thus presumably the other `mem' functions), whether `stdlib.h' declare `free' (and thus presumably `malloc' and other related functions), and whether the `ctype.h' macros work on characters with the high bit set, as ANSI C requires. Any reasonably recent Unix system ought to pass those checks AFAIK, but maybe there's a screw loose somewhere... regards, tom lane
Thank you all, I finally get it install... the following are the steps: #!/sbin/sh groupadd -g 102 postgres useradd -d /usr/src/pgsql -g 102 -u 501 postgres gunzip -d -c postgresql-7.0.tar.gz | tar vxf - mv postgresql-7.0 /usr/src mv /opt/sfw/lib/libncurses.so /opt/sfw/lib/libncurses.so.bak ln -s /usr/local/include/tcl.h /usr/include/tcl.h ln -s /usr/local/include/tclDecls.h /usr/include/tclDecls.h ln -s /usr/local/include/tkDecls.h /usr/include/tkDecls.h ln -s /usr/local/include/tk.h /usr/include/tk.h cd /usr/src/postgresql-7.0/src ./configure \ --with-includes=/usr/local/include \ --with-cc=gcc \ --enable-multibyte \ --with-tcl \ --with-tclconfig=/usr/local/lib \ --with-tkconfig=/usr/local/lib \ --with-perl \ --with-odbc gmake gmake install mv /opt/sfw/lib/libncurses.so.bak /opt/sfw/lib/libncurses.so mkdir /usr/local/pgsql/data LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib export LD_LIBRARY_PATH chown -R postgres:postgres /usr/local/pgsql/data su postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/postmaster -S -D /usr/local/pgsql/data exit echo "#!/sbin/sh echo 'Starting PostgreSQL ...' echo '' LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib export LD_LIBRARY_PATH su postgres -c "/usr/local/pgsql/bin/postmaster -S -D /usr/local/pgsql/data" echo 'done' exit 0" > /etc/rc2.d/S99pgsqld chmod 744 /etc/rc2.d/S99pgsqld chown root:sys /etc/rc2.d/S99pgsqld echo '' echo 'done' exit 0 ---- Chris Chan ----- Original Message ----- From: Tom Lane <tgl@sss.pgh.pa.us> To: Travis Bauer <trbauer@indiana.edu> Cc: Chris Chan <chris@hkseek.com>; <pgsql-general@postgresql.org> Sent: Thursday, May 25, 2000 5:59 AM Subject: Re: [GENERAL] 7.0 installation problem, help please Travis Bauer <trbauer@indiana.edu> writes: > That's odd. This is the error I got compiling pgsql 6.5 on Solaris. I > never resolved the problem. However, the 7.0 source did not give this > error. Maybe this is a stupid question, but are you sure you have the > most recent source code? > On Tue, 23 May 2000, Chris Chan wrote: >> stringinfo.c: In function `appendStringInfo': >> stringinfo.c:104: `va_list' undeclared (first use in this function) >> stringinfo.c:104: (Each undeclared identifier is reported only once >> stringinfo.c:104: for each function it appears in.) This would seem to indicate that <stdarg.h> isn't getting included, which in turn suggests that the configure script didn't define STDC_HEADERS (look in include/config.h to confirm or deny that). The autoconf manual lists a number of reasons for not defining STDC_HEADERS: - Macro: AC_HEADER_STDC Define `STDC_HEADERS' if the system has ANSI C header files. Specifically, this macro checks for `stdlib.h', `stdarg.h', `string.h', and `float.h'; if the system has those, it probably has the rest of the ANSI C header files. This macro also checks whether `string.h' declares `memchr' (and thus presumably the other `mem' functions), whether `stdlib.h' declare `free' (and thus presumably `malloc' and other related functions), and whether the `ctype.h' macros work on characters with the high bit set, as ANSI C requires. Any reasonably recent Unix system ought to pass those checks AFAIK, but maybe there's a screw loose somewhere... regards, tom lane