Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: SharkCZ on November 26, 2006, 02:02:58 pm

Title: wrong regular expressions in the bootstrap script
Post by: SharkCZ 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.
Title: Re: wrong regular expressions in the bootstrap script
Post by: afb on November 26, 2006, 02:20:53 pm
Fixed, revision 3275. Thanks for catching this!
Title: Re: wrong regular expressions in the bootstrap script
Post by: SharkCZ 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.
Title: Re: wrong regular expressions in the bootstrap script
Post by: afb on November 29, 2006, 08:38:43 pm
Fixed, revision 3310. Added a $, to match 1.1 but not 1.10
Title: Re: wrong regular expressions in the bootstrap script
Post by: SharkCZ 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.
Title: Re: wrong regular expressions in the bootstrap script
Post by: afb 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 :-)
Title: Re: wrong regular expressions in the bootstrap script
Post by: SharkCZ on November 30, 2006, 04:52:26 pm
Hopefully this solution will last some time ;-)
Title: Re: wrong regular expressions in the bootstrap script
Post by: knue 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.
Title: Re: wrong regular expressions in the bootstrap script
Post by: afb on December 03, 2006, 08:38:08 am
Please update your sources from SVN.
Title: Re: wrong regular expressions in the bootstrap script
Post by: knue on December 03, 2006, 01:53:46 pm
I am at revision 3204.
Title: Re: wrong regular expressions in the bootstrap script
Post by: mandrav on December 03, 2006, 03:08:01 pm
I am at revision 3204.

Current HEAD is revision 3327...
Title: Re: wrong regular expressions in the bootstrap script
Post by: knue on December 03, 2006, 06:10:04 pm
k, thx. I had problems with svn.