databasepostgresqlrdbmsbisonconfigure

The installed version of Bison, /c/Program Files (x86)/GnuWin32/bin/bison, is too old to use with PostgreSQL


I am trying to run PostgreSQL in my windows laptop using its source code by cloning its repo from Github. For this I am following this documentation But while trying to run ./configure command I am encountering this error

configure: error:
*** The installed version of Bison, /c/Program Files (x86)/GnuWin32/bin/bison, is too old to use with PostgreSQL.
*** Bison version 2.3 or later is required, but this is .

Although I have checked version of bison in my pc using

PS C:\Program Files (x86)\GnuWin32\bin> bison --version
bison (GNU Bison) 2.4.1
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I have added bison in the user PATH variable too. Now I don't know why its complaining to have lower version than 2.3!


Solution

  • This is bug with GnuWin32 and Bison. Per the Postgres docs here Install Windows:

    Note

    The Bison distribution from GnuWin32 appears to have a bug that causes Bison to malfunction when installed in a directory with spaces in the name, such as the default location on English installations C:\Program Files\GnuWin32. Consider installing into C:\GnuWin32 or use the NTFS short name path to GnuWin32 in your PATH environment setting (e.g., C:\PROGRA~1\GnuWin32).