Building on MinGW - Mailing list pgsql-hackers

From Jeff Janes
Subject Building on MinGW
Date
Msg-id CAMkU=1w=jS=2V4Zto9EEU-C7saHLECtXiBRAbfK9Y8nEHrrfLw@mail.gmail.com
Whole thread Raw
Responses Re: Building on MinGW  (Andrew Dunstan <andrew@dunslane.net>)
Re: Building on MinGW  (Pavel Golub <pavel@microolap.com>)
List pgsql-hackers
Changed subject from "Strange Windows problem, lock_timeout test request"

On Thu, Jan 24, 2013 at 11:41 AM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 01/24/2013 01:44 PM, Jeff Janes wrote:
On Sat, Jan 19, 2013 at 12:15 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
On 01/19/2013 02:36 AM, Boszormenyi Zoltan wrote:
A long time ago I had a lot of sympathy with this answer, but these days not
so much. Getting a working mingw/msys environment sufficient to build a bare
bones PostgreSQL from scratch is both cheap and fairly easy. The
improvements that mingw has made in its install process, and the presence of
cheap or free windows instances in the cloud combine to make this pretty
simple.  But since it's still slightly involved here is how I constructed
one such  this morning:
I've used this description, skipping the Amazon part and putting it
directly on my Windows computer, and it worked.

Except bin/pg_ctl does not work.  It just silently exits without doing
anything, so I have to use bin/postgres to start the database (which
is what "make check" uses anyway, so not a problem if you just want
make check).  Is that just me or is that a known problem?  I've seen
some discussion from 2004, but didn't find a conclusion.

Did you copy libpq.dll from the lib directory to the bin directory? If not, try that and see if it fixes the problem.


I've now done that, and it did fix the problem.  I can start the database with pg_ctl.exe if I want.

Should the makefile do this for us?  Or is there a way to configure so that is not needed (whatever the MinGW equivalent is to an rpath?)

psql.exe now runs, but it seems to be broken.  It hangs forever on attempting to connect to any server (either the local one compiled with MinGW, or a remote server running on Linux).

psql on the remote linux machine can connect back to the Windows server compiled with MinGW, so the problem seems to be with MinGW's psql.exe, not its server.

Doesn't "make check" have to use something which is morally equivalent to psql.exe?  If so, how can it pass if psql.exe is broken?

I've put up a wiki page:

https://wiki.postgresql.org/wiki/Building_With_MinGW

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Materialized views WIP patch
Next
From: Robert Haas
Date:
Subject: Re: Materialized views WIP patch