Re: VS 2015 support in src/tools/msvc

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VS 2015 support in src/tools/msvc
Date: 2016-03-05 03:09:55
Message-ID: CAMsr+YHtf2Oub0wYyZoqLTPw9ORQ7v2aPL7ZtZmg6ok5XhPGFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4 March 2016 at 22:23, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> On Fri, Mar 4, 2016 at 3:54 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
> > I still need to dig into that in more details. For the time being the
> > patch attached is useful IMO to plug in VS 2015 with the existing
> > infrastructure. So if anybody has a Windows environment, feel free to
> > play with it and dig into those problems. I'll update this thread once
> > I have a more advanced status.
>
> OK, attached are a set of patches that allowed me to compile Postgres
> using VS2015, in more details:
> - 0001, as mentioned by Petr upthread, psed is removed from the core
> distribution of Perl in 5.22, so when installing ActivePerl it is not
> possible to create probes.h, and the code compilation would fail. I
> bumped into that so here is a patch. What I am proposing here is to
> replace psed by sed, sed being available in MSYS like bison and flex,
> so when building using MSVC the environment to set up is normally
> already good to go even with this additional dependency.

The assumption here is that we're using msys to provide bison and flex
(probably via msysgit), so adding sed isn't any more intrusive.

I think that's reasonable, but wanted to spell it out since right now msys
isn't actually a dependency of the MSVC builds, just a convenient way to
get some of the dependencies. This still adds a new dependency, but it's
one most people will have anyway. If they're using bison/flex from gnuwin32
or whatever instead they can get sed there too. So +1, sensible.

> Now, it is
> important to mention that probes.h is not part of a source tarball. I
> think that we would want probes.h to be part of a source tarball so as
> it would be possible to compile the code on Windows using MSVC without
> having to install MSYS. I haven't done that in this patch, thoughts on
> the matter are welcome.
>

That's consistent with how we include the generated scanner and lexer files
etc in the source tarball, so +1.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-03-05 03:23:37 Re: The plan for FDW-based sharding
Previous Message Robert Haas 2016-03-05 03:04:03 Re: The plan for FDW-based sharding