Problem while installing PostgreSQL using make

Поиск
Список
Период
Сортировка
Искать

Problem while installing PostgreSQL using make

От:
Mohab Yaser <mohabyaserofficial2003@gmail.com>
Дата:
While I was trying to install PostgreSQL from the git repository to start contributing I faced this issue. When I try to type ./configure it gives me this error 

checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for bison... /c/GnuWin32/bin/bison
configure: using bison (GNU Bison) 2.4.1
checking for flex... configure: error:
*** The installed version of Flex, /c/GnuWin32/bin/flex, is too old to use with PostgreSQL.
*** Flex version 2.5.35 or later is required, but this is C:\GnuWin32\bin\flex.exe version 2.5.4.

Look at the last two lines, the error says that the installed version of flex is too old and is 2.4 which is correct and not too old and should be valid but actually I can't proceed beyond this point. And I double checked the version of flex 

$ flex --version
C:\GnuWin32\bin\flex.exe version 2.5.4

and made sure that it is properly included in PATH

$ which flex
/c/GnuWin32/bin/flex
 

Re: Problem while installing PostgreSQL using make

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 4 Jul 2024, at 12:16, Mohab Yaser  wrote:

> *** Flex version 2.5.35 or later is required, but this is C:\GnuWin32\bin\flex.exe version 2.5.4.

> $ flex --version
> C:\GnuWin32\bin\flex.exe version 2.5.4

You have all the information you need right there, your Flex is 31 minor
releases too old.

--
Daniel Gustafsson



Re: Problem while installing PostgreSQL using make

От:
Aleksander Alekseev <aleksander@timescale.com>
Дата:
Hi,

> While I was trying to install PostgreSQL from the git repository to start contributing I faced this issue. When I try to type ./configure it gives me this error
>
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for bison... /c/GnuWin32/bin/bison
> configure: using bison (GNU Bison) 2.4.1
> checking for flex... configure: error:
> *** The installed version of Flex, /c/GnuWin32/bin/flex, is too old to use with PostgreSQL.
> *** Flex version 2.5.35 or later is required, but this is C:\GnuWin32\bin\flex.exe version 2.5.4.
>
> Look at the last two lines, the error says that the installed version of flex is too old and is 2.4 which is correct and not too old and should be valid but actually I can't proceed beyond this point. And I double checked the version of flex
>
> $ flex --version
> C:\GnuWin32\bin\flex.exe version 2.5.4
>
> and made sure that it is properly included in PATH
>
> $ which flex
> /c/GnuWin32/bin/flex

Flex 2.5.4 is ancient. Version 2.5.39 was released in 2020 and I
didn't look further to figure out the exact release year of 2.5.4

You need something like flex 2.6.4 and bison >= 2.3. That's what I use.

-- 
Best regards,
Aleksander Alekseev


Re: Problem while installing PostgreSQL using make

От:
Mohab Yaser <mohabyaserofficial2003@gmail.com>
Дата:
can you send me a link to download this version on windows as I didn't find anything other than the one I already have downloaded

On Thu, Jul 4, 2024 at 1:21 PM Aleksander Alekseev <aleksander@timescale.com> wrote:
Hi,

> While I was trying to install PostgreSQL from the git repository to start contributing I faced this issue. When I try to type ./configure it gives me this error
>
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for bison... /c/GnuWin32/bin/bison
> configure: using bison (GNU Bison) 2.4.1
> checking for flex... configure: error:
> *** The installed version of Flex, /c/GnuWin32/bin/flex, is too old to use with PostgreSQL.
> *** Flex version 2.5.35 or later is required, but this is C:\GnuWin32\bin\flex.exe version 2.5.4.
>
> Look at the last two lines, the error says that the installed version of flex is too old and is 2.4 which is correct and not too old and should be valid but actually I can't proceed beyond this point. And I double checked the version of flex
>
> $ flex --version
> C:\GnuWin32\bin\flex.exe version 2.5.4
>
> and made sure that it is properly included in PATH
>
> $ which flex
> /c/GnuWin32/bin/flex

Flex 2.5.4 is ancient. Version 2.5.39 was released in 2020 and I
didn't look further to figure out the exact release year of 2.5.4

You need something like flex 2.6.4 and bison >= 2.3. That's what I use.

--
Best regards,
Aleksander Alekseev

Re: Problem while installing PostgreSQL using make

От:
Aleksander Alekseev <aleksander@timescale.com>
Дата:
Hi,

>> Flex 2.5.4 is ancient. Version 2.5.39 was released in 2020 and I
>> didn't look further to figure out the exact release year of 2.5.4
>>
>> You need something like flex 2.6.4 and bison >= 2.3. That's what I use.
>
> can you send me a link to download this version on windows as I didn't find anything other than the one I already have downloaded

We don't use top posing in this mailing list [1].

Sorry, I only have Linux and MacOS. Here are the scripts I use [2].
Maybe someone who develops on Windows will answer your questions.
However IMO your learning curve will be less steep with a Linux
virtual machine.

[1]: https://wiki.postgresql.org/wiki/Mailing_Lists
[2]: https://github.com/afiskon/pgscripts/

-- 
Best regards,
Aleksander Alekseev


Re: Problem while installing PostgreSQL using make

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 4 Jul 2024, at 12:27, Aleksander Alekseev  wrote:
> 
> Hi,
> 
>>> Flex 2.5.4 is ancient. Version 2.5.39 was released in 2020 and I
>>> didn't look further to figure out the exact release year of 2.5.4
>>> 
>>> You need something like flex 2.6.4 and bison >= 2.3. That's what I use.
>> 
>> can you send me a link to download this version on windows as I didn't find anything other than the one I already have downloaded
> 
> We don't use top posing in this mailing list [1].
> 
> Sorry, I only have Linux and MacOS. Here are the scripts I use [2].
> Maybe someone who develops on Windows will answer your questions.
> However IMO your learning curve will be less steep with a Linux
> virtual machine.

Flex/Bison are only required when building from a Git tree, downloading a
source archive and building from there might be easier to get started.

	https://www.postgresql.org/ftp/source/

--
Daniel Gustafsson



Re: Problem while installing PostgreSQL using make

От:
Aleksander Alekseev <aleksander@timescale.com>
Дата:
Hi,

> > We don't use top posing in this mailing list [1].
> >
> > Sorry, I only have Linux and MacOS. Here are the scripts I use [2].
> > Maybe someone who develops on Windows will answer your questions.
> > However IMO your learning curve will be less steep with a Linux
> > virtual machine.
>
> Flex/Bison are only required when building from a Git tree, downloading a
> source archive and building from there might be easier to get started.
>
>         https://www.postgresql.org/ftp/source/

It could work but personally I wouldn't recommend this path for
someone who wants to contribute.

-- 
Best regards,
Aleksander Alekseev


Re: Problem while installing PostgreSQL using make

От:
Aleksander Alekseev <aleksander@timescale.com>
Дата:
Hi,

>> > Flex/Bison are only required when building from a Git tree, downloading a
>> > source archive and building from there might be easier to get started.
>> >
>> >         https://www.postgresql.org/ftp/source/
>>
>> It could work but personally I wouldn't recommend this path for
>> someone who wants to contribute.
>
> Why that?

I believe you wanted to reply to the mailing list, not to me directly.
Please use the "Reply to All" button.

Because formatting/rebasing patches is most convenient when you have
git and `git format-path`. And in my humble experience this is
something done often.

-- 
Best regards,
Aleksander Alekseev


Re: Problem while installing PostgreSQL using make

От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 4 Jul 2024, at 12:34, Aleksander Alekseev  wrote:

>>> Sorry, I only have Linux and MacOS. Here are the scripts I use [2].
>>> Maybe someone who develops on Windows will answer your questions.
>>> However IMO your learning curve will be less steep with a Linux
>>> virtual machine.
>> 
>> Flex/Bison are only required when building from a Git tree, downloading a
>> source archive and building from there might be easier to get started.
>> 
>>        https://www.postgresql.org/ftp/source/
> 
> It could work but personally I wouldn't recommend this path for
> someone who wants to contribute.

Absolutely, I don't disagree that, but there is value in not getting stuck
directly as well.

--
Daniel Gustafsson



Re: Problem while installing PostgreSQL using make

От:
Alvaro Herrera <alvherre@alvh.no-ip.org>
Дата:
On 2024-Jul-04, Mohab Yaser wrote:

> can you send me a link to download this version on windows as I didn't find
> anything other than the one I already have downloaded

Well, 
https://packages.msys2.org/package/flex
has 2.6.4.  I don't know what GnuWin32 is, but it looks abandoned.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)


Re: Problem while installing PostgreSQL using make

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Daniel Gustafsson  writes:
> Flex/Bison are only required when building from a Git tree, downloading a
> source archive and building from there might be easier to get started.
> 	https://www.postgresql.org/ftp/source/

That's no longer true I think - as of v17 the source tarballs won't
contain any generated files, so you do need flex and bison if you want
to do any sort of development.  I am mildly astonished to hear that
too-old versions of those tools aren't extinct in the wild, though.

In any case I agree with the recommendation to install and use git
rather than downloading source tarballs.

			regards, tom lane


Re: Problem while installing PostgreSQL using make

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


On 2024-07-04 Th 6:22 AM, Mohab Yaser wrote:
can you send me a link to download this version on windows as I didn't find anything other than the one I already have downloaded

On Thu, Jul 4, 2024 at 1:21 PM Aleksander Alekseev <aleksander@timescale.com> wrote:
Hi,

> While I was trying to install PostgreSQL from the git repository to start contributing I faced this issue. When I try to type ./configure it gives me this error
>
> checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
> checking for bison... /c/GnuWin32/bin/bison
> configure: using bison (GNU Bison) 2.4.1
> checking for flex... configure: error:
> *** The installed version of Flex, /c/GnuWin32/bin/flex, is too old to use with PostgreSQL.
> *** Flex version 2.5.35 or later is required, but this is C:\GnuWin32\bin\flex.exe version 2.5.4.
>
> Look at the last two lines, the error says that the installed version of flex is too old and is 2.4 which is correct and not too old and should be valid but actually I can't proceed beyond this point. And I double checked the version of flex
>
> $ flex --version
> C:\GnuWin32\bin\flex.exe version 2.5.4
>
> and made sure that it is properly included in PATH
>
> $ which flex
> /c/GnuWin32/bin/flex

Flex 2.5.4 is ancient. Version 2.5.39 was released in 2020 and I
didn't look further to figure out the exact release year of 2.5.4

You need something like flex 2.6.4 and bison >= 2.3. That's what I use.


I assume this configure script is running under Msys2? Just install its flex and bison (and remove these ancient versions):


   pacman -S bison flex


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
FAQ