Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Lars Kanis <kanis(at)comcard(dot)de>
Cc: Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Date: 2011-11-25 03:52:37
Message-ID: 4ECF1105.1020004@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/24/2011 04:39 AM, Lars Kanis wrote:
>
> > Can you please provide me with some howto on building PG sources with
>
> > mingw-w64?
>
> For 32/64 bit mingw-v4.6.1 on ubuntu 11.10:
>
> apt-get install flex gcc-mingw-w64
>
> ./configure --host=i686-w64-mingw32 --build=x86_64-linux
> --without-zlib && make
>
> and
>
> ./configure --host=x86_64-w64-mingw32 --build=x86_64-linux
> --without-zlib && make
>
> For 32 bit mingw-v4.4.4 on ubuntu 11.10:
>
> apt-get install flex gcc-mingw32
>
> ./configure --host=i586-mingw32msvc --build=x86_64-linux
> --without-zlib && make
>
>

The only thing I at least am going to be interested in supporting is a
native compiler, not a cross-compiler. It's impossible to automate
cross-compiler testing.

The way to build natively with a mingw-w64 compiler is doumented fairly
simply at
<http://www.postgresql.org/docs/current/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW>:

To build 64 bit binaries using MinGW, install the 64 bit tool set
from http://mingw-w64.sourceforge.net/, put its bin directory in the
PATH, and run configure with the --host=x86_64-w64-mingw option.

This is exactly how the buildfarm member pitta was set up.

The only issue here is how to add support for using the 32bit mingw-w64
compiler in pretty much the same way.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message NISHIYAMA Tomoaki 2011-11-25 04:13:12 Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Previous Message Robert Haas 2011-11-25 02:19:49 Re: proposal: use errcontext for custom exception too