gettimeofday problem with mingw - Mailing list pgsql-ports
From | Marc Lepage |
---|---|
Subject | gettimeofday problem with mingw |
Date | |
Msg-id | 8B5901C2B9E9094AA4028CF5E33980D703E7E7@aristotle.PyxisInnovation.local Whole thread Raw |
Responses |
Re: gettimeofday problem with mingw
|
List | pgsql-ports |
Hi guys. I’m trying to build a simple user-defined data type on Windows XP. I downloaded the 8.1.4 sources, installed MinGW, and attempted to build the sources and the “complex” sample UDT.
I can run “configure --without-zlib” easily enough, but make fails right away with:
$ make
make -C doc all
make[1]: Entering directory `/c/postgresql-8.1.4/doc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/postgresql-8.1.4/doc'
make -C src all
make[1]: Entering directory `/c/postgresql-8.1.4/src'
make -C port all
make[2]: Entering directory `/c/postgresql-8.1.4/src/port'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -I./src/include/port/win32 -DEXEC_BACKEND "-I../../src/include/port/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: error: redefinition of `struct timezone'
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: error: conflicting types for 'gettimeofday'
../../src/include/port.h:266: error: previous declaration of 'gettimeofday' was here
c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/sys/time.h:40: error: conflicting types for 'gettimeofday'
../../src/include/port.h:266: error: previous declaration of 'gettimeofday' was here
make[2]: *** [getrusage.o] Error 1
make[2]: Leaving directory `/c/postgresql-8.1.4/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/c/postgresql-8.1.4/src'
make: *** [all] Error 2
My make version is 3.79.1 (/bin/make), GCC is /mingw/bin/gcc, and my path is:
.:/usr/local/bin:/mingw/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/system32/WBEM:/c/Program Files/ATI Technologies/ATI.ACE/:/c/Program Files/Microsoft SQL Server/80/Tools/BINN:/c/Program Files/Microsoft SQL Server/90/Tools/binn/:/c/Program Files/doxygen/bin
I installed MSYS 1.0.10, set the fstab with entry “c:/mingw /mingw”, then unzipped these packages into /mingw:
mingw-runtime-3.10.tar.gz
w32api-3.7.tar.gz
binutils-2.15.91-20040904-1.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
I have cygwin installed (default installation) but it doesn’t seem to me that it’s interfering in this case (am I wrong?). I also have the Windows binary distribution of PostgreSQL 8.1.4 installed.
Is there something I should check? Configuration issues? Should I install MinGW differently? (I’ve never used it before.)
Remember, my goal is just compiling the “complex” sample UDT for Windows, and then making my own simple UDT. Thanks!
pgsql-ports by date: