Search Postgresql Archives

Re: Building Postgres using mingw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 7, 2014 at 10:26 AM, Jeff Janes <jeff.janes@xxxxxxxxx> wrote:
> On Wed, May 7, 2014 at 8:27 AM, Michael Paquier <michael.paquier@xxxxxxxxx>
> wrote:
>>
>> Hi all,
>>
>> Following some instructions on the wiki and the docs, I am trying to
>> compile the code using minwg:
>> https://wiki.postgresql.org/wiki/Building_With_MinGW
>>
>> http://www.postgresql.org/docs/devel/static/installation-platform-notes.html#INSTALLATION-NOTES-MINGW
>>
>> After installing mingw-w64 and adding its binaries to PATH, I am able
>> to complete configure correctly (including finding a compiler with
>> --host=x86_64-w64-mingw32). However mingw-w64 does not have a make
>> command included so compilation cannot continue.
>
>
> Did you select the 'developer toolkit' when running the mingw installer?
Think so... However I finally got it working, and here is a little bit
of feedback for the archive's sake as this is trickier than it seems
at first sight.

When trying to use a recent mingw package, sometimes ./configure is
not able to recognize a compiler even if there is one in PATH. This
worked correctly with the snapshot that Postgres wiki recommends
though, even if it is a couple of years old.

Then, after looking at some mingw builds available on sourceforge, the
make command is sometimes not available, but some of the latest builds
available name it mingw32-make.exe instead of make.exe to not conflict
with msys things. So a quick solution is to copy it as make.exe in
PATH if your environment does not include it yet. But be careful when
doing that.

I also had to enforce some environment variables to the following
values at configure (instead of the default values set to /bin/*
because this was failing):
SHELL=bash
PERL=perl
BISON=bison
FLEX=flex
MKDIR_P="mkdir -p"

I hope that this helps. Perhaps I missed something, so if someone has
better ideas or ways to do that... This has been done on a Win7 dev
box with msysgit installed.
Regards,
-- 
Michael



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux