Commit a266f7dd authored by Heikki Linnakangas's avatar Heikki Linnakangas

Winflex binary on FTP site doesn't work on 64-bit Windows, update docs.

Plus some other minor clarifications to Windows build instructions.

Craig Ringer, with minor editorialization by me.
parent f1abee6b
...@@ -92,9 +92,10 @@ ...@@ -92,9 +92,10 @@
</para> </para>
<para> <para>
The tools for building using <productname>Visual C++</productname>, The tools for building using <productname>Visual C++</productname> or
are in the <filename>src/tools/msvc</filename> directory. When building, <productname>Platform SDK</productname> are in the
make sure there are no tools from <productname>MinGW</productname> or <filename>src/tools/msvc</filename> directory. When building, make sure
there are no tools from <productname>MinGW</productname> or
<productname>Cygwin</productname> present in your system PATH. Also, make <productname>Cygwin</productname> present in your system PATH. Also, make
sure you have all the required Visual C++ tools available in the PATH. In sure you have all the required Visual C++ tools available in the PATH. In
<productname>Visual Studio</productname>, start the <productname>Visual Studio</productname>, start the
...@@ -103,10 +104,12 @@ ...@@ -103,10 +104,12 @@
the command, and vice versa. the command, and vice versa.
In the <productname>Microsoft Windows SDK</productname>, start the In the <productname>Microsoft Windows SDK</productname>, start the
<application>CMD shell</application> listed under the SDK on the Start Menu. <application>CMD shell</application> listed under the SDK on the Start Menu.
In recent SDK versions you can change the targeted CPU architecture by using In recent SDK versions you can change the targeted CPU architecture, build
the <command>setenv</command> command. type, and target OS by using the <command>setenv</command> command, e.g.
All commands should be run from the <filename>src\tools\msvc</filename> <command>setenv /x86 /release /xp</command> to target Windows XP or later
directory. with a 32-bit release build. See <command>/?</command> for other options to
<command>setenv</command>. All commands should be run from the
<filename>src\tools\msvc</filename> directory.
</para> </para>
<para> <para>
...@@ -191,17 +194,32 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; ...@@ -191,17 +194,32 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
<varlistentry> <varlistentry>
<term><productname>Bison</productname> and <term><productname>Bison</productname> and
<productname>Flex</productname></term> <productname>Flex</productname></term>
<listitem><para> <listitem>
Bison and Flex are required to build from Git, but not required when <para>
building from a release file. Note that only Bison 1.875 or versions <productname>Bison</productname> and <productname>Flex</productname> are
2.2 and later will work. Also, Flex version 2.5.31 or later is required. required to build from Git, but not required when building from a release
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></>. file. Only <productname>Bison</productname> 1.875 or versions 2.2 and later
Flex can be downloaded from will work. <productname>Flex</productname> must be version 2.5.31 or later.
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></>. </para>
If you are using <productname>msysGit</productname> for accessing the
PostgreSQL <productname>Git</productname> repository you probably already <para>
have recent versions of bison and flex in your <productname>Git</productname> Both <productname>Bison</productname> and <productname>Flex</productname>
binary directory. are included in the <productname>msys</productname> tool suite, available
from <ulink url="http://www.mingw.org/wiki/MSYS"></> as part of the
<productname>MinGW</productname> compiler suite. You can also get
<productname>msys</productname> as part of
<productname>msysGit</productname> from <ulink url="http://git-scm.com/"></>.
</para>
<para>
You will need to add the directory containing
<filename>flex.exe</filename> and <filename>bison.exe</filename> to the
PATH environment variable in <filename>buildenv.pl</filename> unless
they are already in PATH. In the case of MinGW, the directory is the
<filename>\msys\1.0\bin</filename> subdirectory of your MinGW
installation directory. For msysGit, it's the <filename>bin</filename>
directory in your Git install directory. Do not add the MinGW compiler
tools themselves to PATH.
</para> </para>
<note> <note>
...@@ -210,7 +228,18 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin'; ...@@ -210,7 +228,18 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
causes Bison to malfunction when installed in a directory with causes Bison to malfunction when installed in a directory with
spaces in the name, such as the default location on English spaces in the name, such as the default location on English
installations <filename>C:\Program Files\GnuWin32</filename>. installations <filename>C:\Program Files\GnuWin32</filename>.
Consider installing into <filename>C:\GnuWin32</filename> instead. Consider installing into <filename>C:\GnuWin32</filename> or use the
NTFS shortname path to GnuWin32 in your PATH environment setting
(e.g. <filename>C:\PROGRA~1\GnuWin32</filename>).
</para>
</note>
<note>
<para>
The obsolete "winflex" binaries distributed on the PostgreSQL FTP site
and referenced in older documentation will fail with "flex: fatal
internal error, exec failed" on 64-bit Windows hosts. Use flex from
msys instead.
</para> </para>
</note> </note>
</listitem> </listitem>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment