Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2007-01-08 12:52:49


Glenn Schrader wrote:
> The attached patch file fixes a problem that I have been having
> attempting to build a recent version from cvs with gcc 4.1.1

Sorry for not trying to fix this earlier...

> Jam appears to build a single string out of this output, newlines
> and all. The real problem is in tools/build/v2/tools/gcc.jam.
> The line that parses the gcc output is:
>
> local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)"
>
> The regex snippet that should match the version number is '([^ ]+)'.
> The problem is that since '\n' != ' '

As it should be.

> The attached patch modifies tools/jam/src/regexp.c to add support for
> using newlines in character ranges and changes the above line in
> gcc.jam to:
>
> local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^
> \\n]+)[^(]*[(]?([^)]*)"

This would not be the way I would fix it. It will have the likely effect
of breaking a bunch of other stuff that uses the regex function in bjam.
The easier fix is to change the regex itself to include the newline as:

         local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^
  ]+)[^(]*[(]?([^)]*)"

Yes that's a literal newline at the end of the first line. If you could
test with that change the would be wonderful :-)

> Has anybody else seen this?

Nope, yours is the first GCC that I've seen that doesn't put something
after the version number.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk