Обсуждение: Seeking Restoration Advice
I would appreciate any suggestions that people could contribute to my dilema.
I have a Debian/Postgres 7.1.2 server where root partition went bad but the database partition is fine. I've rebuilt an installation on a new drive and am in the process of trying to restore the data. I have the old drive mounted fine and can see the data directory.
My thought process was to simply install the same version of postgresql that was on the old server from it's source but I'm getting the following error.
./configure
.....
checking types of arguments for accept()... configure: error: could not determine argument types
Config.log:
...
/usr/include/bits/types.h:37: error: declaration for parameter '__u_long' but no such parameter
/usr/include/bits/types.h:36: error: declaration for parameter '__u_int' but no such parameter
/usr/include/bits/types.h:35: error: declaration for parameter '__u_short' but no such parameter
/usr/include/bits/types.h:34: error: declaration for parameter '__u_char' but no such parameter
configure:5399: error: expected '{' at end of input
configure: failed program was:
#line 5389 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern int accept (unsigned int, void *, void *);
int main() {
/usr/include/bits/types.h:36: error: declaration for parameter '__u_int' but no such parameter
/usr/include/bits/types.h:35: error: declaration for parameter '__u_short' but no such parameter
/usr/include/bits/types.h:34: error: declaration for parameter '__u_char' but no such parameter
configure:5399: error: expected '{' at end of input
configure: failed program was:
#line 5389 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern int accept (unsigned int, void *, void *);
int main() {
; return 0; }
I know I should have more recent backups but life will be easiest if I can use this data since it is time sensative.
Thanks for your suggestions,
Aaron
"Aaron Woehler" <awoehler@gemstate.org> writes: > I have a Debian/Postgres 7.1.2 server where root partition went bad but the > database partition is fine. I've rebuilt an installation on a new drive and > am in the process of trying to restore the data. I have the old drive > mounted fine and can see the data directory. > My thought process was to simply install the same version of postgresql that > was on the old server from it's source but I'm getting the following error. > ./configure > ..... > checking types of arguments for accept()... configure: error: could not > determine argument types Hm, did you reinstall the same Debian version as before, or something (much) newer? What this looks like to me is that the system header files have changed in a way that 7.1's ancient configure script doesn't handle. Based on the error messages, it seems <sys/types.h> won't compile on its own, which seems a bit odd ... [ pokes around... ] The only promising idea I have is to add this: CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" into 7.1's src/template/linux. Oh, one other thing: do the first few lines of configure's output look sane, in particular is it selecting the linux template in the first place? Maybe you need a new config.guess more than anything. If that doesn't help, you either need to get down-and-dirty with the system headers to find out what to tweak, or install a Debian release of the same era as Postgres 7.1. regards, tom lane