Boost logo

Boost Users :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2004-04-29 17:33:59

Rene Rivera wrote:

> Solving this will require changing the archive action in the
> tru64cxx65-tools.jam file. The most generic way I can think of is to
> change it to something like so:
> actions updated together piecemeal tru64cxx65-Archive-action
> {
> rm -f $(<)
> ar r$(ARFLAGS) $(<) $(>)
> for i in "$(<[1]:D)"/cxx_repository/* ; do ar r$(ARFLAGS) $(<) $i ;
> done
> }
> Tell me what works for you and I'll update the toolset in CVS.

This was great advice. The unfortunate thing about the general way,
adding just one file from the repository at a time, is the huge overhead
of each call to ar. I remember trying this myself a couple of years ago
and deciding it was unacceptable. That was why I added as many object
files at a time as I could get away with. This time, I had to break it
into four pieces:

actions updated together piecemeal tru64cxx65-Archive-action
  rm -f $(<)
  ar r$(ARFLAGS) $(<) $(>)
# one at a time is general, but too slow. Do a bunch at once.
# for i in "$(<[1]:D)"/cxx_repository/* ; do ar r$(ARFLAGS) $(<) $i ; done
  ar r$(ARFLAGS) $(<) "$(<[1]:D)"/cxx_repository/[_A-Z]*
  ar r$(ARFLAGS) $(<) "$(<[1]:D)"/cxx_repository/[a-f]*
  ar r$(ARFLAGS) $(<) "$(<[1]:D)"/cxx_repository/[g-m]*
  ar r$(ARFLAGS) $(<) "$(<[1]:D)"/cxx_repository/[n-z]*

Of course, there may be libraries for which this will still fail. I
don't know how to arrive at a better solution, but you could just wait
until someone complains and then break it into smaller pieces.

For now, I'll go with this huge time savings. I didn't let it go to
completion with the one-at-a-time rule, but I'm pretty sure it's on the
order of 10-15 minutes, compared to 10-15 sec. with my approach.

Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios      
44 South Broadway, White Plains, NY 10601

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at