Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-10-11 04:18:23


On Tuesday 10 October 2006 17:59, David Abrahams wrote:
> error: gcc initialization: parameter 'version' inconsistent
> error: no value was specified in earlier initialization
> error: an explicit value is specified now
>
> We've discussed this problem before. Any site administrator who
> invokes "using gcc ;" in site-config.jam prevents users from
> initializing gcc with a version. Any site administrator who adds a
> new "using" invocation to site-config.jam (even a versioned one)
> potentially breaks the user-config.jam of any users.
>
> The only safe thing for everyone concerned is to never invoke "using"
> without a version identifier:
>
> using gcc : default ;
>
> but after all, isn't that just redundant? The system could simply do
> that for me. And finally, it won't work for the Python toolset, for
> example, which expects that 2nd argument to be a real, meaningful
> toolset version.
>
> Why do we still have this requirement that "using" be invoked
> consistently?

I think there were technical reasons. Specifically, some flag settings depends
on toolset setting and so must be a condition, so that they are not used for
other toolset.

If we have

     flags gcc.compile WHATEVER <toolset>gcc : ......
     flags gcc.compile WHATEVER <toolset>gcc,<toolset:gcc-version>3.4 : ......

both flag settings will be used, which means that default-initialize gcc will
add his settings to all version-initiialized gccs. Now, we have a mechanism
to say:

     flags gcc.compile WHATEVER
               <toolset>gcc,<toolset:gcc-version> : ......
     flags gcc.compile WHATEVER
                <toolset>gcc,<toolset:gcc-version>3.4 : ......

So removing the consistency requirement should be possible. I'm a bit worried
about "gcc" and "gcc-4.1" being names of exactly the same compiler, but
perhaps that's fine.

Code-wise, all that's needed is change common.check-init-parameters to avoid
the check, use the value-less syntax for features that are not specified.

As usual, help in doing that would be appreciated. If you don't have the time,
can you file an issue?

Thanks,
Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk