Boost logo

Boost-Build :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2006-04-10 11:32:56


Vladimir Prus wrote:
> On Monday 10 April 2006 15:52, David Abrahams wrote:
>> Rene Rivera <grafik.list_at_[hidden]> writes:
>>> * Write a HASH builtin:
>>>
>>> rule HASH ( string : hash-method ? )
>>>
>>> That of course requires finding free code for at least one good hash
>>> function.
>> There's already a string hashing function built into the core of
>> bjam... so if it isn't good enough, I suppose we could just upgrade
>> it.
>
> Yes, it's MD5, I believe.

The only hash function I know of in bjam is for the string symbol table.
And it not MD5. Upgrading it is also not an option as it's integral to
the functioning of the hash table, meaning it's properties are designed
for that use only. Exposing it is also not an option as it's has a high
collision rate, relative to message digest hash functions.

> Speaking of hashing paths, I doubt it's a good
> solution. From user's perspective, long paths are just inconvenient, and not
> many users have problems because command length limits.

It will become a problem for a good number of users, those that use
MinGW or Cygwin, when they start using anything but the builtin
variants. For users, including myself as I ran into the problem while
using BB, there's a limit as to how short one can make the target paths
using variants and still maintain cross-platform/cross-compiler jamfiles.

> Using hashes is just
> as inconvenient as long paths, IMO, because in both cases object files end up
> in directories with "funny names".

Yes exactly! They are just as inconvenient, which I mentioned initially,
but they are guaranteed to be short. I'll take the option that works
100% of the time over the one that works 75% of the time when they are
otherwise equivalent.

> Ideally, we need to create just "debug"
> directory for common cases.

Sure... but how to do that and still maintain independent builds? I
haven't though about any automatic way of doing this. I can only think
of the manual way of specifying target build paths. For example if
variants could be selected based on requirements:

variant debug-x86-win32 : debug
   # properties
   : <include>/special/x86 #etc...
   # requirements
   : <architecture>x86 <target-os>NT
;

So that "debug-x86-win32" is selected when one asks for the "debug"
variant. Hence putting the responsibility of deciding what is a unique
build path on the users.

-- 
-- 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-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