On Tue, Jul 15, 2014 at 5:14 AM, Michael Paquier <michael.paqu...@gmail.com> wrote:
> On Tue, Jul 15, 2014 at 8:46 PM, Magnus Hagander <mag...@hagander.net> > wrote: > > On Thu, Jun 19, 2014 at 4:13 PM, MauMau <maumau...@gmail.com> wrote: > >> From: "Michael Paquier" <michael.paqu...@gmail.com> > >> > >>> You are right, I only though about the MS scripts when working on this > >>> patch. Updated patch for a complete cleanup is attached (note I > >>> updated manually ./configure for test purposes and did not re-run > >>> autoconf). > >> > >> > >> I marked this patch as ready for committer. I confirmed: > > > > I'm pretty sure this is not ready for commiter due to: > > > >> * The binaries can be built with MSVC 2008 Express. I didn't try to > build > >> on MinGW. > > > > Somebody needs to test it on mingw first :) > > > > That should be an easy test for someone who has a mingw install > > around, so better leave it at "needs review" so more people see it and > > can run those tests. > I vaguely recall that I tested as well with MinGW when writing v2 of > this patch after MauMau reviewed v1. Btw, just in case, I have just > made working my MinGW box a bit more and re-tested it now. And it > worked :) > > Of course someone else than the patch author with a MinGW environment > at hand is invited to test. > I guess I should have done that.... While trying to test more recent stuff against mingw, I kept running into a problem which bisected down to this (a16bac36eca8158cbf78987e953). I am following the instructions at https://wiki.postgresql.org/wiki/Building_With_MinGW, using the mingw64 set of instructions and of course the git instructions. Except that I am running as my own user, not creating a dummy account, and I am using local hardware, not an amazon rental. This is the warning/error I get: auth.c: In function 'ClientAuthentication': auth.c:458:6: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] auth.c:458:6: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] auth.c:458:6: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat] auth.c:476:6: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] auth.c:476:6: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat] auth.c: In function 'CheckRADIUSAuth': auth.c:2282:3: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] hba.c: In function 'parse_hba_line': hba.c:1060:5: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] hba.c:1060:5: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] hba.c:1131:6: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] hba.c: In function 'parse_hba_auth_opt': hba.c:1607:4: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] pqcomm.c: In function 'StreamServerPort': pqcomm.c:334:4: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] pqcomm.c:334:4: warning: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Wformat] pqcomm.c:338:4: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat] mingwcompat.c:60:1: warning: 'RegisterWaitForSingleObject' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] pgstat.c: In function 'pgstat_init': pgstat.c:353:3: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] pgstat.c:353:3: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat] postmaster.c: In function 'BackendInitialize': postmaster.c:3938:3: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration] postmaster.c:3938:3: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Wformat] libpq/auth.o:auth.c:(.text+0x1949): undefined reference to `gai_strerror' libpq/auth.o:auth.c:(.text+0x19c4): undefined reference to `gai_strerror' libpq/auth.o:auth.c:(.text+0x1b1a): undefined reference to `gai_strerror' libpq/auth.o:auth.c:(.text+0x1cb4): undefined reference to `gai_strerror' libpq/auth.o:auth.c:(.text+0x1cdc): undefined reference to `gai_strerror' libpq/hba.o:hba.c:(.text+0x1fa0): more undefined references to `gai_strerror' follow collect2.exe: error: ld returned 1 exit status make[2]: *** [postgres] Error 1 make[1]: *** [all-backend-recurse] Error 2 make: *** [all-src-recurse] Error 2 Any suggestions on what to try? This patch doesn't seem to explicitly mention gai_strerror at all, so it must be some indirect effect. Cheers, Jeff