Skip site navigation (1) Skip section navigation (2)

gettimeofday problem with mingw

From: "Marc Lepage" <mlepage(at)pyxisinnovation(dot)com>
To: <pgsql-ports(at)postgresql(dot)org>
Subject: gettimeofday problem with mingw
Date: 2006-06-26 18:34:05
Message-ID: 8B5901C2B9E9094AA4028CF5E33980D703E7E7@aristotle.PyxisInnovation.local (view raw or flat)
Thread:
Lists: 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/WINDO
WS/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!

 

 

Responses

pgsql-ports by date

Next:From: LaJ / Lars JørgensenDate: 2006-06-27 13:24:56
Subject: Cros-compilation of the postgresql
Previous:From: Tom LaneDate: 2006-06-16 00:36:26
Subject: Re: errcode redefinition

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group