On 4 March 2016 at 22:23, Michael Paquier <michael.paqu...@gmail.com> wrote:

> On Fri, Mar 4, 2016 at 3:54 PM, Michael Paquier
> <michael.paqu...@gmail.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

Reply via email to