Libpq.dll on MinGW, was Re: initdb failure - postgres hangs with 100% CPU

Lists: pgsql-cygwin
From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Steve Jorgensen <jorgens(at)coho(dot)net>
Cc: pgsql-cygwin(at)postgresql(dot)org, cygwin(at)sources(dot)redhat(dot)com
Subject: Re: initdb failure - postgres hangs with 100% CPU
Date: 2001-07-10 18:48:12
Message-ID: 20010710144812.A320@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Steve,

On Tue, Jul 10, 2001 at 10:57:11AM -0700, Steve Jorgensen wrote:
> In case you were wondering, I am someone who has been -very- happy to have
> your Cygwin port of PostgreSQL to work with, and I had no problem following
> your instructions to make it work. Just so you know your work is
> appreciated.

Thanks for acknowledging my efforts.

> Trojan horse follows:
> I don't suppose you know if anyone has instructions for building libpq.dll
> using Cygwin/gcc?

What precisely do you mean by "libpq.dll"? Do you mean the straight Win32
version of libpq, the PostgreSQL front-end C library? If so, then you can
find a pre-built (with MSVS 6.0) but *untested* tarball at the following:

http://members.home.net/jtishler/software/postgresql/postgresql-7.1.2-1-win32.tar.gz

By "using Cygwin/gcc" do you mean Cygwin's gcc -mno-cygwin or Mingw
mode? If so, then it should be possible but I don't know of anyone who
has done it yet.

Jason

--
Jason Tishler
Director, Software Engineering Phone: 732.264.8770 x235
Dot Hill Systems Corp. Fax: 732.264.8798
82 Bethany Road, Suite 7 Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com


From: Christof Petig <christof(at)petig-baender(dot)de>
To: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
Cc: Steve Jorgensen <jorgens(at)coho(dot)net>, pgsql-cygwin(at)postgresql(dot)org, cygwin(at)sources(dot)redhat(dot)com
Subject: Libpq.dll on MinGW, was Re: initdb failure - postgres hangs with 100% CPU
Date: 2001-07-11 11:30:16
Message-ID: 3B4C38C8.52B0E935@petig-baender.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Jason Tishler wrote:

> By "using Cygwin/gcc" do you mean Cygwin's gcc -mno-cygwin or Mingw
> mode? If so, then it should be possible but I don't know of anyone who
> has done it yet.

I have compiled and successfully tested libpq with mingw, including ecpg support. See my
posting on psql-cygwin and mingw-users on july 2nd.

Binaries are at ftp://midgard.berlios.de/pub/midgard/

Of course unix sockets are not supported under MinGW, you have to use TCP/IP.

Yours
Christof


From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Christof Petig <christof(at)petig-baender(dot)de>
Cc: Steve Jorgensen <jorgens(at)coho(dot)net>, pgsql-cygwin(at)postgresql(dot)org, cygwin(at)sources(dot)redhat(dot)com
Subject: Re: Libpq.dll on MinGW, was Re: initdb failure - postgres hangs with 100% CPU
Date: 2001-07-11 14:13:42
Message-ID: 20010711101342.H320@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Christof,

On Wed, Jul 11, 2001 at 01:30:16PM +0200, Christof Petig wrote:
> Jason Tishler wrote:
>
> > By "using Cygwin/gcc" do you mean Cygwin's gcc -mno-cygwin or Mingw
> > mode? If so, then it should be possible but I don't know of anyone who
> > has done it yet.
>
> I have compiled and successfully tested libpq with mingw, including ecpg
> support. See my posting on psql-cygwin and mingw-users on july 2nd.

I actually read that email, but was on vacation at the time, so it went
right out of my mind -- those pesky holidays and vacations getting in
the way yet again! :,)

I have reviewed your patch. IMO, only some of it would be accepted into
the mainline source by the PostgreSQL development team. However, I feel
that your work is important and a very good start.

Would you be willing to take this to the next level? First, you would
need to make a new Mingw Makefile (src/makefiles/Makefile.mingw) and port
header file template (src/include/port/mingw.h). Then, diddle with the
autoconf stuff to select these new templates. Finally, you would need
to convince make to just build the Mingw build-able stuff.

BTW, when reviewing your patch, I noticed a hunk against config.h. Did
you configure under Cygwin first and then make your changes? If not,
how was config.h generated?

I would be willing to review your patches before you submit then to
pgsql-patches.

Jason

--
Jason Tishler
Director, Software Engineering Phone: 732.264.8770 x235
Dot Hill Systems Corp. Fax: 732.264.8798
82 Bethany Road, Suite 7 Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com


From: Christof Petig <christof(at)petig-baender(dot)de>
To: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
Cc: Steve Jorgensen <jorgens(at)coho(dot)net>, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Libpq.dll on MinGW, was Re: initdb failure - postgres hangs with 100% CPU
Date: 2001-07-12 09:45:37
Message-ID: 3B4D71C1.D16B568A@petig-baender.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Hi Jason,

> I actually read that email, but was on vacation at the time, so it went
> right out of my mind -- those pesky holidays and vacations getting in
> the way yet again! :,)

I'm heading for four weeks holiday in 8 days, so I'm quite busy with paid work
+ preparing things ...

> Would you be willing to take this to the next level? First, you would
> need to make a new Mingw Makefile (src/makefiles/Makefile.mingw) and port
> header file template (src/include/port/mingw.h). Then, diddle with the
> autoconf stuff to select these new templates. Finally, you would need
> to convince make to just build the Mingw build-able stuff.

Brrr. I hate platform specific Makefiles. Once somebody changes the master
Makefile you have to port every change yourself. (As happened e.g. with glib!)
Usually I prefer either short build scrips (calling make, patch, install etc.)
or plain autoconf/automake. But if it's usual within Pgsql, it will be the way
to go.

Perhaps later (September). I meant my mail as a 'It's possible, I made it this
way' message.

> BTW, when reviewing your patch, I noticed a hunk against config.h. Did
> you configure under Cygwin first and then make your changes? If not,
> how was config.h generated?

Oh, I knew. I simply didn't go that far.

Since I'm maintainer of some other OSS projects I don't have too much free
time, perhaps someone else wants to step in the gap?

Christof

PS: The port was done on a MinGW cross compiler on an iBook (debian PPC).
PPS: I took cygwin out of the CC list since it get's more internal to pgsql.