flex on win64 - workaround for "flex: fatal internal error, exec failed"

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: flex on win64 - workaround for "flex: fatal internal error, exec failed"
Date: 2011-07-03 23:12:48
Message-ID: 4E10F770.5020406@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

On my win64 build machine I've been suffering from hard to track down
errors from flex like:

"flex: fatal internal error, exec failed"

... even though I have m4 properly installed and whether or not the M4
environment variable is set to point to my M4 executable. It all works
fine under 32-bit windows using the same flex-2.5.35 obtained from Pg
ftp. Under win64 it works ... sometimes.

I haven't managed to figure out exactly what's broken. For the benefit
of anyone else having problems like this or who might find this via a
search later, though: just install msys and use the current flex from
msys. It works perfectly in Pg's build environment and it's easy to
install, so you don't need to stuff around trying to get flex to work.

Grab mingw-get-inst from
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/
and use it to install msys and the minimalist mingw. You won't be using
mingw, but it won't hurt you, and it's easier than installing msys
standalone.

Edit src\tools\msvc\buildenv.pl (or create it if necessary) and use it
to add C:\MinGW\msys\1.0\bin to your PATH. Adjust as appropriate if your
MinGW install dir was different. Eg:

$ENV{PATH}='C:\MinGW\msys\1.0\bin;' . $ENV{PATH};

(As usual you'll probably need to add GnuWin32 and the paths to the
directories containing zlib1.dll, the openssl dlls, etc too).

--
Craig Ringer

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2011-07-04 01:17:06 Re: per-column generic option
Previous Message Tom Lane 2011-07-03 23:05:44 Re: plpgsql extension install nitpick