Re: What's the best way to get flex and bison on Windows?

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What's the best way to get flex and bison on Windows?
Date: 2019-12-16 03:49:36
Message-ID: CAA8=A79n23EOS90bTPL5wE3YsmnP=zazrvz-iPTQBDE5UmoSNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 16, 2019 at 2:04 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>
> On Mon, Dec 16, 2019 at 4:31 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > On Mon, Dec 16, 2019 at 8:16 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > > On Mon, Dec 16, 2019 at 11:25:55AM +1300, Thomas Munro wrote:
> > > > You can see MinGW, MSYS and Cygwin there, and I suspect that one of
> > > > those is the answer, but I'm not familiar with them or what else might
> > > > be available to install popular F/OSS bits and pieces on that
> > > > operating system, because I really only know how to Unix. Maybe flex
> > > > and bison are already installed somewhere or easily installable with a
> > > > shell command? Would someone who knows about development on Windows
> > > > like to make a recommendation, or perhaps provide a tweaked version of
> > > > the attached patch[1]?
> > >
> > > On my Windows workstations, I use bison and flex bundled in MinGW
> > > which are located under c:\MinGW\msys\1.0\bin\. (Then, for a MSVC
> > > build, I just append this path to $ENV{PATH} with a semicolon to do
> > > the separation but that's a separate story).
> >
> > I also have the same setup for flex and bison.
>
> Thanks Michael and Amit. Adding SET
> PATH=%PATH%;C:\MinGW\msys\1.0\bin\ did the trick, and allows me to
> remove the Chocolatey dependency. I'll apply that change to cfbot
> tomorrow.
>
>

The reason I use chocolatey is to avoid having a dependency on Msys/Msys2 ;-)

If you're going to link to anything it should probably be to the Msys2
binaries, because a) they are likely to be more up to date and b)
unlike msys1 they are available by default for all four VS toolsets
Appveyor provides.

FYI I have captured a complete log of what chocolatey does, at
<https://gist.github.com/adunstan/12e4474c769aa88a584c450548bf2ffa>
Essentially it just downloads a zip from sourceforge and then sets up
shims to the binaries.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-12-16 04:20:17 Re: What's the best way to get flex and bison on Windows?
Previous Message Thomas Munro 2019-12-16 03:34:07 Re: What's the best way to get flex and bison on Windows?