Re: Building on MinGW

From: Pavel Golub <pavel(at)microolap(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Boszormenyi Zoltan <zb(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Hans-Jürgen Schönig <hs(at)cybertec(dot)at>, Ants Aasma <ants(at)cybertec(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Building on MinGW
Date: 2013-03-04 09:32:10
Message-ID: 195457094.20130304113210@gf.microolap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, Jeff.

You wrote:

JJ> Changed subject from "Strange Windows problem, lock_timeout test request"

JJ> On Thu, Jan 24, 2013 at 11:41 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

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

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

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

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

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

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

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

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

JJ> I've put up a wiki page:

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

Jeff, I think inromation about installing dependencies should be added
to this Wiki. At least zlib and openssl are "must have" for libpq, psql and
pg_dump\pg_restore

JJ> Cheers,

JJ> Jeff

--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-03-04 09:55:08 Re: Matview patch added rewriteDefine.c.orig to the repository
Previous Message Kyotaro HORIGUCHI 2013-03-04 09:22:09 Re: 9.2.3 crashes during archive recovery