[PORTS] Compilation failure: 8.2.4 and 8.1.0 under XPPro/MinGW

"Phil Mills" <[email protected]> Tue, 3 Jul 2007 15:29:59 -0600
Newsgroups gmane.comp.db.postgresql.ports
Message-ID <[email protected]>
I've seen the build error below referenced in several messages, but haven't=
 seen a clear answer for how to resolve it.=20=20

Environment: XP Pro with MSys/MinGW freshly installed according to the docs=
 here: http://www.postgresql.org/docs/faqs.FAQ_MINGW.html
Zlib is installed; Visual Studio and Cygwin are also on the system but shou=
ld be out of the way.

Reason for building: increase NAMEDATALEN so it'll quit truncating my absur=
dly-large column names.

Output from Make (substantially the same whether I'm building 8.2.4 or 8.1.=
0):

pmills@ITLPT9060 /c/postgresql-8.2.4
$ make
make -C doc all
make[1]: Entering directory `/c/postgresql-8.2.4/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/postgresql-8.2.4/doc'
make -C src all
make[1]: Entering directory `/c/postgresql-8.2.4/src'
make -C port all
make[2]: Entering directory `/c/postgresql-8.2.4/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-a=
fter-                             statement -Wendif-labels -fno-strict-alia=
sing -I../../src/port -DFRONTEND -I../.                             ./src/i=
nclude -I./src/include/port/win32 -DEXEC_BACKEND  "-I../../src/include/po  =
                           rt/win32"  -c -o getrusage.o getrusage.c
In file included from ../../src/include/rusagestub.h:17,
                 from getrusage.c:18:
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:27: er=
ror:                              redefinition of `struct timezone'
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: er=
ror:                              conflicting types for 'gettimeofday'
../../src/include/port.h:292: error: previous declaration of 'gettimeofday'=
 was                              here
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: er=
ror:                              conflicting types for 'gettimeofday'
../../src/include/port.h:292: error: previous declaration of 'gettimeofday'=
 was                              here
make[2]: *** [getrusage.o] Error 1
make[2]: Leaving directory `/c/postgresql-8.2.4/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/postgresql-8.2.4/src'
make: *** [all] Error 2

pmills@ITLPT9060 /c/postgresql-8.2.4
$=20


Could someone please provide either:=20
* Better instructions for how to install/configure MSys and MinGW
or
* Better instructions for how to compile Postgres using MinGW?

This email and any attachments are confidential, may be attorney-client pri=
vileged and are intended only for the use of the addressee.  Unauthorized u=
se, distribution or copying is forbidden and may be unlawful.  If you have =
received this email in error, please notify the sender immediately by retur=
n email and delete all copies of this message and any attachments from your=
 computer.  Thank you.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster