Author Topic: wrong regular expressions in the bootstrap script  (Read 7123 times)

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
wrong regular expressions in the bootstrap script
« on: November 26, 2006, 02:02:58 pm »
I have problems when compiling CB on Fedora Development which contains autoconf 2.61. It ends with

+ ./bootstrap
Autoconf 2.50 or above is required. Aborting build...

The reason is a wrong regular expression when checking for the version. The current expression '1.*|2.[0-4]' checks for the following strings
- "1" and zero!!! or more occurences of any character => 2.61 has a match
- "2" and any character and a number between 0 and 4
A point must be checked with '\.' and not with '.'

The secure variant could be '1\.[0-9]+|2\.[0-4]', which will check for version 1.x and 2.0 till 2.4. Similar expression are needed for automake (1\.[0-6]) and libtool (1\.[0-3]) checks.
« Last Edit: November 26, 2006, 02:08:36 pm by SharkCZ »
Code::Blocks package maintainer for Fedora and EPEL

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: wrong regular expressions in the bootstrap script
« Reply #1 on: November 26, 2006, 02:20:53 pm »
Fixed, revision 3275. Thanks for catching this!

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: wrong regular expressions in the bootstrap script
« Reply #2 on: November 28, 2006, 10:12:34 pm »
Automake 1.10 was born one month ago and the current check is wrong and the build is crashing on Fedora Core Development. The expression must be updated again :-)
I cannot find out a positive check that will do >= 1.7, so easier could be a negative one "egrep -v '1\.[7-9]|1\.[1-9][0-9]'". Hopefully is this correct.
« Last Edit: November 28, 2006, 10:24:13 pm by SharkCZ »
Code::Blocks package maintainer for Fedora and EPEL

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: wrong regular expressions in the bootstrap script
« Reply #3 on: November 29, 2006, 08:38:43 pm »
Fixed, revision 3310. Added a $, to match 1.1 but not 1.10

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: wrong regular expressions in the bootstrap script
« Reply #4 on: November 30, 2006, 07:36:24 am »
So you expect the version string is on the end of line. That is a variant too.
Code::Blocks package maintainer for Fedora and EPEL

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: wrong regular expressions in the bootstrap script
« Reply #5 on: November 30, 2006, 10:19:30 am »
Since we cut it out from the --version, it should work OK. (it did for me)

Let me know if it doesn't, or when next bleeding edge FC version arrives :-)

Offline SharkCZ

  • Almost regular
  • **
  • Posts: 131
Re: wrong regular expressions in the bootstrap script
« Reply #6 on: November 30, 2006, 04:52:26 pm »
Hopefully this solution will last some time ;-)
Code::Blocks package maintainer for Fedora and EPEL

knue

  • Guest
Re: wrong regular expressions in the bootstrap script
« Reply #7 on: December 03, 2006, 06:04:51 am »
Since I have autoconf 2.61 installed the regular expressions does not work for me neither. I get
Autoconf 2.50 or above is required. Aborting build...
too.

autoconf --version 2>&1|head -n 1|egrep '1.*|2.[0-4]'
gives me:
autoconf (GNU Autoconf) 2.61

Perhaps it should be replaced with:
autoconf --version 2>&1|head -n 1|egrep '1.+|2.[0-4]'
This works for me.
« Last Edit: December 03, 2006, 06:18:00 am by knue »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: wrong regular expressions in the bootstrap script
« Reply #8 on: December 03, 2006, 08:38:08 am »
Please update your sources from SVN.

knue

  • Guest
Re: wrong regular expressions in the bootstrap script
« Reply #9 on: December 03, 2006, 01:53:46 pm »
I am at revision 3204.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: wrong regular expressions in the bootstrap script
« Reply #10 on: December 03, 2006, 03:08:01 pm »
I am at revision 3204.

Current HEAD is revision 3327...
Be patient!
This bug will be fixed soon...

knue

  • Guest
Re: wrong regular expressions in the bootstrap script
« Reply #11 on: December 03, 2006, 06:10:04 pm »
k, thx. I had problems with svn.